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.

Relocating files when using TI-RTOS



Hello,

I'm currently learning about using TI-RTOS (Version 2.something) on the TM4C123GXL. For now it is a very simple setup: I created an example project for the TM4C123GXL launchpad and wrote my code. Now, as the code evolves I'd like to put it in the structure I'm used to and add version control to it: Source files in src, include files in inc, etc ...

So I created a folder with CCS and moved the source files in it, recompiled it and .. oh: The linker doesn't find my functions anymore, including the main function.

This looks like a simple error, eg a wrong (not updated) path in one of the linker files. But since I couldn't find it in a hour of using google it must be hidden somewhere in some linker file.

May you point me in the right direction? Where does the problem occur when I relocate the source files? The files I looked at contain either only package names or absolute paths to the library files installed at the default location ( C:\ti\tirtos.. ).

Thank you and have a nice day,

Jan 

  • Jan Kr��ger said:

    So I created a folder with CCS and moved the source files in it, recompiled it and .. oh: The linker doesn't find my functions anymore, including the main function.

     Try use import project instead, point to your old project directory then proceed importing checking copy code to workspace.

     A better way is to also create a new independent workspace too.

     Copy and paste never update file link and other path are stored on project file.

     Is a bad practice use absolute path but this is done this way and windows with it obsolete c:\ multiroot path is the worst can be in place.

  • Jan, can you post your complete build log after a rebuild?

  • Hi Robert,

    I can't see where the RTOS packages use absolute paths except in some configuration files to the packages itself (eg "C:\ti"). Maybe you can elaborat on what exactly you mean?

    Thanks!

    Hi Tom,

    I rebuild the project twice, both time from a clean build. The first one is where all files lie within one level of the project folder:

    **** Build of configuration Debug for project RTOS_UART ****
    
    "c:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
    'Building file: ../main.cfg'
    'Invoking: XDCtools'
    "c:/ti/xdctools_3_30_01_25_core/xs" --xdcpath="C:/ti/tirtos_tivac_2_00_01_23/packages;C:/ti/tirtos_tivac_2_00_01_23/products/bios_6_40_01_15/packages;C:/ti/tirtos_tivac_2_00_01_23/products/ndk_2_23_01_01/packages;C:/ti/tirtos_tivac_2_00_01_23/products/uia_2_00_00_28/packages;c:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4F -p ti.platforms.tiva:TM4C123GH6PM -r release -c "c:/ti/ccsv6/tools/compiler/arm_5.1.5" "../main.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring main.xem4f from package/cfg/main_pem4f.cfg ...
    clem4f package/cfg/main_pem4f.c ...
    'Finished building: ../main.cfg'
    ' '
    'Building file: ../EK_TM4C123GXL.c'
    'Invoking: ARM Compiler'
    "c:/ti/ccsv6/tools/compiler/arm_5.1.5/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.5/include" --include_path="C:/ti/tirtos_tivac_2_00_01_23/products/TivaWare_C_Series-2.1.0.12573c" -g --gcc --define=PART_TM4C123GH6PM --define=ccs --define=TIVAWARE --display_error_number --diag_warning=225 --diag_wrap=off --gen_func_subsections=on --preproc_with_compile --preproc_dependency="EK_TM4C123GXL.pp" --cmd_file="./configPkg/compiler.opt"  "../EK_TM4C123GXL.c"
    'Finished building: ../EK_TM4C123GXL.c'
    ' '
    'Building file: ../cmdline.c'
    'Invoking: ARM Compiler'
    "c:/ti/ccsv6/tools/compiler/arm_5.1.5/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.5/include" --include_path="C:/ti/tirtos_tivac_2_00_01_23/products/TivaWare_C_Series-2.1.0.12573c" -g --gcc --define=PART_TM4C123GH6PM --define=ccs --define=TIVAWARE --display_error_number --diag_warning=225 --diag_wrap=off --gen_func_subsections=on --preproc_with_compile --preproc_dependency="cmdline.pp" --cmd_file="./configPkg/compiler.opt"  "../cmdline.c"
    'Finished building: ../cmdline.c'
    ' '
    'Building file: ../main.c'
    'Invoking: ARM Compiler'
    "c:/ti/ccsv6/tools/compiler/arm_5.1.5/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.5/include" --include_path="C:/ti/tirtos_tivac_2_00_01_23/products/TivaWare_C_Series-2.1.0.12573c" -g --gcc --define=PART_TM4C123GH6PM --define=ccs --define=TIVAWARE --display_error_number --diag_warning=225 --diag_wrap=off --gen_func_subsections=on --preproc_with_compile --preproc_dependency="main.pp" --cmd_file="./configPkg/compiler.opt"  "../main.c"
    'Finished building: ../main.c'
    ' '
    'Building target: RTOS_UART.out'
    'Invoking: ARM Linker'
    "c:/ti/ccsv6/tools/compiler/arm_5.1.5/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --gcc --define=PART_TM4C123GH6PM --define=ccs --define=TIVAWARE --display_error_number --diag_warning=225 --diag_wrap=off --gen_func_subsections=on -z -m"RTOS_UART.map" --heap_size=0 --stack_size=512 -i"c:/ti/ccsv6/tools/compiler/arm_5.1.5/lib" -i"c:/ti/ccsv6/tools/compiler/arm_5.1.5/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="RTOS_UART_linkInfo.xml" --rom_model -o "RTOS_UART.out" -l"./configPkg/linker.cmd"  "./main.obj" "./cmdline.obj" "./EK_TM4C123GXL.obj" "../tm4c123gh6pm.cmd" -l"libc.a" -l"C:/ti/tirtos_tivac_2_00_01_23/products/TivaWare_C_Series-2.1.0.12573c/driverlib/ccs/Debug/driverlib.lib" -l"C:/ti/tirtos_tivac_2_00_01_23/products/TivaWare_C_Series-2.1.0.12573c/usblib/ccs/Debug/usblib.lib" 
    <Linking>
    'Finished building target: RTOS_UART.out'
    ' '
    
    **** Build Finished ****

    And here is the log after I relocated the header files to the folder "inc" and the source files to the folder "src":

    **** Build of configuration Debug for project RTOS_UART ****
    
    "c:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
    'Building file: ../main.cfg'
    'Invoking: XDCtools'
    "c:/ti/xdctools_3_30_01_25_core/xs" --xdcpath="C:/ti/tirtos_tivac_2_00_01_23/packages;C:/ti/tirtos_tivac_2_00_01_23/products/bios_6_40_01_15/packages;C:/ti/tirtos_tivac_2_00_01_23/products/ndk_2_23_01_01/packages;C:/ti/tirtos_tivac_2_00_01_23/products/uia_2_00_00_28/packages;c:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4F -p ti.platforms.tiva:TM4C123GH6PM -r release -c "c:/ti/ccsv6/tools/compiler/arm_5.1.5" "../main.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring main.xem4f from package/cfg/main_pem4f.cfg ...
    clem4f package/cfg/main_pem4f.c ...
    'Finished building: ../main.cfg'
    ' '
    'Building target: RTOS_UART.out'
    'Invoking: ARM Linker'
    "c:/ti/ccsv6/tools/compiler/arm_5.1.5/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --gcc --define=PART_TM4C123GH6PM --define=ccs --define=TIVAWARE --display_error_number --diag_warning=225 --diag_wrap=off --gen_func_subsections=on -z -m"RTOS_UART.map" --heap_size=0 --stack_size=512 -i"c:/ti/ccsv6/tools/compiler/arm_5.1.5/lib" -i"c:/ti/ccsv6/tools/compiler/arm_5.1.5/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="RTOS_UART_linkInfo.xml" --rom_model -o "RTOS_UART.out" -l"./configPkg/linker.cmd"  "../tm4c123gh6pm.cmd" -l"libc.a" -l"C:/ti/tirtos_tivac_2_00_01_23/products/TivaWare_C_Series-2.1.0.12573c/driverlib/ccs/Debug/driverlib.lib" -l"C:/ti/tirtos_tivac_2_00_01_23/products/TivaWare_C_Series-2.1.0.12573c/usblib/ccs/Debug/usblib.lib" 
    <Linking>
    warning #10229-D: output section ".data" refers to load symbol "TSK_heartBeatFxn" and hence cannot be compressed; compression "rle" is ignored
    
     undefined           first referenced                                                                          
      symbol                 in file                                                                               
     ---------           ----------------                                                                          
     TSK_handleUartRXFxn C:\Users\einball\git\Bauteileautomat\Software\Debug\configPkg\package\cfg\main_pem4f.oem4f
     TSK_heartBeatFxn    C:\Users\einball\git\Bauteileautomat\Software\Debug\configPkg\package\cfg\main_pem4f.oem4f
     main                c:\ti\ccsv6\tools\compiler\arm_5.1.5\lib\rtsv7M4_T_le_v4SPD16_eabi.lib<args_main.obj>     
    
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "RTOS_UART.out" not built
    
    >> Compilation failure
    gmake: *** [RTOS_UART.out] Error 1
    gmake: Target `all' not remade because of errors.
    
    **** Build Finished ****

    It is obvious that the compiler doesn't compile the sourcefiles because it cannot find them. There has to be a way to tell the system it finds the files in their respective folders.

    Thanks,

    Jan

  • Jan,

    sorry for the late reply. I'm not too familiar with your CCS project's layout, but perhaps you can post your project or a picture of the folder file structure so I can understand it better.

    One thing to note, you can't put your own source files in a directory called "src". The build system puts custom TI-RTOS kernel libraries in the folder.

    The layout shown here worked for me:

    Blue: OK to but sources in here

    Red: Reserved for TI-RTOS Kernel's custom libraries. The linker won't find any built obj files in here.

  • Hello Tom,

    I just got a mail that suggested your answer as the right one and I suddenly realized that I had this still on my "ToDo list" and therefore I had not answered or flagged your post as the answer to the problem.

    Thank you very much and shame on me! It indeed is the simple solution to my problem,

    Is there a list of reserved names in a documentation somewhere? I could not find such a list in the TI-RTOS users guide by scanning through.

    Thanks again and sorry I didn't reply sooner,

    Jan