AP_Bootloader: fix build for STM32H7 without heap

disables ecc check for those boards as well
This commit is contained in:
bugobliterator 2024-07-24 09:54:15 +10:00 committed by Andrew Tridgell
parent 2b64787099
commit 3e8b5ccee4
3 changed files with 5 additions and 3 deletions

View File

@ -74,7 +74,7 @@ int main(void)
flash_init(); flash_init();
#ifdef STM32H7 #if defined(STM32H7) && CH_CFG_USE_HEAP
check_ecc_errors(); check_ecc_errors();
#endif #endif

View File

@ -533,7 +533,7 @@ void port_setbaud(uint32_t baudrate)
} }
#endif // BOOTLOADER_DEV_LIST #endif // BOOTLOADER_DEV_LIST
#ifdef STM32H7 #if defined(STM32H7) && CH_CFG_USE_HEAP
/* /*
check if flash has any ECC errors and if it does then erase all of check if flash has any ECC errors and if it does then erase all of
flash flash
@ -580,5 +580,5 @@ void check_ecc_errors(void)
} }
__enable_fault_irq(); __enable_fault_irq();
} }
#endif // STM32H7 #endif // defined(STM32H7) && CH_CFG_USE_HEAP

View File

@ -51,7 +51,9 @@ void thread_sleep_ms(uint32_t ms);
void custom_startup(void); void custom_startup(void);
#if defined(STM32H7) && CH_CFG_USE_HEAP
void check_ecc_errors(void); void check_ecc_errors(void);
#endif
// printf to debug uart (or USB) // printf to debug uart (or USB)
extern "C" { extern "C" {