mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-03 11:24:10 +01:00
bootfault: make IAP usage depend on PiOS config
The sim platforms don't support an IAP mechanism. Let PiOS config control when we try to use it.
This commit is contained in:
parent
a51bf72bc7
commit
c97b108a1f
@ -41,5 +41,6 @@
|
|||||||
#define PIOS_INCLUDE_GPIO
|
#define PIOS_INCLUDE_GPIO
|
||||||
#define PIOS_INCLUDE_EXTI
|
#define PIOS_INCLUDE_EXTI
|
||||||
#define PIOS_INCLUDE_BL_HELPER
|
#define PIOS_INCLUDE_BL_HELPER
|
||||||
|
#define PIOS_INCLUDE_IAP
|
||||||
|
|
||||||
#endif /* PIOS_CONFIG_H */
|
#endif /* PIOS_CONFIG_H */
|
||||||
|
@ -36,5 +36,6 @@
|
|||||||
#define PIOS_INCLUDE_BL_HELPER
|
#define PIOS_INCLUDE_BL_HELPER
|
||||||
#define PIOS_INCLUDE_BL_HELPER_WRITE_SUPPORT
|
#define PIOS_INCLUDE_BL_HELPER_WRITE_SUPPORT
|
||||||
#define PIOS_INCLUDE_GPIO
|
#define PIOS_INCLUDE_GPIO
|
||||||
|
#define PIOS_INCLUDE_IAP
|
||||||
|
|
||||||
#endif /* PIOS_CONFIG_H */
|
#endif /* PIOS_CONFIG_H */
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#define PIOS_INCLUDE_USB_HID
|
#define PIOS_INCLUDE_USB_HID
|
||||||
#define PIOS_INCLUDE_COM_MSG
|
#define PIOS_INCLUDE_COM_MSG
|
||||||
#define PIOS_INCLUDE_GPIO
|
#define PIOS_INCLUDE_GPIO
|
||||||
|
#define PIOS_INCLUDE_IAP
|
||||||
#define PIOS_NO_GPS
|
#define PIOS_NO_GPS
|
||||||
|
|
||||||
#endif /* PIOS_CONFIG_H */
|
#endif /* PIOS_CONFIG_H */
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#define PIOS_INCLUDE_COM
|
#define PIOS_INCLUDE_COM
|
||||||
#define PIOS_INCLUDE_COM_MSG
|
#define PIOS_INCLUDE_COM_MSG
|
||||||
#define PIOS_INCLUDE_GPIO
|
#define PIOS_INCLUDE_GPIO
|
||||||
|
#define PIOS_INCLUDE_IAP
|
||||||
//#define DEBUG_SSP
|
//#define DEBUG_SSP
|
||||||
|
|
||||||
/* Defaults for Logging */
|
/* Defaults for Logging */
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#define PIOS_INCLUDE_USB_HID
|
#define PIOS_INCLUDE_USB_HID
|
||||||
#define PIOS_INCLUDE_COM_MSG
|
#define PIOS_INCLUDE_COM_MSG
|
||||||
#define PIOS_INCLUDE_GPIO
|
#define PIOS_INCLUDE_GPIO
|
||||||
|
#define PIOS_INCLUDE_IAP
|
||||||
|
|
||||||
/* Defaults for Logging */
|
/* Defaults for Logging */
|
||||||
#define LOG_FILENAME "PIOS.LOG"
|
#define LOG_FILENAME "PIOS.LOG"
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#define PIOS_INCLUDE_IRQ
|
#define PIOS_INCLUDE_IRQ
|
||||||
#define PIOS_INCLUDE_LED
|
#define PIOS_INCLUDE_LED
|
||||||
|
#define PIOS_INCLUDE_IAP
|
||||||
|
|
||||||
#define PIOS_INCLUDE_RCVR
|
#define PIOS_INCLUDE_RCVR
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
#define PIOS_INCLUDE_IMU3000
|
#define PIOS_INCLUDE_IMU3000
|
||||||
#define PIOS_INCLUDE_GPIO
|
#define PIOS_INCLUDE_GPIO
|
||||||
#define PIOS_INCLUDE_EXTI
|
#define PIOS_INCLUDE_EXTI
|
||||||
|
#define PIOS_INCLUDE_IAP
|
||||||
|
|
||||||
#define PIOS_INCLUDE_BMA180
|
#define PIOS_INCLUDE_BMA180
|
||||||
|
|
||||||
|
@ -48,8 +48,6 @@
|
|||||||
#include "taskinfo.h"
|
#include "taskinfo.h"
|
||||||
#include "watchdogstatus.h"
|
#include "watchdogstatus.h"
|
||||||
#include "taskmonitor.h"
|
#include "taskmonitor.h"
|
||||||
#include "pios_iap.h"
|
|
||||||
|
|
||||||
|
|
||||||
// Private constants
|
// Private constants
|
||||||
#define SYSTEM_UPDATE_PERIOD_MS 1000
|
#define SYSTEM_UPDATE_PERIOD_MS 1000
|
||||||
@ -148,8 +146,10 @@ static void systemTask(void *parameters)
|
|||||||
PIOS_SYS_Reset();
|
PIOS_SYS_Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(PIOS_INCLUDE_IAP)
|
||||||
/* Record a successful boot */
|
/* Record a successful boot */
|
||||||
PIOS_IAP_WriteBootCount(0);
|
PIOS_IAP_WriteBootCount(0);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Initialize vars
|
// Initialize vars
|
||||||
idleCounter = 0;
|
idleCounter = 0;
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#define PIOS_INCLUDE_I2C
|
#define PIOS_INCLUDE_I2C
|
||||||
#define PIOS_INCLUDE_IRQ
|
#define PIOS_INCLUDE_IRQ
|
||||||
#define PIOS_INCLUDE_LED
|
#define PIOS_INCLUDE_LED
|
||||||
|
#define PIOS_INCLUDE_IAP
|
||||||
|
|
||||||
#define PIOS_INCLUDE_RCVR
|
#define PIOS_INCLUDE_RCVR
|
||||||
|
|
||||||
|
@ -112,7 +112,10 @@
|
|||||||
#if defined(PIOS_INCLUDE_IMU3000)
|
#if defined(PIOS_INCLUDE_IMU3000)
|
||||||
#include <pios_imu3000.h>
|
#include <pios_imu3000.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PIOS_INCLUDE_IAP)
|
||||||
#include <pios_iap.h>
|
#include <pios_iap.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_ADXL345)
|
#if defined(PIOS_INCLUDE_ADXL345)
|
||||||
#include <pios_adxl345.h>
|
#include <pios_adxl345.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user