How to detect last used address in flash?
Hi,
I would like to detect last used address in flash to be able to backup the firmware from internal flash memory to external from my bootloader. I know the start address where from start copying data, but don't know the end. I was unable to found a good working solution for detecting firmware "latest address" in flash. I tried to look after something to create custom linker script section at end of the flash with special data but I was unable to do it. My temponary solution currently is splitting the internal flash into two parts, use the first one for actual firmware and second for backup, which I don't want to use anymore since it's not effective.
Could somebody help with this? Thanks!