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.

MCU-PLUS-SDK-AM243X: mmcsd/FreeRTOS-FAT and unresolved symbols

Part Number: MCU-PLUS-SDK-AM243X

Tool/software:

Hi all,

Thanks in advance for any help you can share with this beginner.

I'm new to CCS and this platform, but not to coding in general.

I am trying to add mmcsd/FreeRTOS-FAT functionality to the existing udpclient example from the SDK, so that I can read network config from a file on an SD card (this is the 243EVM board if that helps).

I was challenged to get the compiler to locate all of the appropriate headers, but now I'm getting a handful of ff_ functions showing up as unresolved symbols by the linker.

[127] undefined     first referenced
[128]  symbol           in file     
[129] ---------     ----------------
[130] ff_fclose     ./app_main.o    
[131] ff_filelength ./app_main.o    
[132] ff_fopen      ./app_main.o    
[133] ff_fread      ./app_main.o    
[134] ff_fwrite     ./app_main.o

As I'm new to CCS, I'm pretty sure this is an issue with me not knowing how to tell the compiler and linker where to look for things, but I've already spent some time in the Project->Properties pages adding paths, etc. to no avail.

Thoughts?

Thank you!

  • Hello,

    but now I'm getting a handful of ff_ functions showing up as unresolved symbols by the linker.

    If the build errors are at the linker stage, it is possible you have not included a certain library. Please make sure you have included the "freertos_fat" library in your example.

    For reference, please have a look at the libraries included in the MMCSD_FILE_IO example:

    https://github.com/TexasInstruments/mcupsdk-core/blob/next/examples/drivers/mmcsd/mmcsd_file_io/am243x-evm/r5fss0-0_nortos/ti-arm-clang/example.projectspec#L52-L52

    Regards,

    Prashant

  • Prashant,

    Thank you so much for the response and for providing a link to that specific line.

    Unfortunately, that path is already part of my Linker settings within CCS' Project Properties dialog. What else might I try, please?

    Thanks!

  • Hello,

    Unfortunately, that path is already part of my Linker settings within CCS' Project Properties dialog. What else might I try, please?

    In that case, please share the build logs to see the exact command being used for linking.

    Here are the sample build logs:

    "C:/ti/CCS_VS/ccs2002/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/bin/tiarmclang.exe" -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wl,-m"mmcsd_file_io.Debug.map" -Wl,-i"C:/ti/MCU_SDK/AM243x/mcu_plus_sdk_am243x_10_01_00_32/source/kernel/freertos/lib" -Wl,-i"C:/ti/MCU_SDK/AM243x/mcu_plus_sdk_am243x_10_01_00_32/source/drivers/lib" -Wl,-i"C:/ti/MCU_SDK/AM243x/mcu_plus_sdk_am243x_10_01_00_32/source/fs/freertos_fat/lib" -Wl,-i"C:/ti/CCS_VS/ccs2002/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/lib" -Wl,--reread_libs -Wl,--diag_suppress=10063 -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--gen_xml_func_hash -Wl,--xml_link_info="mmcsd_file_io_am243x-evm_r5fss0-0_freertos_ti-arm-clang_linkInfo.xml" -Wl,--ram_model -o "mmcsd_file_io_am243x-evm_r5fss0-0_freertos_ti-arm-clang.out" "./syscfg/ti_dpl_config.o" "./syscfg/ti_drivers_config.o" "./syscfg/ti_drivers_open_close.o" "./syscfg/ti_pinmux_config.o" "./syscfg/ti_power_clock_config.o" "./syscfg/ti_board_config.o" "./syscfg/ti_board_open_close.o" "./syscfg/ti_enet_config.o" "./syscfg/ti_enet_open_close.o" "./syscfg/ti_enet_soc.o" "./syscfg/ti_enet_lwipif.o" "./main.o" "./mmcsd_file_io.o" -Wl,-l"syscfg/linker.cmd"  -Wl,-lfreertos.am243x.r5f.ti-arm-clang.debug.lib -Wl,-ldrivers.am243x.r5f.ti-arm-clang.debug.lib -Wl,-lfreertos_fat.am243x.r5f.ti-arm-clang.debug.lib -Wl,-llibc.a -Wl,-llibsysbm.a

    Regards,

    Prashant

  • Thank you!

    I think this is getting me closer to the answer. I do not have that specific library in my linker output, even though I _do_ have the path in my linker settings. How do I address this, please?

    [2]Building target: "enet_cpsw_udpclient_am243x-evm_r5fss0-0_freertos_ti-arm-clang.out"
    [3]Invoking: Arm Linker
    [4]"/home/user/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/bin/tiarmclang" -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -DSOC_AM243X -D_DEBUG_=1 -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wl,-m"enet_cpsw_udpclient.Debug.map" -Wl,-i"/home/user/ti/mcu_plus_sdk_am243x_10_01_00_32/source/kernel/freertos/lib" -Wl,-i"/home/user/ti/mcu_plus_sdk_am243x_10_01_00_32/source/drivers/lib" -Wl,-i"/home/user/ti/mcu_plus_sdk_am243x_10_01_00_32/source/board/lib" -Wl,-i"/home/user/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/enet/lib" -Wl,-i"/home/user/ti/mcu_plus_sdk_am243x_10_01_00_32/source/networking/lwip/lib" -Wl,-i"/home/user/ti/ccs2001/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/lib" -Wl,-i"/home/user/workspace_ccstheia/enet_cpsw_udpclient_am243x-evm_r5fss0-0_freertos_ti-arm-clang/Debug/syscfg" -Wl,-i"/home/user/ti/mcu_plus_sdk_am243x_10_01_00_32/source/fs/freertos_fat/lib" -Wl,--reread_libs -Wl,--diag_suppress=10063 -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--gen_xml_func_hash -Wl,--xml_link_info="enet_cpsw_udpclient_am243x-evm_r5fss0-0_freertos_ti-arm-clang_linkInfo.xml" -Wl,--ram_model -Wl,--zero_init=on -Wl,--use_memcpy=fast -Wl,--use_memset=fast -o "enet_cpsw_udpclient_am243x-evm_r5fss0-0_freertos_ti-arm-clang.out" "./app_cpswconfighandler.o" "./app_main.o" "./app_udpclient.o" "./syscfg/ti_dpl_config.o" "./syscfg/ti_drivers_config.o" "./syscfg/ti_drivers_open_close.o" "./syscfg/ti_pinmux_config.o" "./syscfg/ti_power_clock_config.o" "./syscfg/ti_board_config.o" "./syscfg/ti_board_open_close.o" "./syscfg/ti_enet_config.o" "./syscfg/ti_enet_open_close.o" "./syscfg/ti_enet_soc.o" "./syscfg/ti_enet_lwipif.o" "./main.o" -Wl,-l"syscfg/linker.cmd" -Wl,-lfreertos.am243x.r5f.ti-arm-clang.debug.lib -Wl,-ldrivers.am243x.r5f.ti-arm-clang.debug.lib -Wl,-lenet-cpsw.am243x.r5f.ti-arm-clang.debug.lib -Wl,-llwipif-cpsw-freertos.am243x.r5f.ti-arm-clang.debug.lib -Wl,-llwip-freertos.am243x.r5f.ti-arm-clang.debug.lib -Wl,-llwip-contrib-freertos.am243x.r5f.ti-arm-clang.debug.lib -Wl,-lboard.am243x.r5f.ti-arm-clang.debug.lib -Wl,-llibc.a -Wl,-llibsysbm.a
    [5]makefile:154: recipe for target 'enet_cpsw_udpclient_am243x-evm_r5fss0-0_freertos_ti-arm-clang.out' failed

  • Hi,

    I think this is getting me closer to the answer. I do not have that specific library in my linker output, even though I _do_ have the path in my linker settings. How do I address this, please?

    Please add the missing libraries to your project and rebuild the example. To add, open project properties.

    Navigate to Build -> Arm Linker -> File Search Path. Add the libraries as show below.

    Please refer below image.

    After making the above changes click on Apply and close and rebuild the project.

    Regards,

    Tushar

  • Thank you so much! I would never have found this option otherwise, and I'm very grateful you took the time to walk me through it.

  • Hello,

    Glad to hear that you are now able to build.

    Happy to help Slight smile.

    Regards,

    Tushar