mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
AP_Bootloader: disable flash ecc erase on boards using flash for parameter storage
This commit is contained in:
committed by
Andrew Tridgell
parent
8d543bde2c
commit
55eaa39ecd
@@ -74,7 +74,7 @@ int main(void)
|
||||
|
||||
flash_init();
|
||||
|
||||
#if defined(STM32H7) && CH_CFG_USE_HEAP
|
||||
#if AP_FLASH_ECC_CHECK_ENABLED
|
||||
check_ecc_errors();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -544,7 +544,7 @@ void port_setbaud(uint32_t baudrate)
|
||||
}
|
||||
#endif // BOOTLOADER_DEV_LIST
|
||||
|
||||
#if defined(STM32H7) && CH_CFG_USE_HEAP
|
||||
#if AP_FLASH_ECC_CHECK_ENABLED
|
||||
/*
|
||||
check if flash has any ECC errors and if it does then erase all of
|
||||
flash
|
||||
@@ -591,5 +591,4 @@ void check_ecc_errors(void)
|
||||
}
|
||||
__enable_fault_irq();
|
||||
}
|
||||
#endif // defined(STM32H7) && CH_CFG_USE_HEAP
|
||||
|
||||
#endif // AP_FLASH_ECC_CHECK_ENABLED
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
#define LED_ACTIVITY 1
|
||||
#define LED_BOOTLOADER 2
|
||||
|
||||
#ifndef AP_FLASH_ECC_CHECK_ENABLED
|
||||
#define AP_FLASH_ECC_CHECK_ENABLED defined(STM32H7) && CH_CFG_USE_HEAP && !defined(STORAGE_FLASH_START_PAGE)
|
||||
#endif
|
||||
|
||||
/* board info forwarded from board-specific code to booloader */
|
||||
struct boardinfo {
|
||||
uint32_t board_type;
|
||||
@@ -54,7 +58,7 @@ void thread_sleep_us(uint32_t us);
|
||||
|
||||
void custom_startup(void);
|
||||
|
||||
#if defined(STM32H7) && CH_CFG_USE_HEAP
|
||||
#if AP_FLASH_ECC_CHECK_ENABLED
|
||||
void check_ecc_errors(void);
|
||||
#endif
|
||||
|
||||
|
||||
Generated
BIN
Binary file not shown.
Generated
+2363
-2413
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user