HAL_ChibiOS: fixed build with our old compiler
gcc 4.9 doesn't like static_assert() in C code
This commit is contained in:
parent
bde8ed37c3
commit
6c1be255bd
@ -127,10 +127,12 @@ static const uint32_t flash_memmap[STM32_FLASH_NPAGES] = { KB(32), KB(32), KB(32
|
|||||||
#error "Unsupported processor for flash.c"
|
#error "Unsupported processor for flash.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && __GNUC__ >= 6
|
||||||
#ifdef STORAGE_FLASH_PAGE
|
#ifdef STORAGE_FLASH_PAGE
|
||||||
static_assert(STORAGE_FLASH_PAGE < STM32_FLASH_NPAGES,
|
static_assert(STORAGE_FLASH_PAGE < STM32_FLASH_NPAGES,
|
||||||
"STORAGE_FLASH_PAGE out of range");
|
"STORAGE_FLASH_PAGE out of range");
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// keep a cache of the page addresses
|
// keep a cache of the page addresses
|
||||||
#ifndef STM32_FLASH_FIXED_PAGE_SIZE
|
#ifndef STM32_FLASH_FIXED_PAGE_SIZE
|
||||||
|
Loading…
Reference in New Issue
Block a user