AP_Periph: use AP_CheckFirmware

# Conflicts:
#	Tools/AP_Periph/wscript
This commit is contained in:
Andrew Tridgell 2022-08-18 20:54:36 +10:00 committed by Randy Mackay
parent da07cd344c
commit 5df682d407
4 changed files with 3 additions and 16 deletions

View File

@ -57,15 +57,6 @@ void loop(void)
static uint32_t start_ms;
/*
declare constant app_descriptor in flash
*/
#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
const struct app_descriptor app_descriptor __attribute__((section(".app_descriptor")));
#else
const struct app_descriptor app_descriptor;
#endif
AP_Periph_FW::AP_Periph_FW()
#if HAL_LOGGING_ENABLED
: logger(g.log_bitmask)
@ -131,12 +122,7 @@ void AP_Periph_FW::init()
logger.Init(log_structure, ARRAY_SIZE(log_structure));
#endif
printf("Booting %08x:%08x %u/%u len=%u 0x%08x\n",
app_descriptor.image_crc1,
app_descriptor.image_crc2,
app_descriptor.version_major, app_descriptor.version_minor,
app_descriptor.image_size,
app_descriptor.git_hash);
check_firmware_print();
if (hal.util->was_watchdog_reset()) {
printf("Reboot after watchdog reset\n");

View File

@ -14,6 +14,7 @@
#include <AP_MSP/AP_MSP.h>
#include <AP_MSP/msp.h>
#include "../AP_Bootloader/app_comms.h"
#include <AP_CheckFirmware/AP_CheckFirmware.h>
#include "hwing_esc.h"
#include <AP_CANManager/AP_CANManager.h>
#include <AP_Scripting/AP_Scripting.h>

View File

@ -31,7 +31,6 @@
#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
#include <hal.h>
#include "../AP_Bootloader/app_comms.h"
#include <AP_HAL_ChibiOS/CANIface.h>
#include <AP_HAL_ChibiOS/hwdef/common/stm32_util.h>
#include <AP_HAL_ChibiOS/hwdef/common/watchdog.h>

View File

@ -62,6 +62,7 @@ def build(bld):
'AC_PID',
'AP_BLHeli',
'AP_ESC_Telem',
'AP_CheckFirmware',
]
bld.ap_stlib(
name= 'AP_Periph_libs',