I am developing an application on the 4100 BLE module and I need to reserve the last 160 rows of flash (address space 0001B0000 - 0001FFFF) for my user data. The flash that is not used for the firmware code appears to be cleared to 0's on reset and BLE stack load or unload. Is there a compiler directive that will prevent the underlying OS from clearing a specified section of memory?
Protecting the memory in the PSoC Creator 4.0 GUI only prevents any writes to the locations by F/W.
You can introduce a section in Linker script and declare an array in that section. But if that array is not used in the project then the compiler would optimize that section.