Question
How to detect the flash size at compile time ?
Is there a preprocessor define of the flash size available at compile time ?
I know that the flash size can be read at run-time from the FLASH_SIZE_DATA_REGISTER but I need the value for a constexpr.
I found only the following definitions - but this is not sufficient to calculate the flash size (examples for a STM32F103 device):
FLASH_BASE: 0x08000000UL
FLASH_BANK1_END: 0x0801FFFFUL
FLASH_PAGE_SIZE: 0x400e.g. the number of pages would be nice :smiling_face_with_smiling_eyes:
Thanks!
