Spra958f Flash
Spra958f Flash
ABSTRACT
Several special requirements exist for running an application from on-chip flash memory
on the TMS320F28xx DSP. These requirements generally do not manifest themselves
during development in RAM since the Code Composer Studio™ debugger can mask
problems associated with initialized sections and how they are linked to memory. This
application report covers the requirements needed to properly configure application
software for execution from on-chip flash memory. Requirements for both DSP/BIOS™
and non-DSP/BIOS projects are presented. Some performance considerations and
techniques are also discussed. Example code projects are included that run from on-chip
flash on the eZdsp™ F2812 and eZdsp F2808 development boards (or alternately, any
F2801, F2806, F2808, F2810, F2811, or F2812 DSP board). Code examples that run
from internal RAM are also provided for completeness. These code examples provide a
starting point for code development, if desired.
Note that the issues discussed in this application report apply directly to current F281x
and F280x members of the TMS320F28xx DSP family, specifically the F2801, F2806,
F2808, F2810, F2811, and F2812 DSP devices. Applicability to future devices in the
F28xx family, although quite likely, is not guaranteed. In addition, the code and
techniques presented in this application report for DSP/BIOS projects was developed on
Code Composer Studio v3.1 using C-compiler v4.1.1 and DSP/BIOS v5.20. Earlier
versions of DSP/BIOS used a different configuration file format. It is suggested that the
reader upgrade to the latest version. Future versions of DSP/BIOS may have differences
that make some of the items discussed in this report unnecessary (although in all
likelihood backwards compatibility will be maintained, so that the techniques discussed
here should still work). The reader should keep this in mind if using a newer version.
Finally, this application report does not provide a tutorial on writing and building code for
the F28xx DSP. It is assumed that the reader already has at least the main framework of
their application code running from RAM, probably using the Code Composer Studio
debugger to perform the code download. This report only identifies the special items that
must be considered when moving the application into on-chip flash memory.
1
SPRA958F
Contents
1 Introduction .....................................................................................................................................3
2 Creating a User Linker Command File ..........................................................................................3
2.1 Non-DSP/BIOS Projects............................................................................................................3
2.2 DSP/BIOS Projects ...................................................................................................................4
3 Where to Link the Sections ............................................................................................................5
3.1 Non-DSP/BIOS Projects............................................................................................................5
3.2 DSP/BIOS Projects ...................................................................................................................7
4 Copying Sections from Flash to RAM ...........................................................................................9
4.1 Copying the Interrupt Vectors (non-DSP/BIOS projects only)...................................................9
4.2 Copying the .hwi_vec Section (DSP/BIOS projects only)........................................................10
4.3 Copying the .trcdata Section (DSP/BIOS projects only)..........................................................10
4.4 Initializing the Flash Control Registers (DSP/BIOS and non-DSP/BIOS projects) ..................12
4.5 Maximizing Performance by Executing Time-critical Functions from RAM .............................14
4.6 Maximizing Performance by Linking Critical Global Constants to RAM ..................................15
4.6.1 Method 1: Running All Constant Arrays from RAM .....................................................15
4.6.2 Method 2: Running a Specific Constant Array from RAM ...........................................18
5 Programming the Code Security Module Passwords................................................................19
6 Executing Your Code from Flash after a DSP Reset..................................................................23
7 Disabling the Watchdog Timer During C-Environment Boot ....................................................25
8 C-Code Examples..........................................................................................................................27
8.1 General Overview....................................................................................................................27
8.2 Directory Structure and File Utilizations ..................................................................................28
8.3 Additional Information..............................................................................................................33
References.............................................................................................................................................35
Revision History....................................................................................................................................36
Figures
Figure 1. Specifying the User Init Function in the DSP/BIOS Configuration tool ......................11
Figure 2. Specifying the Link Order In Code Composer Studio ..................................................17
Figure 3. DSP/BIOS MEM Properties for CSM Password Locations ...........................................22
Figure 4. DSP/BIOS MEM Properties for CSM Reserved Locations ............................................22
Figure 5. DSP/BIOS MEM Properties for Jump to Flash Entry Point...........................................24
Tables
Table 1. Section Linking in Non-DSP/BIOS Projects (Large memory model) .............................6
Table 2. Section Linking In DSP/BIOS Projects (Large Memory Model)......................................7
Table 3. Example Code File Directories........................................................................................28
Table 4. F281x Example Code File Inventory and Utilization .....................................................29
Table 5. F280x Example Code File Inventory and Utilization .....................................................31
1 Introduction
The TMS320F28xx DSP family has been designed for standalone operation in embedded
controller applications. The on-chip flash usually eliminates the need for external non-volatile
memory and a host processor from which to bootload. Configuring an application to run from
flash memory is a relatively easy matter provided that one follow a few simple steps. This report
covers the major concerns and steps needed to properly configure application software for
execution from internal flash memory. Requirements for both DSP/BIOS and non-DSP/BIOS
projects are presented. Some performance considerations and techniques are also discussed.
Note that the issues discussed in this application report apply directly to current F281x and
F280x members of the TMS320F28xx DSP family. Throughout the remainder of this report, the
term current F28xx devices will refer specifically to the F2801, F2806, F2808, F2810, F2811,
and F2812 DSP devices. Applicability to future devices in the F28xx family, although quite
likely, is not guaranteed. In addition, the code and techniques presented in this application
report for DSP/BIOS projects was developed on Code Composer Studio v3.1 using C-compiler
v4.1.1 and DSP/BIOS v5.20. Earlier versions of DSP/BIOS used a different configuration file
format. It is suggested that the reader upgrade to the latest version. Future versions of
DSP/BIOS may have differences that make some of the items discussed in this report
unnecessary (although in all likelihood backwards compatibility will be maintained, so that the
techniques discussed here should still work). The reader should keep this in mind if using a
newer version.
Finally, this application report does not provide a tutorial on writing and building code for the
F28xx DSP. It is assumed that the reader already has at least the main framework of their
application code running from RAM, probably using the Code Composer Studio debugger to
perform the code download. This report only identifies the special items that must be
considered when moving the application into on-chip flash memory.
CAUTION:
It is important that the large memory model be used with the C-compiler (as
opposed to the small memory model). Small memory model requires certain
initialized sections to be linked to non-volatile memory in the lower 64Kw of
addressable space. However, no flash memory is present in this region on any
current F28xx devices, and this will likely be true for future F28xx devices as
well. Therefore, large memory model should be used. In Code Composer
Studio, the large memory model is on the Project → Build_Options menu. Select
the Compiler tab, choose the Advanced category, and check the -ml option box.
For non-DSP/BIOS projects, one should include the large memory model C-
compiler runtime support library, rts2800_ml.lib, into their code project (as
opposed to rts2800.lib, which is for the small memory model). For DSP/BIOS
projects, DSP/BIOS will take care of including the required library. The user
should not include the rts2800_ml.lib (or rts2800.lib) library into a DSP/BIOS
project.
Table 1 Notes:
1
The .reset section contains nothing more than a 32-bit interrupt vector that points to the
C-compiler boot function in the runtime support library (the _c_int00 routine). It generally is not
used. Instead, the user typically creates their own branch instruction to point to the starting point
of the code (see Sections 6 and 7). When not in use, the .reset section should be omitted from
the code build by using a DSECT modifier in the linker command file. For example:
/********************************************************************
* User's linker command file
********************************************************************/
SECTIONS
{
.reset : > FLASH, PAGE = 0, TYPE = DSECT
}
Table 2 Notes:
1
The .trcdata section must be copied by the user from its load address (specified on the
Load_Address tab) to its run address (specified on the BIOS_Data tab) at runtime. See Section
4.3 for details on performing this copy.
2
The PIEVECT RAM is a specific block of RAM associated with the Peripheral Interrupt
Expansion (PIE) peripheral. On current F28xx devices, the PIE RAM is a 256x16 block starting
at address 0x000D00 in data space. For other devices, confirm the address in the device
datasheet. The memory section manager in the DSP/BIOS configuration tool should already
have a pre-defined memory named PIEVECT. The .hwi_vec section must be copied by the user
from its load address (specified on the memory section manager Load_Address Tab) to its run
address (specified on the memory section manager BIOS_Code Tab) at runtime. See Section
4.2 for details on performing this copy.
3
The specific flash memory selected as the load address for this section should be the same
flash memory selected previously as the run address for the section (e.g., on the BIOS_Data,
BIOS_Code, or Compiler_Sections tab).
/********************************************************************
* User's C-source file
********************************************************************/
/********************************************************************
* NOTE: This function assumes use of the DSP281x or DSP280x Header
* File structures (TI Literature #SPRC097 and #SPRC191).
********************************************************************/
#include <string.h>
void main(void)
{
/*** Initialize the PIE_RAM ***/
PieCtrlRegs.PIECTRL.bit.ENPIE = 0; // Disable the PIE
asm(" EALLOW"); // Enable EALLOW protected register access
memcpy((void *)0x000D00, &PieVectTableInit, 256);
asm(" EDIS"); // Disable EALLOW protected register access
}
The above example uses a hard coded address for the start of the PIE RAM, specifically
0x000D00. If this is objectionable (as hard coded addresses are not good programming
practice), one can use a DATA_SECTION pragma to create an uninitialized dummy variable,
and link this variable to the PIE RAM. The name of the dummy variable can then be used in
place of the hard coded address. For example, when using the DSP281x or DSP280x
peripheral structures, an uninitialized structure called PieVectTable is created and linked over
the PIEVECT RAM. The memcpy() instruction in the previous example can be replaced by:
memcpy(&PieVectTable, &PieVectTableInit, 256);
Note that the length is 256. The memcpy function copies 16-bit words (as opposed to copying
128 32-bit words).
/********************************************************************
* User's C-source file
********************************************************************/
#include <string.h>
void main(void)
{
/*** Initialize the .hwi_vec section ***/
asm(" EALLOW"); /* Enable EALLOW protected register access */
memcpy(&hwi_vec_runstart,
&hwi_vec_loadstart,
&hwi_vec_loadend - &hwi_vec_loadstart);
Figure 1. Specifying the User Init Function in the DSP/BIOS Configuration tool
What remains is to create the user initialization function. The DSP/BIOS configuration tool
generates global symbols that can be accessed by code in order to determine the load address,
run address, and length of each section. These symbol names are:
trcdata_loadstart
trcdata_loadend
trcdata_runstart
Each symbol is self-explanatory from its name. Note that the symbols are not pointers, but
rather symbolically reference the 16-bit data value found at the corresponding location (i.e., start
or end) of the section. The C-compiler runtime support library contains a memory copy function
called memcpy() that can be used to perform the copy task. A C-code example of a user init
function that performs the .trcdata section copy follows.
#include <string.h>
void UserInit(void)
{
/*** Initialize the .trcdata section before main() ***/
memcpy(&trcdata_runstart,
&trcdata_loadstart,
&trcdata_loadend - &trcdata_loadstart);
}
4.4 Initializing the Flash Control Registers (DSP/BIOS and non-DSP/BIOS projects)
The initialization code for the flash control registers, FOPT, FPWR, FSTDBYWAIT,
FACTIVEWAIT, FBANKWAIT, and FOTPWAIT, cannot be executed from the flash memory or
unpredictable results may occur. Therefore, the initialization function for the flash control
registers must be copied from flash (its load address) to RAM (its run address) at runtime.
CAUTION:
The flash control registers are protected by the Code Security Module (CSM). If
the CSM is secured, you must run the flash register initialization code from
secured RAM (e.g., L0 or L1 SARAM) or the initialization code will be unable to
access the flash registers. Note that the CSM is always secured at device reset,
although the ROM bootloader will unlock it if you are using dummy passwords
of 0xFFFF.
The CODE_SECTION pragma of the C compiler can be used to create a separately linkable
section for the flash initialization function. For example, suppose the flash register configuration
is to be performed in the C function InitFlash(), and it is desired to place this function into a
linkable section called secureRamFuncs. The following C-code example shows proper use of
the CODE_SECTION pragma along with an example configuration of the flash registers:
/********************************************************************
* NOTE: The InitFlash() function shown here is just an example of an
* initialization for the flash control registers. Consult the device
* datasheet for production wait state values and any other relevant
* information. Wait-states shown here are specific to current F280x
* devices operating at 100 MHz.
* Also, this function assumes use of the DSP281x or DSP280x Header
* File structures (TI Literature #SPRC097 and #SPRC191).
********************************************************************/
/*** Force a complete pipeline flush to ensure that the write to the last register
configured occurs before returning. Safest thing is to wait 8 full cycles. ***/
} //end of InitFlash()
The section secureRamFuncs can then be linked using the user linker command file. This
section will require separate load and run addresses. Further, we will want to have the linker
generate some global symbols that can be used to determine the load address, run address,
and length of the section. This information is needed to perform the copy from the sections load
address to its run address. The user linker command file would appear as follows:
/********************************************************************
* User's linker command file
********************************************************************/
SECTIONS
{
/*** User Defined Sections ***/
secureRamFuncs: LOAD = FLASH, PAGE = 0
RUN = SECURE_RAM, PAGE = 0
RUN_START(_secureRamFuncs_runstart),
LOAD_START(_secureRamFuncs_loadstart),
LOAD_END(_secureRamFuncs_loadend)
}
/********************************************************************
* User's C-source file
********************************************************************/
#include <string.h>
void main(void)
{
/* Copy the secureRamFuncs section */
memcpy(&secureRamFuncs_runstart,
&secureRamFuncs_loadstart,
&secureRamFuncs_loadend - &secureRamFuncs_loadstart);
/********************************************************************
* User's linker command file
********************************************************************/
SECTIONS
{
.econst: LOAD = FLASH, PAGE = 0
RUN = RAM, PAGE = 1
RUN_START(_econst_runstart),
LOAD_START(_econst_loadstart),
LOAD_END(_econst_loadend)
}
#include <string.h>
void main(void)
{
/* Copy the .econst section */
memcpy(&econst_runstart,
&econst_loadstart,
&econst_loadend - &econst_loadstart);
}
/********************************************************************
* User's linker command file (DSP/BIOS Projects)
********************************************************************/
SECTIONS
{
/*** Preemptively link the .econst section ***/
/* Must come before DSP/BIOS linker command file is evaluated */
To guarantee that the user linker command file is evaluated before the DSP/BIOS generated
linker command file during the project build, one must specify the link order in Code Composer
Studio. This is done by clicking on Project → Build_Options, selecting the Link_Order tab, and
then specifying the appropriate order for the linker command files in question. Figure 2 shows
an example of this, where f2808_BIOS_flash.cmd is the name of the user linker command file,
and example_BIOS_flashcfg.cmd is the name of the DSP/BIOS generated linker command file.
Note that since the DSP/BIOS generated linker command file will also attempt to link the .econst
section, the linker will give a warning stating "Multiple definitions of SECTION named '.econst'."
This warning can be safely ignored.
The .econst section can then be copied from its load address to its run address as follows:
#include <string.h>
void main(void)
{
/* Copy the .econst section */
memcpy(&econst_runstart,
&econst_loadstart,
&econst_loadend - &econst_loadstart);
}
/********************************************************************
* User's C-source file
********************************************************************/
void main(void)
{
The section ramconsts is linked to load to flash but run from RAM using the user linker
command file, and global symbols are generated to facilitate the memory copy. The user linker
command file would appear as follows:
SECTIONS
{
/*** User Defined Sections ***/
ramconsts: LOAD = FLASH, PAGE = 0
RUN = RAM, PAGE = 1
LOAD_START(_ramconsts_loadstart),
LOAD_END(_ramconsts_loadend),
RUN_START(_ramconsts_runstart)
}
Finally, table[ ] must be copied from its load address to its run address at runtime:
/********************************************************************
* User's C-source file
********************************************************************/
#include <string.h>
void main(void)
{
/* Initialize the ramconsts section */
memcpy(&ramconsts_runstart,
&ramconsts_loadstart,
&ramconsts_loadend - &ramconsts_loadstart);
}
***********************************************************************
* File: passwords.asm
***********************************************************************
***********************************************************************
* Dummy passwords of 0xFFFF are shown. The user can change these to
* desired values.
*
* CAUTION: Do not use 0x0000 for all 8 passwords or the CSM module will
* be permanently locked. See the "TMS320x281x System Control and
* Interrupts Peripheral Reference Guide" (SPRU078) or the "TMS320x280x
* System Control and Interrupts Peripheral Reference Guide" (SPRU712)
* for more information.
***********************************************************************
.sect "passwords"
.int 0xFFFF ;PWL0 (LSW of 128-bit password)
.int 0xFFFF ;PWL1
.int 0xFFFF ;PWL2
.int 0xFFFF ;PWL3
.int 0xFFFF ;PWL4
.int 0xFFFF ;PWL5
.int 0xFFFF ;PWL6
.int 0xFFFF ;PWL7 (MSW of 128-bit password)
;----------------------------------------------------------------------
.sect "csm_rsvd"
.loop (3F7FF5h - 3F7F80h + 1)
.int 0x0000
.endloop
;----------------------------------------------------------------------
Note that this example is showing dummy password values of 0xFFFF. Replace these values
with your desired passwords.
/********************************************************************
* User's user linker command file (non-DSP/BIOS Projects)
********************************************************************/
MEMORY
{
PAGE 0: /* Program Memory */
CSM_RSVD : origin = 0x3F7F80, length = 0x000076
PASSWORDS : origin = 0x3F7FF8, length = 0x000008
PAGE 1: /* Data Memory */
}
SECTIONS
{
/*** Code Security Password Locations ***/
passwords: > PASSWORDS, PAGE = 0
csm_rsvd: > CSM_RSVD, PAGE = 0
}
For DSP/BIOS projects, the user should define the memories named (for example)
PASSWORDS and CSM_RSVD using the memory section manager of the DSP/BIOS
configuration tool. The two figures that follow show the DSP/BIOS memory section manager
properties for these memories on current F28xx devices. For other devices, consult the device
datasheet to confirm the correct addresses and lengths.
/********************************************************************
* User's linker command file (DSP/BIOS Projects)
********************************************************************/
SECTIONS
{
/*** Code Security Password Locations ***/
passwords: > PASSWORDS, PAGE = 0
csm_rsvd: > CSM_RSVD, PAGE = 0
}
***********************************************************************
* CodeStartBranch.asm
***********************************************************************
.ref _c_int00
.sect "codestart"
LB _c_int00 ;branch to start of code
/********************************************************************
* User's linker command file (non-DSP/BIOS Projects)
********************************************************************/
MEMORY
{
PAGE 0: /* Program Memory */
BEGIN_FLASH : origin = 0x3F7FF6, length = 0x000002
PAGE 1: /* Data Memory */
}
SECTIONS
{
/*** Jump to Flash boot mode entry point ***/
codestart: > BEGIN_FLASH, PAGE = 0
}
For DSP/BIOS projects, the user should define the memory named (for example)
BEGIN_FLASH using the memory section manager of the DSP/BIOS configuration tool. Figure
5 shows the memory section manager properties for this memory on current F28xx devices. For
other devices, consult the datasheet to confirm the boot to flash target address.
/********************************************************************
* User's linker command file (DSP/BIOS projects)
********************************************************************/
SECTIONS
{
/*** Jump to Flash boot mode entry point ***/
codestart: > BEGIN_FLASH, PAGE = 0
}
the "5" is placed into the initialized section .cinit, whereas space is reserved in the .ebss section
for the symbol "x." The _c_int00 routine then copies the "5" to location "x" at runtime. When a
large number of initialized global and static variables are present in the software, the watchdog
timer can timeout before the C-environment boot routine can finish and call main() (where the
watchdog can be either configured and serviced, or disabled). This problem may not manifest
itself during code development in RAM since the data copy from a .cinit section linked to RAM
will occur at a fast pace. However, when the .cinit section is linked to internal flash, copying
each data word will take multiple cycles since the internal flash memory defaults to the
maximum number of wait-states (wait-states are not configured until the user code reaches
main()). In addition, the code performing the data copying is executing from flash, which further
increases the time needed to complete the data copy (the code fetches and data reads must
share access to the flash). Combined with the fact that the watchdog timeout period defaults to
its minimum possible value, a watchdog timeout becomes a real possibility.
There is an easy method to detect this problem using Code Composer Studio. To test for a
watchdog timeout:
1. Load the symbols for the code you have programmed into the flash
(click File → Load_Symbols → Load_Symbols_Only).
3. Restart the DSP (click Debug → Restart) (this step is not necessary if the bootloader is
configured for "Jump to Flash" mode).
***********************************************************************
* File: CodeStartBranch.asm
* Devices: TMS320F2801, F2806, F2808, F2810, F2811, F2812
* Author: David M. Alter, Texas Instruments Inc.
* History: 02/11/05 - original (D. Alter)
***********************************************************************
.ref _c_int00
***********************************************************************
* Function: codestart section
* Description: Branch to code starting point
***********************************************************************
.sect "codestart"
.if WD_DISABLE == 1
LB wd_disable ;Branch to watchdog disable code
.else
LB _c_int00 ;Branch to start of boot.asm in RTS library
.endif
;end codestart section
***********************************************************************
* Function: wd_disable
* Description: Disables the watchdog timer
***********************************************************************
.if WD_DISABLE == 1
.text
wd_disable:
EALLOW ;Enable EALLOW protected register access
MOVZ DP, #7029h>>6 ;Set data page for WDCR register
MOV @7029h, #0068h ;Set WDDIS bit in WDCR to disable WD
EDIS ;Disable EALLOW protected register access
LB _c_int00 ;Branch to start of boot.asm in RTS library
.endif
;end wd_disable
***********************************************************************
• Toggles the GPIOF14 pin on the eZdsp F2812 board, or the GPIOF34 pin on eZdspF2808,
to blink the LED on the board. In non-DSP/BIOS projects, this is done in the ADCINT ISR.
In DSP/BIOS projects, a periodic function is used.
• Services the ADC interrupt. The ADC result is placed in a circular buffer of length 50 words.
• Sends out 2 kHz symmetric PWM on either the PWM1 pin (for F281x), or on the ePWM1A
signal mapped to the GPIO0 pin (for F280x).
• Configures the (enhanced) capture unit #1. On F280x devices, the eCAP1 signal is
mapped to the GPIO5 pin.
• Services the capture #1 interrupt. Reads the capture result and computes the pulse width.
example_nonBIOS_ram
example_nonBIOS_flash
example_BIOS_ram
example_BIOS_flash
Filename
eZdspF2812\cmd\f2812_BIOS_flash.cmd
eZdspF2812\cmd\f2812_BIOS_ram.cmd
eZdspF2812\cmd\f2812_nonBIOS_flash.cmd
eZdspF2812\cmd\f2812_nonBIOS_ram.cmd
eZdspF2812\DSP281x_headers\cmd\DSP281x_Headers_BIOS.cmd1
eZdspF2812\DSP281x_headers\cmd\DSP281x_Headers_nonBIOS.cmd1
eZdspF2812\DSP281x_headers\include\DSP281x_Adc.h1
eZdspF2812\DSP281x_headers\include\DSP281x_CpuTimers.h1
eZdspF2812\DSP281x_headers\include\DSP281x_DevEmu.h1
eZdspF2812\DSP281x_headers\include\DSP281x_Device.h1
eZdspF2812\DSP281x_headers\include\DSP281x_ECan.h1
eZdspF2812\DSP281x_headers\include\DSP281x_Ev.h1
eZdspF2812\DSP281x_headers\include\DSP281x_Gpio.h1
eZdspF2812\DSP281x_headers\include\DSP281x_Mcbsp.h1
eZdspF2812\DSP281x_headers\include\DSP281x_PieCtrl.h1
eZdspF2812\DSP281x_headers\include\DSP281x_PieVect.h1 2 2
eZdspF2812\DSP281x_headers\include\DSP281x_Sci.h1
eZdspF2812\DSP281x_headers\include\DSP281x_Spi.h1
eZdspF2812\DSP281x_headers\include\DSP281x_SysCtrl.h1
eZdspF2812\DSP281x_headers\include\DSP281x_Xintf.h1
eZdspF2812\DSP281x_headers\include\DSP281x_XIntrupt.h1
eZdspF2812\include\DSP281x_DefaultIsr.h1
eZdspF2812\include\example_BIOS.h
eZdspF2812\include\example_nonBIOS.h
eZdspF2812\projects\example_BIOS_flash.pjt
eZdspF2812\projects\example_BIOS_flash.tcf
eZdspF2812\projects\example_BIOS_flashcfg.cmd3
eZdspF2812\projects\example_BIOS_ram.pjt
eZdspF2812\projects\example_BIOS_ram.tcf
eZdspF2812\projects\example_BIOS_ramcfg.cmd3
eZdspF2812\projects\example_nonBIOS_flash.pjt
eZdspF2812\projects\example_nonBIOS_ram.pjt
eZdspF2812\src\Adc.c
eZdspF2812\src\CodeStartBranch.asm
eZdspF2812\src\DefaultIsr_BIOS.c
eZdspF2812\src\DefaultIsr_nonBIOS.c
eZdspF2812\src\DelayUs.asm
eZdspF2812\src\DSP281x_GlobalVariableDefs.c1
eZdspF2812\src\Ev.c
eZdspF2812\src\Gpio.c
eZdspF2812\src\main_BIOS.c
eZdspF2812\src\main_nonBIOS.c
eZdspF2812\src\passwords.asm
eZdspF2812\src\PieCtrl_BIOS.c
eZdspF2812\src\PieCtrl_nonBIOS.c
eZdspF2812\src\PieVect_nonBIOS.c
eZdspF2812\src\SetDBGIER.asm
eZdspF2812\src\SysCtrl.c
eZdspF2812\src\Xintf.c
eZdspF2812\disclaimer.txt Documentation file
eZdspF2812\readme.txt Documentation file
Table 4 Notes:
1
This file is identical to the file of the same name found in the \v100\DSP281x_Headers
subdirectory of the DSP281x Header File structures, v1.00 (see reference [10]).
2
Although DSP281x_PieVect.h is included into the flash projects, the structure PieVectTable
that it defines (and which is linked over the PIEVECT RAM) is not actually used by the code in
DSP/BIOS projects. It is included more for completeness, and to assist with debug (e.g., for
viewing the PIE vectors in a watch window).
3
The files example_BIOS_flashcfg.cmd and example_BIOS_ramcfg.cmd are created by the
DSP/BIOS configuration tool and should not be modified by the user. They are provided here
only to avoid a project open error message from Code Composer Studio. The files
example_BIOS_flash.tcf and example_BIOS_ram.tcf contain everything Code Composer Studio
needs to create these two .cmd files at project build time.
example_nonBIOS_ram
example_nonBIOS_flash
example_BIOS_ram
example_BIOS_flash
Filename
eZdspF2808\cmd\f2808_BIOS_flash.cmd
eZdspF2808\cmd\f2808_BIOS_ram.cmd
eZdspF2808\cmd\f2808_nonBIOS_flash.cmd
eZdspF2808\cmd\f2808_nonBIOS_ram.cmd
eZdspF2808\DSP280x_headers\cmd\DSP280x_Headers_BIOS.cmd1
eZdspF2808\DSP280x_headers\cmd\DSP280x_Headers_nonBIOS.cmd1
eZdspF2808\DSP280x_headers\include\DSP280x_Adc.h1
eZdspF2808\DSP280x_headers\include\DSP280x_CpuTimers.h1
eZdspF2808\DSP280x_headers\include\DSP280x_DevEmu.h1
eZdspF2808\DSP280x_headers\include\DSP280x_Device.h1
eZdspF2808\DSP280x_headers\include\DSP280x_ECan.h1
eZdspF2808\DSP280x_headers\include\DSP280x_ECap.h1
eZdspF2808\DSP280x_headers\include\DSP280x_EPwm.h1
eZdspF2808\DSP280x_headers\include\DSP280x_EQep.h1
eZdspF2808\DSP280x_headers\include\DSP280x_Gpio.h1
eZdspF2808\DSP280x_headers\include\DSP280x_I2c.h1
eZdspF2808\DSP280x_headers\include\DSP280x_PieCtrl.h1
eZdspF2808\DSP280x_headers\include\DSP280x_PieVect.h1 2 2
eZdspF2808\DSP280x_headers\include\DSP280x_Sci.h1
eZdspF2808\DSP280x_headers\include\DSP280x_Spi.h1
eZdspF2808\DSP280x_headers\include\DSP280x_SysCtrl.h1
eZdspF2808\DSP280x_headers\include\DSP280x_XIntrupt.h1
eZdspF2808\include\DSP280x_DefaultIsr.h1
eZdspF2808\include\example_BIOS.h
eZdspF2808\include\example_nonBIOS.h
eZdspF2808\projects\example_BIOS_flash.pjt
eZdspF2808\projects\example_BIOS_flash.tcf
eZdspF2808\projects\example_BIOS_flashcfg.cmd3
eZdspF2808\projects\example_BIOS_ram.pjt
eZdspF2808\projects\example_BIOS_ram.tcf
eZdspF2808\projects\example_BIOS_ramcfg.cmd3
eZdspF2808\projects\example_nonBIOS_flash.pjt
eZdspF2808\projects\example_nonBIOS_ram.pjt
eZdspF2808\src\Adc.c
eZdspF2808\src\CodeStartBranch.asm
eZdspF2808\src\DefaultIsr_BIOS.c
eZdspF2808\src\DefaultIsr_nonBIOS.c
eZdspF2808\src\DelayUs.asm
eZdspF2808\src\DSP280x_GlobalVariableDefs.c1
eZdspF2808\src\ECap.c
eZdspF2808\src\EPwm.c
eZdspF2808\src\Gpio.c
eZdspF2808\src\main_BIOS.c
eZdspF2808\src\main_nonBIOS.c
eZdspF2808\src\passwords.asm
eZdspF2808\src\PieCtrl_BIOS.c
eZdspF2808\src\PieCtrl_nonBIOS.c
eZdspF2808\src\PieVect_nonBIOS.c
eZdspF2808\src\SetDBGIER.asm
eZdspF2808\src\SysCtrl.c
eZdspF2808\disclaimer.txt Documentation file
eZdspF2808\readme.txt Documentation file
Table 5 Notes:
1
This file is identical to the file of the same name found in the \v120\DSP280x_Headers
subdirectory of the DSP280x Header File structures, v1.20 (see reference [11]).
2
Although DSP280x_PieVect.h is included into the flash projects, the structure PieVectTable
that it defines (and which is linked over the PIEVECT RAM) is not actually used by the code in
DSP/BIOS projects. It is included more for completeness, and to assist with debug (e.g., for
viewing the PIE vectors in a watch window).
3
The files example_BIOS_flashcfg.cmd and example_BIOS_ramcfg.cmd are created by the
DSP/BIOS configuration tool and should not be modified by the user. They are provided here
only to avoid a project open error message from Code Composer Studio. The files
example_BIOS_flash.tcf and example_BIOS_ram.tcf contain everything Code Composer Studio
needs to create these two .cmd files at project build time.
References
1. TMS320F2810, TMS320F2811, TMS320F2812, TMS320C2810, TMS320C2811,
TMS320C2812 Digital Signal Processors Data Manual (SPRS174)
2. TMS320F2808, TMS320F2806, TMS320F2801, UCD9510 Digital Signal Processors
Data Manual (SPRS230)
3. TMS320C28x Optimizing C/C++ Compiler User’s Guide (SPRU514)
4. TMS320x281x System Control and Interrupts Peripheral Reference Guide (SPRU078)
5. TMS320x280x System Control and Interrupts Peripheral Reference Guide (SPRU712)
6. TMS320C28x Assembly Language Tools User’s Guide (SPRU513)
7. TMS320x281x DSP Boot ROM Reference Guide (SPRU095)
8. TMS320x280x DSP Boot ROM Reference Guide (SPRU722)
9. TMS320C28x DSP CPU and Instruction Set Reference Guide (SPRU430)
10. C281x C/C++ Header Files and Peripheral Example Code (SPRC097)
11. C280x C/C++ Header Files and Peripheral Example Code (SPRC191)
Revision History
memcpy(&econst_runstart,
&econst_loadstart,
&econst_loadend - &econst_loadstart + 1);
Is now:
memcpy(&econst_runstart,
&econst_loadstart,
&econst_loadend - &econst_loadstart);
- Fixed italics on references 4 and 5.
- Fixed code comment in main_BIOS.c and main_nonBIOS.c to say
memcpy() instead of far_memcpy().
SPRA958A Nov. 2003 D. Alter - Corrected RAMH0 length in files f2812_nonBIOS_ram.cmd and
f2812_nonBIOS_flash.cmd.
- Added .cio section to f2812_nonBIOS_ram.cmd and
f2812_nonBIOS_flash.cmd.
- Added .cio section to Table 1.
- Removed c:\ti2\c2000\rtdx\include and c:\ti2\c2000\bios\include search
paths from f2812_nonBIOS_ram.pjt and f2812_nonBIOS_flash.pjt, Project
-> Build_Options, Compiler Tab, Preprocessor Category, Include search
path. They are not needed.
- Fixed .trcdata section copy instructions in Section 4 to require copy to be
done before main(). Modified example_BIOS_ram and
example_BIOS_flash example code to incorporate this.
- Tested code with C2000 Code Composer Studio v2.21.04.
SPRA958 Sept. 2003 D. Alter - Original
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications,
enhancements, improvements, and other changes to its products and services at any time and to
discontinue any product or service without notice. Customers should obtain the latest relevant information
before placing orders and should verify that such information is current and complete. All products are sold
subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in
accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent
TI deems necessary to support this warranty. Except where mandated by government requirements, testing
of all parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible
for their products and applications using TI components. To minimize the risks associated with customer
products and applications, customers should provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent
right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine,
or process in which TI products or services are used. Information published by TI regarding third-party
products or services does not constitute a license from TI to use such products or services or a warranty or
endorsement thereof. Use of such information may require a license from a third party under the patents or
other intellectual property of the third party, or a license from TI under the patents or other intellectual
property of TI.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without
alteration and is accompanied by all associated warranties, conditions, limitations, and notices.
Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not
responsible or liable for such altered documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for
that product or service voids all express and any implied warranties for the associated TI product or service
and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.
Following are URLs where you can obtain information on other Texas Instruments products and application
solutions:
Products Applications
Amplifiers amplifier.ti.com Audio www.ti.com/audio
Data Converters dataconverter.ti.com Automotive www.ti.com/automotive
DSP dsp.ti.com Broadband www.ti.com/broadband
Interface interface.ti.com Digital Control www.ti.com/digitalcontrol
Logic logic.ti.com Military www.ti.com/military
Power Mgmt power.ti.com Optical Networking www.ti.com/opticalnetwork
Microcontrollers microcontroller.ti.com Security www.ti.com/security
Telephony www.ti.com/telephony
Video & Imaging www.ti.com/video
Wireless www.ti.com/wireless