Is it possible to determine the maximal free/usable flash size at runtime? Assuming a memory layout as shown here, is there a register that keeps the end boundary of the application? something like UICR.BOOTLOADERADDR.
Is it possible to determine the maximal free/usable flash size at runtime? Assuming a memory layout as shown here, is there a register that keeps the end boundary of the application? something like UICR.BOOTLOADERADDR.
Thanks for pointing me into the right direction.
In Keil you can use these linker symbols to get location and length of the image.
extern uint32_t Load$$LR$$LR_IROM1$$Base; // Address of the load region.
extern uint32_t Load$$LR$$LR_IROM1$$Length; // Length of the load region in bytes.
extern uint32_t Load$$LR$$LR_IROM1$$Limit; // Address of the byte beyond the end of the load region.
uint32_t LROBase = (uint32_t)&Load$$LR$$LR_IROM1$$Base;
uint32_t LROLength = (uint32_t)&Load$$LR$$LR_IROM1$$Length;
uint32_t LROLimit = (uint32_t)&Load$$LR$$LR_IROM1$$Limit;
Thanks for pointing me into the right direction.
In Keil you can use these linker symbols to get location and length of the image.
extern uint32_t Load$$LR$$LR_IROM1$$Base; // Address of the load region.
extern uint32_t Load$$LR$$LR_IROM1$$Length; // Length of the load region in bytes.
extern uint32_t Load$$LR$$LR_IROM1$$Limit; // Address of the byte beyond the end of the load region.
uint32_t LROBase = (uint32_t)&Load$$LR$$LR_IROM1$$Base;
uint32_t LROLength = (uint32_t)&Load$$LR$$LR_IROM1$$Length;
uint32_t LROLimit = (uint32_t)&Load$$LR$$LR_IROM1$$Limit;