D.2 Recommended Migration Flow - Texas Instruments TMS320C28x Reference Manual

Dsp cpu and instruction set
Table of Contents

Advertisement

D.2 Recommended Migration Flow

Use the following steps (shown in Figure D−1) to migrate code:
1) Install the latest development tools for the C28x DSP (e.g. Code Compos-
er Studiot version 2.x or higher)
2) Build the project with following C28x assembler options:
−m20
; enable C2xLP instructions
− g
; enable source level debug to view the C2xLP
; instructions
−mw
; enable additional assembly checks
Code Composer Studio 2.x will assemble all C2xLP instructions and map
all the compatible instructions to their equivalent C28x instructions and
mnemonics. Code Composer Studio 2.x disassembly will display the in-
structions in the memory as C28x mnemonics only. If the source is built
with –g option, the relevant C2xLP source file will be also displayed and
will facilitate C2xLP instruction readability during debug.
3) Memory map:
Define your C28x device memory map with C2xLP compatible memory
sections. Build a linker command file (*.cmd). See Table D−8.
Select a C2xLP assembly source code *.asm for migration to C28x archi-
tecture.
4) Boot Code:
Add the C2xLP mode conversion code segment shown in section D.4.1 as
the first set of instructions after reset.
After reset, the C28x powers up in C27x object−compatible mode. Adding
these few lines of initialization code will place the device in the proper oper-
ating mode for executing reassembled C2xLP code.
Note:
The C27x object-compatible mode is for use only for migration from the C27x
CPU. It is a reserved operating mode for all C28x and C2xLP applications.
5) This step will facilitate faster code conversion. In the C2xLP source file
modify the interrupt section with suggestions from the reference table in
section D.5.
In particular, modify the following types of code:
a) IMR and IFR − See the example code in section D.4.2.
b) Context Save/Restore − See the example code in section D.4.3
c) Comment all the known incompatible instructions or map with equiva-
lent instructions. See Table E−2 in Appendix E.
Recommended Migration Flow
C2xLP Migration Guidelines
D-3

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C28x and is the answer not in the manual?

Table of Contents

Save PDF