Some general guidelines to save code in Flash Memory can be found here:
In order to store generated code in the internal Flash memory of the C28xx DSPs, you need a Flash Programmer (the TI Flash programmer is installed by default with Code Composer Studio). The following process guides you through the necessary steps in detail:
1. Drag the F2812, F2808, or F28335 Stand alone using Flash Memory Target Preference block into the model. This block can be found in Target Support Package TC2 >> C2000 Target Preferences. If you do not have Target Support Package TC2 installed or you have a different board, use the Custom Board block from Embedded IDE Link CC >> Target Preferences, and manually configure its parameters.
2. Press "Ctrl + E" to open the Configuration Parameters window. Select Real-Time Workshop >> Embedded IDE Link CC, and set the Build action to "Build". Apply the change and close the window.
3. Make sure the board is connected to your PC and turned on. Press "Ctrl + B" to build the mode. When this process is completed successfully, MATLAB command prompt displays:
### Build complete
and Code Composer Studio Output window displays:
0 Errors, 0 Warnings, 0 Remarks.
4. In Code Composer Studio, launch the Flash Programmer by selecting Tools >> F28xx On-Chip Flash Programmer. Select the radio button named "Erase, Program, Verify", and click on the "Execute Operation" button. Once this operation is completed, you should see the following message in the Code Composer Studio Output window:
Erase/Program/Verify Operation succeeded
**** End Erase/Program/Verify Operation. ***
5. In Code Composer Studio, Select Debug >> Disconnect. Then, unplug the power for the board, and physically disconnect the board from the PC.
6. Now that the code is saved in the C28xx DSP chip nonvolatile memory, you must set an indicator for the chip before you can run this code. This indicator is set by the Bootloader Modes of the particular chip. For example, on F2812 eZdsp, you need to change the jumper setting for JP7 from the factory default settings. On F2808 eZdsp, you need to change the switches 1 and 3 on bank SW1 from the factory default settings. On F28335 eZdsp, you need to change the switch 3 on bank SW1 from the factory default settings. For precise instructions, refer to the specific DSP Boot ROM Reference Guide found on the TI Web page:
and the Spectrum Digital ™ Reference Guides for the eZdsp chips:
Evaluation Modules and DSP Starter Kits > C2000 Family section:
7. To run the code in Flash Memory, turn on the board. The code starts to run as soon as the power is plugged in.