Locating Software in the FLASH Memory

Software may be located in either the volatile (static ram) or non-volatile (FLASH) memory. If you create a SoftConsole project from Libero (Write Application Code), Libero will create a SoftConsole project that compiles and links your code to be located in the static ram space. To load the program to this space, you must select the M3-Ram-Target when creating a Debug Configuration. When a Debug session is started, it loads the code to the static ram.  

Typically, the non-volatile memory space is not used for debugging because it has a limited number of writes before it fails. For mobile applications or the project demos, you may want your kit to run without being connected to SoftConsole. You can do this by loading the software into the FLASH memory. Then all you need to do to initiate your code is to connect power, press the RESET push button, then the PU_N push button.

To load your software into the FLASH memory you will need to locate the software for FLASH memory and then load it to FLASH memory. To locate the locate the code you will have to change the linker script file from esram.ld to envm.ld. To do this, select the application directory in the SoftConsole Project Explorer  ( ...._app) in SoftConsole, right click and select properties, C/C++ Build and Settings. Under Linker select Misc and you should see something like this.



The esram.ld file tells the linker to locate the software in the static ram space. To locate the program in the FLASH ram, change esram.ld to envm.ld. Click Apply and exit.

Next compile your code.

Finally, you must load the code to the FLASH ram. To do this you will need to specify a Debug Configuration for this purpose. Again, select the application directory in the SoftConsole Project Explorer  ( ...._app) in SoftConsole, right click and select Debug As, Debug Configurations. Next select eNVM ram target and create a new Debug Configuration . You should get something that looks like this.



Apply and run this Debug configuration. You can run the code from SoftConsole and debug just like you do for static ram or the code will run without SoftConsole. Just connect power through the USB cable, hit RESET push button and then PU_N  push button. Note, you need to have the debug cable (USB connection furthest from the expansion board connector) disconnected. Leave the USB cable nearest the expansion board connector connected to provide power and the UART0 connection if required.