DSP/BIOS v5.41.13.42
C5515EVM
I would like to run my code from SDRAM. However, when I place the .text section in SDRAM using the config script, the linker still places the .text section in SARAM. Can someone spot what is wrong with my config
utils.loadPlatform("ti.platforms.ezdsp5505"); /* The following DSP/BIOS Features are enabled. */bios.enableRealTimeAnalysis(prog);/*bios.enableRtdx(prog);*/bios.enableTskManager(prog); bios.MEM.instance("VECT").base = 0x000100;bios.MEM.instance("DARAM").base = 0x000180;bios.MEM.instance("DARAM").len = 0x7e7f;bios.MEM.instance("SARAM").base = 0x008000;bios.MEM.instance("SARAM").len = 0x20000;bios.MEM.create("SDRAM");bios.MEM.instance("SDRAM").base = 0x028000;bios.MEM.instance("SDRAM").len = 0x3d8000; bios.MEM.NOMEMORYHEAPS = 0;bios.MEM.instance("SDRAM").createHeap = 1;bios.MEM.instance("SDRAM").heapSize = 0x12800;bios.MEM.TEXTSEG = prog.get("SDRAM");bios.MEM.BIOSOBJSEG = prog.get("SDRAM");bios.MEM.MALLOCSEG = prog.get("SDRAM"); bios.LOG.create("trace");bios.PRD.create("ToggleLed");bios.PRD.instance("ToggleLed").order = 2;bios.PRD.instance("ToggleLed").fxn = prog.extern("toggleLED");bios.PRD.instance("ToggleLed").period = 500;bios.HWI.instance("HWI_INT8").useDispatcher = 1;bios.HWI.instance("HWI_INT8").fxn = prog.extern("HWI_I2S_DMA_isr");bios.SEM.create("SEM_EndOfFrame");bios.TSK.instance("TSK_idle").order = 1;bios.TSK.create("TSK_ProcessFrame");bios.TSK.instance("TSK_ProcessFrame").order = 3;bios.TSK.instance("TSK_ProcessFrame").fxn = prog.extern("ProcessFrame");bios.PRD.instance("ToggleLed").order = 1; // !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT! prog.gen();
utils.loadPlatform("ti.platforms.ezdsp5505");
/* The following DSP/BIOS Features are enabled. */bios.enableRealTimeAnalysis(prog);/*bios.enableRtdx(prog);*/bios.enableTskManager(prog);
bios.MEM.instance("VECT").base = 0x000100;bios.MEM.instance("DARAM").base = 0x000180;bios.MEM.instance("DARAM").len = 0x7e7f;bios.MEM.instance("SARAM").base = 0x008000;bios.MEM.instance("SARAM").len = 0x20000;bios.MEM.create("SDRAM");bios.MEM.instance("SDRAM").base = 0x028000;bios.MEM.instance("SDRAM").len = 0x3d8000;
bios.MEM.NOMEMORYHEAPS = 0;bios.MEM.instance("SDRAM").createHeap = 1;bios.MEM.instance("SDRAM").heapSize = 0x12800;bios.MEM.TEXTSEG = prog.get("SDRAM");bios.MEM.BIOSOBJSEG = prog.get("SDRAM");bios.MEM.MALLOCSEG = prog.get("SDRAM");
bios.LOG.create("trace");bios.PRD.create("ToggleLed");bios.PRD.instance("ToggleLed").order = 2;bios.PRD.instance("ToggleLed").fxn = prog.extern("toggleLED");bios.PRD.instance("ToggleLed").period = 500;bios.HWI.instance("HWI_INT8").useDispatcher = 1;bios.HWI.instance("HWI_INT8").fxn = prog.extern("HWI_I2S_DMA_isr");bios.SEM.create("SEM_EndOfFrame");bios.TSK.instance("TSK_idle").order = 1;bios.TSK.create("TSK_ProcessFrame");bios.TSK.instance("TSK_ProcessFrame").order = 3;bios.TSK.instance("TSK_ProcessFrame").fxn = prog.extern("ProcessFrame");bios.PRD.instance("ToggleLed").order = 1;
// !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT!
prog.gen();
...and from my map file
.text 0 00010000 [ 00008000 ] 0003d8b0 *
Thx,
MikeH
MikeH,if you are working in CCS, check the directory Debug (or Release) for a file with the extension .cmd. Open it in a text editor and check if there is a line that allocates .text in that file. It should look similar to this:.text: {} > SDRAMIf you are not using CCS, the cmd file should be in the same directory as your TCF script.The next thing to check is whether you are passing another linker command file on your linker command line. If there is another .cmd file, check if that file allocates .text. Let me know what you find, and then we'll know where to look further. It would also help if you paste here your linker command line.
If my reply answers your question please mark the thread as answered.
MikeH,
What version of the compiler are you using?
I imported the BIOS hello example and then applied your *.tcf file changes to it. I saw it move .text into SDRAM:
****************************************************************************** TMS320C55x Linker PC v4.4.1 ******************************************************************************
...
name origin length used unused attr fill (bytes) (bytes) (bytes) (bytes)---------------------- -------- --------- -------- -------- ---- -------- VECT 00000200 00000100 00000100 00000000 RWIX DARAM 00000300 0000fcfe 00005862 0000a49c RWIX SARAM 00010000 00040000 00000000 00040000 RWIX SDRAM 00050000 007b0000 0002509c 0078af64 RWIX
00075000 .text
See attached. 7608.text_sdram.zip
Steve
My bad. I have been jumping between Debug and Release. If I actually look at the *correct* .map file I can see that the linker is correctly allocating memory segments.
Thanks for the help guys.