mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 06:33:33 +08:00
canbootloder:Make support for ALT Bootloader an Option
This commit is contained in:
committed by
Daniel Agar
parent
174f2624df
commit
5ea56af5f0
@@ -616,6 +616,7 @@ typedef enum reset_mode_e {
|
||||
int board_configure_reset(reset_mode_e mode, uint32_t arg);
|
||||
#endif
|
||||
|
||||
#if defined(SUPPORT_ALT_CAN_BOOTLOADER)
|
||||
/****************************************************************************
|
||||
* Name: board_booted_by_px4
|
||||
*
|
||||
@@ -631,7 +632,7 @@ int board_configure_reset(reset_mode_e mode, uint32_t arg);
|
||||
****************************************************************************/
|
||||
|
||||
bool board_booted_by_px4(void);
|
||||
|
||||
#endif
|
||||
/************************************************************************************
|
||||
* Name: board_query_manifest
|
||||
*
|
||||
|
||||
@@ -84,8 +84,6 @@
|
||||
#pragma message "******** DANGER DEBUG_APPLICATION_INPLACE is DEFINED ******"
|
||||
#endif
|
||||
|
||||
extern bootloader_alt_app_shared_t _sapp_bl_shared;
|
||||
|
||||
typedef volatile struct bootloader_t {
|
||||
can_speed_t bus_speed;
|
||||
volatile uint8_t health;
|
||||
@@ -1104,7 +1102,7 @@ __EXPORT int main(int argc, char *argv[])
|
||||
bootloader.app_bl_request = (OK == bootloader_app_shared_read(&common, App)) &&
|
||||
common.bus_speed && common.node_id;
|
||||
|
||||
|
||||
#if defined(SUPPORT_ALT_CAN_BOOTLOADER)
|
||||
/* Was this boot a result of An Alternate Application being told it has a FW update ? */
|
||||
|
||||
bootloader_alt_app_shared_t *ps = (bootloader_alt_app_shared_t *) &_sapp_bl_shared;
|
||||
@@ -1117,6 +1115,7 @@ __EXPORT int main(int argc, char *argv[])
|
||||
ps->signature = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
/*
|
||||
* Mark CRC to say this is not from
|
||||
* auto baud and Node Allocation
|
||||
|
||||
@@ -131,6 +131,7 @@ int board_reset(int status)
|
||||
|
||||
#endif /* CONFIG_BOARDCTL_RESET */
|
||||
|
||||
#if defined(SUPPORT_ALT_CAN_BOOTLOADER)
|
||||
/****************************************************************************
|
||||
* Name: board_booted_by_px4
|
||||
*
|
||||
@@ -152,3 +153,4 @@ bool board_booted_by_px4(void)
|
||||
|
||||
return (vectors[2] == vectors[3]) && (vectors[4] == vectors[5]);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user