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.
In Code Composer Studio, I imported a DSP RFFT sample project. It comes with the "RAM" and "FLASH" build configurations. The project defines some memory sections where to store the RFFT data (e.g., RFFTdata1). The RAM configuration has a definition for these areas, see below:
// // User Sections // RFFTdata1 { } > RAMGS3, ALIGN(512) RFFTdata2 { } > RAMGS3 RFFTdata3 { } > RAMGS3 FPUfftTables { } > RAMGS3 RFFTdata4 { } > RAMGS3 FPUmathTables { } > RAMGS2
The project uses sysconfig and I have tried to define such memory areas also in the FLASH configuration, since they are not defined there (them not being defined causes the code to not behave correctly).
The moment I add RFFTdata1 to the User Defined Section in sysconfig, however, I get the error
error: generic_ram_lnk(/utilities/cmd_tool/cmd_syscfg/source/CMD) userSection[0].$name: Duplicate name: 'RFFTdata1' also exists on instance(s) of User Defined Section
error: generic_flash_lnk(/utilities/cmd_tool/cmd_syscfg/source/CMD) userSection[0].$name: Duplicate name: 'RFFTdata1' also exists on instance(s) of User Defined Section
This error appears both in the sysconfig UI and when compiling the code. Note that the generate linker script (device_cmd.cmd) uses preprocessor directive to select which memory configuration to use, so RFFTdata1 should not be considered duplicate, see below (shortened for clarity):
#ifdef generic_ram_lnk MEMORY { ... } SECTIONS { ... } #endif #ifdef generic_flash_lnk MEMORY { ... } SECTIONS { ... } #endif /* //=========================================================================== // End of file. //=========================================================================== */
How do I add the required RFFTdata sections to the linker script in the FLASH configuration?
Thanks.
Hi,
Can you share the project and the sysconfig file to take a look?
Also, check if the pre-defined symbol (generic_flash_lnk) is defined for the Flash configuration in the Project properties.
Best Regards
Siddharth
Hi,
Sure, the project is the same as the example project dsp_rfft_fpu32_f28p55x in C2000ware.
This is the sysconfig:
/** * These arguments were used when this file was generated. They will be automatically applied on subsequent loads * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. * @cliArgs --device "F28P55x" --package "128PDT" --part "F28P55x_128PDT" --context "system" --product "C2000WARE@5.02.00.00" * @versions {"tool":"1.20.0+3587"} */ /** * Import the modules used in this configuration. */ const cputimer = scripting.addModule("/driverlib/cputimer.js", {}, false); const cputimer1 = cputimer.addInstance(); const device_support = scripting.addModule("/driverlib/device_support.js"); const sysctl = scripting.addModule("/driverlib/sysctl.js"); const FFT = scripting.addModule("/libraries/dsp/FPU/FFT/FFT.js", {}, false); const FFT1 = FFT.addInstance(); const FPUfastRTS = scripting.addModule("/libraries/math/FPUfastRTS/FPUfastRTS.js", {}, false); const FPUfastRTS1 = FPUfastRTS.addInstance(); const CMD = scripting.addModule("/utilities/cmd_tool/cmd_syscfg/source/CMD"); const CMD1 = CMD.addInstance(); const CMD2 = CMD.addInstance(); /** * Write custom configuration values to the imported modules. */ cputimer1.$name = "myCPUTIMER0"; cputimer1.emulationMode = "CPUTIMER_EMULATIONMODE_RUNFREE"; cputimer1.startTimer = true; cputimer1.enableInterrupt = true; cputimer1.timerPeriod = 100000000; FFT1.$name = "myFFT0"; FFT1.RFFT.create(1); FFT1.RFFT[0].$name = "myRFFT0"; FFT1.RFFT[0].numStages = 8; FFT1.RFFT[0].inPtr = "inPtr"; FFT1.RFFT[0].outPtr = "outPtr"; FFT1.RFFT[0].magPtr = "magPtr"; FFT1.RFFT[0].phasPtr = "phPtr"; FFT1.RFFT[0].coeffPtr = "twiddlePtr"; FFT1.RFFT[0].sincosFunction = false; FPUfastRTS1.$name = "myFFR0"; CMD1.$name = "generic_ram_lnk"; CMD1.sectionMemory_const = ["RAMLS5","RAMLS6"]; CMD1.sectionMemory_ramfunc = ["RAMM0"]; CMD1.sectionMemory_init_array = ["RAMM0"]; CMD1.sectionMemory_switch = ["RAMM0"]; CMD1.sectionMemory_sysmem = ["RAMLS4"]; CMD1.sectionMemory_stack = ["RAMLS0"]; CMD1.sectionMemory_bss = ["RAMLS4","RAMLS5"]; CMD1.sectionMemory_text = ["RAMGS0","RAMGS1","RAMLS0","RAMLS1","RAMLS2","RAMLS3"]; CMD1.sectionMemory_data = ["RAMLS5","RAMLS6","RAMLS7","RAMLS8","RAMLS9"]; CMD1.sectionMemory_cinit = ["RAMGS2"]; CMD1.userSection.create(6); CMD1.userSection[0].sectionAlignEnable = true; CMD1.userSection[0].sectionMemory = ["RAMGS3"]; CMD1.userSection[0].sectionAlign = 512; CMD1.userSection[0].$name = "RFFTdata1"; CMD1.userSection[1].sectionMemory = ["RAMGS3"]; CMD1.userSection[1].$name = "RFFTdata2"; CMD1.userSection[1].sectionAlign = 512; CMD1.userSection[2].sectionMemory = ["RAMGS3"]; CMD1.userSection[2].$name = "RFFTdata3"; CMD1.userSection[3].sectionMemory = ["RAMGS3"]; CMD1.userSection[3].$name = "FPUfftTables"; CMD1.userSection[4].$name = "RFFTdata4"; CMD1.userSection[4].sectionMemory = ["RAMGS3"]; CMD1.userSection[5].$name = "FPUmathTables"; CMD1.userSection[5].sectionMemory = ["RAMGS2"]; CMD2.$name = "generic_flash_lnk"; CMD2.sectionAlignEnable_ramfunc = true; CMD2.sectionAlignEnable_text = true; CMD2.sectionAlignEnable_binit = true; CMD2.sectionAlignEnable_cinit = true; CMD2.sectionAlignEnable_switch = true; CMD2.sectionAlignEnable_init_array = true; CMD2.sectionAlignEnable_const = true; CMD2.sectionAlignEnable_ovly = true; CMD2.sectionMemory_codestart = "0x080000"; CMD2.sectionMemory_stack = ["RAMM1"]; CMD2.sectionMemory_bss = ["RAMLS5","RAMLS6"]; CMD2.sectionMemory_data = ["RAMLS5"]; CMD2.sectionMemory_sysmem = ["RAMLS4"]; CMD2.sectionMemory_ramfunc = ["FLASH_BANK0"]; CMD2.sectionMemory_text = ["FLASH_BANK0","FLASH_BANK1"]; CMD2.sectionMemory_binit = ["FLASH_BANK0"]; CMD2.sectionMemory_cinit = ["FLASH_BANK0"]; CMD2.sectionMemory_switch = ["FLASH_BANK0"]; CMD2.sectionMemory_init_array = ["FLASH_BANK0"]; CMD2.sectionMemory_const = ["FLASH_BANK0"]; CMD2.sectionMemory_ovly = ["FLASH_BANK0"]; CMD2.sectionRunFromDifferentAddr_ramfunc = true; CMD2.sectionRun_ramfunc = ["RAMLS0"]; CMD2.sectionBinit_ramfunc = false;
I also checked that generic_flash_lnk is in the flash configuration in the project properties.
Thanks!
Daniel
Daniel,
Will take a look at it and get back in a couple of days.
Best Regards
Siddharth