Hi, everyone,
I'm using F2812 and CCS3.3
I set the jumper to 'boot to flash' and tried to flash out the example project on to my dsp. Everything works fine.
My project can run in internal memory. In order to let it work in flash memory, i changed the memory map and added memcpy and initflash functions into my c code file.And in order to test my project, i configured the pwm outputs. But I got nothing. It seemed that my project didn't run at all. Why is this? What I did is just a little bit change of memory map.
This is my .c file.
...................................
InitPieVectTable();
MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
InitFlash();
...................................
InitPWM();
for(i=0;i<6;i++)
PWM[i]=60;
SetPWMDIR(PWM,DIR);
The following is my .cmd file.
MEMORY
{
PAGE 0: /* Program Memory */
ZONE2 : origin = 0x080000, length = 0x080000
ZONE6 : origin = 0x100000, length = 0x080000
/* OTP : origin = 0x3D7800, length = 0x000800*/
BEGIN : origin = 0x3F7FF6, length = 0x000002
RAMH0 : origin = 0x3F8000, length = 0x002000
/* ROM : origin = 0x3FF000, length = 0x000FC0 */
RESET : origin = 0x3FFFC0, length = 0x000002
VECTORS : origin = 0x3FFFC2, length = 0x00003E
FLASHJ : origin = 0x3D8000, length = 0x002000 /* on-chip FLASH */
FLASHI : origin = 0x3DA000, length = 0x002000 /* on-chip FLASH */
FLASHH : origin = 0x3DC000, length = 0x004000 /* on-chip FLASH */
FLASHG : origin = 0x3E0000, length = 0x004000 /* on-chip FLASH */
FLASHF : origin = 0x3E4000, length = 0x004000 /* on-chip FLASH */
FLASHE : origin = 0x3E8000, length = 0x004000 /* on-chip FLASH */
FLASHD : origin = 0x3EC000, length = 0x004000 /* on-chip FLASH */
FLASHC : origin = 0x3F0000, length = 0x004000 /* on-chip FLASH */
FLASHB : origin = 0x3F4000, length = 0x002000 /* on-chip FLASH */
FLASHA : origin = 0x3F6000, length = 0x001F80 /* on-chip FLASH */
PAGE 1 : /* Data Memory */
RAMM0 : origin = 0x000000, length = 0x000400
RAMM1 : origin = 0x000400, length = 0x000400
ZONE2 : origin = 0x080000, length = 0x080000
ZONE6 : origin = 0x100000, length = 0x080000
CSM_PWL : origin = 0x3F7FF8, length = 0x000008
}
SECTIONS
{
/* codestart : > RAMH0 PAGE = 0 */
/* .text : > RAMH0 PAGE = 0 */
/* .switch : > RAMH0 PAGE = 0 */
/* .cinit : > RAMH0 PAGE = 0 */
/* .pinit : > RAMH0, PAGE = 0 */
/* .reset : > RESET, PAGE = 0, TYPE = DSECT */
/* .econst : > RAML1 PAGE = 1*/
/* ramfuncs : > RAML1 PAGE = 1 */
codestart : > FLASHE PAGE = 0
.text : > FLASHF PAGE = 0
.switch : > FLASHG PAGE = 0
.cinit : > FLASHH PAGE = 0
.pinit : > FLASHC, PAGE = 0
.econst : > FLASHB PAGE = 0
ramfuncs : LOAD = FLASHD,
RUN = RAMH0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
.reset : > RESET, PAGE = 0, TYPE = DSECT
.stack : > RAML1 PAGE = 1
.ebss : > RAML1 PAGE = 1
.esysmem : > ZONE6 PAGE = 1
.zone2data : > ZONE2 PAGE = 1
PieVectTableFile : > PIE_VECT, PAGE = 1
}
Thanks.
Any help is appreciated!