AP_HAL_ChibiOS: entirely remove check_limit_flash_1M if not needed
taking up valuable space on non-F427 boards
This commit is contained in:
parent
5b6b18803e
commit
1cb4bc223d
@ -62,9 +62,11 @@ AP_FlashIface_JEDEC ext_flash;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#ifdef STM32F427xx
|
||||
if (BOARD_FLASH_SIZE > 1024 && check_limit_flash_1M()) {
|
||||
board_info.fw_size = (1024 - (FLASH_BOOTLOADER_LOAD_KB + APP_START_OFFSET_KB))*1024;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool try_boot = false;
|
||||
uint32_t timeout = HAL_BOOTLOADER_TIMEOUT;
|
||||
|
@ -565,9 +565,9 @@ unsigned int stm32_rand_generate_nonblocking(unsigned char* output, unsigned int
|
||||
/*
|
||||
see if we should limit flash to 1M on devices with older revisions of STM32F427
|
||||
*/
|
||||
#ifdef STM32F427xx
|
||||
bool check_limit_flash_1M(void)
|
||||
{
|
||||
#ifdef STM32F427xx
|
||||
const uint16_t revid = (*(uint32_t *)DBGMCU_BASE) >> 16;
|
||||
static const uint16_t badrevs[4] = { 0x1000, 0x1001, 0x1003, 0x1007 };
|
||||
for (uint8_t i=0; i<4; i++) {
|
||||
@ -575,6 +575,6 @@ bool check_limit_flash_1M(void)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user