EasyManuals Logo

Texas Instruments C2000 Workshop Guide And Lab Manual

Texas Instruments C2000
342 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #288 background imageLoading...
Page #288 background image
Lab 12: Programming the Flash
12 - 18 C2000 Microcontroller Workshop - System Design
Initializing the CLA
Previously, the named section Cla1Progcontaining the CLA program tasks was linked
directly to the CPU memory block L3DPSARAM for both load and run purposes. At runtime, all
the code did was map the L3DPSARAM block to the CLA program memory space during CLA
initialization. For an embedded application, the CLA program tasks are linked to load to flash
and run from RAM. At runtime, the CLA program tasks must be copied from flash to
L3DPSARAM. The memory copy function memcpy() will once again be used to perform the
copy. After the copy is performed, the L3DPSARAM block will then be mapped to CLA program
memory space as was done in the earlier lab.
16. Open and inspect Lab_12.cmd. Notice that the named section Cla1Progwill now
load to flash (load address) but will run from L3DPSARAM (run address). The linker will
also be used to generate symbols for the load start, load size, and run start addresses.
17. Open Cla_12.c and notice that the memory copy function memcpy() is being used to
copy the CLA program code from flash to L3DPSARAM using the symbols generated by
the linker. Just after the copy the Cla1Regs structure is used to configure the
L3DPSARAM block as CLA program memory space. Close the inspected files.
Build Lab.out
18. Click the Build” button to generate the Lab.out file to be used with the CCS Flash
Programmer. Check for errors in the Problems window.
Programming the On-Chip Flash Memory
In CCS the on-chip flash programmer is integrated into the debugger. When the program is
loaded CCS will automatically determine which sections reside in flash memory based on the
linker command file. CCS will then program these sections into the on-chip flash memory.
Additionally, in order to effectively debug with CCS, the symbolic debug information (e.g.,
symbol and label addresses, source file links, etc.) will automatically load so that CCS knows
where everything is in your code. Clicking the “Debug” button in the “CCS Edit Perspective
will automatically launch the debugger, connect to the target, and program the flash memory in a
single step.
19. Program the flash memory by clicking the Debug” button (green bug). (If needed,
when the “Progress Information” box opens selectDetails >> in order to watch
the programming operation and status). After successfully programming the flash
memory the “Progress Information” box will close.
Running the Code Using CCS
20. Reset the CPU using the “Reset CPU” button or click:
Run Reset Reset CPU
The program counter should now be at address 0x3FF75C in the “Disassembly” window,
which is the start of the bootloader in the Boot ROM. If needed, click on the “View
Disassembly…” button in the window that opens, or click View Disassembly.

Table of Contents

Other manuals for Texas Instruments C2000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments C2000 and is the answer not in the manual?

Texas Instruments C2000 Specifications

General IconGeneral
BrandTexas Instruments
ModelC2000
CategoryMicrocontrollers
LanguageEnglish

Related product manuals