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.

Compiler/MSP432E411Y: Linker issue? Same Address for two different variables

Part Number: MSP432E411Y
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI C/C++ Compiler

Dear Experts,

I have a strange issue with the linker: Two variables of different translation units get mapped on the same address:

We have a similar project where the issue does not happen. A remarkable thing (but common to both projects) is that the SDFatFS.c file is part of the project (due to use of long file names). This translation unit contains the variable sdFatFSHandles, which is affected. SDFatFS.c gets also compiled into a SimpleLink library file as far as I know. As I understand the compiler / linker documentation project files have precedence over library files. Thus the problem could be unrelated to this double existing definition.

The issue is the same for 18.12.4 and 19.6.0.

Building file: "../release.cfg"
Invoking: XDCtools
"C:/ti/ccs910/xdctools_3_55_02_22_core/xs" --xdcpath="C:/ti/simplelink_msp432e4_sdk_3_20_00_10/source;C:/ti/simplelink_msp432e4_sdk_3_20_00_10/kernel/tirtos/packages;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4F -p ti.platforms.msp432:MSP432E411Y -r debug -c "C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS" --compileOptions "-mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path=\"C:/Temp/PSC02/PSC02_tirtos_ccs\" --include_path=\"C:/ti/simplelink_msp432e4_sdk_3_20_00_10/source/third_party/CMSIS/Include\" --include_path=\"C:/ti/simplelink_msp432e4_sdk_3_20_00_10/source/ti/posix/ccs\" --include_path=\"C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include\" --advice:power=none --define=__MSP432E411Y__ -g --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on " "../release.cfg"
making package.mak (because of config.bld) ...
configuring release.xem4f from package/cfg/release_pem4f.cfg ...
generating custom ti.sysbios library makefile ...
Starting build of library sources ...
making C:/Temp/PSC02/PSC02_tirtos_ccs/src/sysbios/sysbios.aem4f ...
clem4f C:/ti/simplelink_msp432e4_sdk_3_20_00_10/kernel/tirtos/packages/ti/sysbios/BIOS.c ...
asmem4f C:/ti/simplelink_msp432e4_sdk_3_20_00_10/kernel/tirtos/packages/ti/sysbios/family/arm/m3/Hwi_asm.sv7M ...
asmem4f C:/ti/simplelink_msp432e4_sdk_3_20_00_10/kernel/tirtos/packages/ti/sysbios/family/arm/m3/Hwi_asm_switch.sv7M ...
asmem4f C:/ti/simplelink_msp432e4_sdk_3_20_00_10/kernel/tirtos/packages/ti/sysbios/family/arm/m3/IntrinsicsSupport_asm.sv7M ...
asmem4f C:/ti/simplelink_msp432e4_sdk_3_20_00_10/kernel/tirtos/packages/ti/sysbios/family/arm/m3/TaskSupport_asm.sv7M ...
arem4f BIOS.obj m3_Hwi_asm.obj m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj ...
Build of libraries done.
clem4f package/cfg/release_pem4f.c ...
Finished building: "../release.cfg"
 

How can I get rid of the issue?

  • I don't see the linker invocation in your post.  However, I'm sure it gets invoked and creates a map file.  This file is usually called name_of_project.map, and is located in the directory named after the current build configuration, often Debug.  It is a text file which shows details about what the linker did, including the address of all the global variables and functions.  Please attach it to your next post.  So the forum will accept it, add the file extension .txt.

    Thanks and regards,

    -George

  • Hi George,

    sorry for the late response - I'm very busy that time.

    I think we can close this case. I forgot to correct the include path in the board file, thus the compiler took the wrong definition. I'm sorry for the inconvenience.