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.

TMS320F28P550SJ: Sysconfig does not allow to set User Defined Memory Sections in the linker script with the same name for different build configurations

Part Number: TMS320F28P550SJ
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

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:

Fullscreen
1
2
3
4
5
6
7
8
9
10
//
// User Sections
//
RFFTdata1 { } > RAMGS3,
ALIGN(512)
RFFTdata2 { } > RAMGS3
RFFTdata3 { } > RAMGS3
FPUfftTables { } > RAMGS3
RFFTdata4 { } > RAMGS3
FPUmathTables { } > RAMGS2
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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):

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifdef generic_ram_lnk
MEMORY
{
...
}
SECTIONS
{
...
}
#endif
#ifdef generic_flash_lnk
MEMORY
{
...
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /**
    * 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();
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    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