I want to use the STM32G474's flash to save some data, that I calculate in my application, similar to the G474 flash example.
The example starts using the Flash from page 32 on, which is safe since the example is only a few bytes large.
Is there a good way to find a safe starting page automatically?
One way would probably be, to reduce the LENGTH of the FLASH section in the linker script and then use pages beyond that at runtime on the G4, right?
In this case, I would have to adjust the FLASH length manually every time application changes size, which is not very nice imho.
Am I missing something obvious? 😕
I want to use the STM32G474's flash to save some data, that I calculate in my application, similar to the G474 flash example.
The example starts using the Flash from page 32 on, which is safe since the example is only a few bytes large.
Is there a good way to find a safe starting page automatically?
One way would probably be, to reduce the
LENGTHof theFLASHsection in the linker script and then use pages beyond that at runtime on the G4, right?In this case, I would have to adjust the FLASH length manually every time application changes size, which is not very nice imho.
Am I missing something obvious? 😕