This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32 Flash compiler symbols

This is a bit of a noob question. I want to use a block of the STM32 flash in order to store some user data. So for example, the STM32F103ZE has 512KB flash & I want to use the top 64KB. The end user will have commands available in order to read & modify the data contained in this area.

The project option target tab shows that the start address is 0x8000000, & the size is 0x80000. So to allocate myself 64KB, I hve changed the size to 0x70000. So now I want to check during compilation that the target size never exceeds 0x70000, and if it does, to generate a build error, just in case someone else comes along and accidently sets the size back to 0x80000. I can't find what compiler symbol refers to the target size & start address. I can find the run-time symbols, but I would rather generate a compile error, rather than a run-time error. Does anyone please know how to implement this check?

regards

RTC

0