This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hello master,
I want to make the program run in the external sram(Zero 7), the CMD file is following:
MEMORY { PAGE 0 : /* BEGIN is used for the "boot to SARAM" bootloader mode */ BEGIN : origin = 0x200000, length = 0x000002 /* Boot to M0 will go here */ RAMM0 : origin = 0x000050, length = 0x0003B0 RAML0 : origin = 0x008000, length = 0x001000 RAML1 : origin = 0x009000, length = 0x001000 RAML2 : origin = 0x00A000, length = 0x001000 RAML3 : origin = 0x00B000, length = 0x001000 ZONE7A : origin = 0x200002, length = 0x018000 /* XINTF zone 7 - program space */ CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */ CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */ ADC_CAL : origin = 0x380080, length = 0x000009 RESET : origin = 0x3FFFC0, length = 0x000002 IQTABLES : origin = 0x3FE000, length = 0x000b50 IQTABLES2 : origin = 0x3FEB50, length = 0x00008c FPUTABLES : origin = 0x3FEBDC, length = 0x0006A0 BOOTROM : origin = 0x3FF27C, length = 0x000D44 PAGE 1 : BOOT_RSVD : origin = 0x000002, length = 0x00004E /* Part of M0, BOOT rom will use this for stack */ RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */ RAML4 : origin = 0x00C000, length = 0x001000 RAML5 : origin = 0x00D000, length = 0x001000 RAML6 : origin = 0x00E000, length = 0x001000 RAML7 : origin = 0x00F000, length = 0x001000 ZONE7B : origin = 0x218002, length = 0x007FFE /* XINTF zone 7 - data space */ } SECTIONS { /* Setup for "boot to SARAM" mode: The codestart section (found in DSP28_CodeStartBranch.asm) re-directs execution to the start of user code. */ codestart : > BEGIN, PAGE = 0 ramfuncs : > ZONE7A, PAGE = 0 .text : > ZONE7A, PAGE = 0 .cinit : > ZONE7A, PAGE = 0 .pinit : > ZONE7A, PAGE = 0 .switch : > ZONE7A, PAGE = 0 .stack : > ZONE7B, PAGE = 1 .ebss : > ZONE7B, PAGE = 1 .econst : > ZONE7B, PAGE = 1 .esysmem : > ZONE7B, PAGE = 1 IQmath : > ZONE7A, PAGE = 0 IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD FPUmathTables : > FPUTABLES, PAGE = 0, TYPE = NOLOAD DMARAML4 : > ZONE7B, PAGE = 1 DMARAML5 : > ZONE7B, PAGE = 1 DMARAML6 : > ZONE7B, PAGE = 1 DMARAML7 : > ZONE7B, PAGE = 1 ZONE7DATA : > ZONE7B, PAGE = 1 .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used */ csm_rsvd : > CSM_RSVD PAGE = 0, TYPE = DSECT /* not used for SARAM examples */ csmpasswds : > CSM_PWL PAGE = 0, TYPE = DSECT /* not used for SARAM examples */ /* Allocate ADC_cal function (pre-programmed by factory into TI reserved memory) */ .adc_cal : load = ADC_CAL, PAGE = 0, TYPE = NOLOAD }
I run the codes in main function to output data by Uart Port, the code is:
void SendData(void) { int i =0; unsigned char str1[3] ={0xaa,0xbb,0xcc}; for(i=0; i<3; i++) { SendBSC0(str1[i]); } SendBSC0(0xdd); SendBSC0(0xee); SendBSC0(0xff); }
the output result is:0x5a 0x08 0x11 0xdd 0xee 0xff。the content in the str1 array didn't output correctly.
so , I simulated the program , I found that str1 is not in the stack (Zore 7 0x218002-0x220000) . The addr of str1 is 0x4006.
why is the reason? Must the stack be in the chip's Ram?
Another question, when I use 28335_RAM_lnk.cmd, the compiler warning " waring :Data is being written to auto-generated file Dsp28335_app.i10",
what is the reason about Dsp28335_app.i10?
Thank you very much for your helps.
best wishes
Jent Lee
Hi Jent Lee,
Your query has been assigned to an expert. You will hear a response soon.
Regards,
Veena
The stack pointer isn't big enough to reach addresses that high--it's only 16 bits. You'll need to put the stack in one of the on-chip RAMs.
Whitney
thank you very much,could the .ebss .esysmem .econst sections be put in the Zero 7 area?what is the meaning of"waring :Data is being written to auto-generated file Dsp28335_app.i10 "?
thank you your help again.
best wishes
jent lee
Are you using the hex utility? What version of the code gen tools are you using?
See if any of the comments in this thread help:
Whitney
thank you for your help, Whitney,
I use the CCS8.31 compiler 's C2000 hex utility funtion.
Jent
Did George's reply in the thread I linked you to above explain the warning? Since you seem to have initialized sections in both PAGE 0 and PAGE 1, it's generating two output files. As George says, "If you have not specified a name for the second output file, then the hex utility automatically chooses an output file name and issues the warning diagnostic you show in your post."
There's some hex utility documentation in chapter 12 of this doc. You can see the output file naming info in 12.8. See if specifying another file name gets rid of the warning.
Whitney