AP_Bootloader: disable flash ecc erase on boards using flash for parameter storage

This commit is contained in:
Andy Piper
2025-05-13 12:03:49 +10:00
committed by Andrew Tridgell
parent 8d543bde2c
commit 55eaa39ecd
5 changed files with 2371 additions and 2418 deletions
+1 -1
View File
@@ -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
+2 -3
View File
@@ -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 -1
View File
@@ -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
Binary file not shown.
+2363 -2413
View File
File diff suppressed because it is too large Load Diff