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.

CCS: Adding FATFS to a project

Expert 1130 points

Other Parts Discussed in Thread: TLK105L, TLK105

Tool/software: Code Composer Studio

Hi ,

I am adding fatfs to my project

I modified the file in the fatfs example and than migrated them to my main project

I than added the following lines to the *.cfg file

/* Load the MMCSD package */
var Mmcsd = xdc.loadPackage('ti.drv.mmcsd');
var Fatfs = xdc.loadPackage('ti.fs.fatfs');

after doing saw I get the following error

undefined reference to `MuxIntcP_create' .ccsproject /Myproj line 854, external location: C:\ti\pdk_am437x_1_0_17\packages\ti\drv\mmcsd\src\v1\MMCSD_v1.c C/C++ Problem


what is missing ?

  • Hi Yuval,

    Did you copy all of the files included the FATFS project to your new project?

    Additionally, would you be able to include a few lines from the build log that surround the error you encountered?

    Thanks,

    Max

  • i maxx.

    below is the log

    note that in addition to importing the files , I had to change the *.cfg file.

    please confirm this is needed ? maybe there is a better way ? is this the right way to do that ? is my modification of the cfg file correct?

    without the modifying the cfg file , I got errors linker errors with respect to fatfs functions.

    I than added the var Fatfs = xdc.loadPackage('ti.fs.fatfs');

    which eliminated the original errors , but intrduced mmc associated linker errors.

    adding both lines in previous messages brought to the issue at hand

    **** Build of configuration AM437x_release for project PProj ****

    "C:\\ti\\ccs910\\ccs\\utils\\bin\\gmake" -k -j 4 all -O

    Building target: "PProj.out"
    Invoking: GNU Linker
    "C:/ti/ccs910/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -mtune=cortex-a9 -marm -Dam4379 -DSOC_AM437x -DAM43XX_FAMILY_BUILD -Dcore0 -DNO_UART_MSG_APP -DTIESC_APPLICATION=1 -O2 -ffunction-sections -fdata-sections -g -gdwarf-2 -gstrict-dwarf -Wall -mno-unaligned-access -mfloat-abi=hard -Wl,-Map,"PProj.map" -nostartfiles -nodefaultlibs -static -Wl,--gc-sections -L"C:/ti/bios_6_76_02_02/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/hard" -Wl,--defsym,STACKSIZE=0x18000 -Wl,--defsym,HEAPSIZE=0x400 -Wl,--start-group --specs=nano.specs -o"PProj.out" "./GPIO_soc.o" "./I2C_soc.o" "./SPI_soc.o" "./UART_soc.o" "./board_gpioLed.o" "./board_i2cLed.o" "./board_misc.o" "./board_phy.o" "./board_spi.o" "./board_tlk105.o" "./board_tlkphy.o" "./delay_us.o" "./pruicss_soc.o" "./tiesc_soc.o" "./tiescphy_tlk105l.o" "./EcatStack/SampleApplicationInterface.o" "./EcatStack/aoeappl.o" "./EcatStack/bootloaderappl.o" "./EcatStack/bootmode.o" "./EcatStack/cia402appl.o" "./EcatStack/coeappl.o" "./EcatStack/diag.o" "./EcatStack/ecataoe.o" "./EcatStack/ecatappl.o" "./EcatStack/ecatcoe.o" "./EcatStack/ecateoe.o" "./EcatStack/ecatfoe.o" "./EcatStack/ecatslv.o" "./EcatStack/ecatsoe.o" "./EcatStack/el9800appl.o" "./EcatStack/el9800hw.o" "./EcatStack/emcy.o" "./EcatStack/eoeappl.o" "./EcatStack/fc1100hw.o" "./EcatStack/foeappl.o" "./EcatStack/mailbox.o" "./EcatStack/mcihw.o" "./EcatStack/objdef.o" "./EcatStack/sampleappl.o" "./EcatStack/sdoserv.o" "./EcatStack/testappl.o" "./EcatStack/tiesc_fw_cir_buff.o" "./EcatStack/tiesc_spi_master.o" "./EcatStack/tiesc_spi_slave.o" "./EcatStack/tiescappl.o" "./EcatStack/tiescbsp.o" "./EcatStack/tieschw.o" "./EcatStack/tiescmiscappl.o" "./EcatStack/tiescutils.o" "./EcatStack/tiescutils_spi_master.o" "./EcatStack/tiescutils_spi_slave.o" "./FatFS/FATFS_log.o" "./FatFS/MMCSD_soc.o" "./FatFS/console.o" "./FatFS/fs_shell_app_utils.o" "./SWDriveSources/AutoTune.o" "./SWDriveSources/BackGround.o" "./SWDriveSources/Commutation.o" "./SWDriveSources/CurrentController.o" "./SWDriveSources/EnDisManager.o" "./SWDriveSources/HWLayer.o" "./SWDriveSources/PVController.o" "./SWDriveSources/PlantSim.o" "./SWDriveSources/PtpGen.o" "./SWDriveSources/RealTime.o" "./SWDriveSources/Recorder.o" "./SWDriveSources/Terminal.o" "./osal/ClockP_tirtos.o" "./osal/EventP_tirtos.o" "./osal/MailboxP_tirtos.o" "./osal/MiscP_tirtos.o" "./osal/OSP_nonos.o" "./osal/OSP_tirtos.o" "./osal/SwiP_tirtos.o" "./osal/TaskP_nonos.o" "./osal/TaskP_tirtos.o" "C:/ti/PRU-ICSS-EtherCAT_Slave_01.00.08.01/protocols/ethercat_slave/ecat_appl/EcatStack/TcHelper.lib" -Wl,-T"configPkg/linker.cmd" -Wl,--start-group -lrdimon -lgcc -lm -lnosys -lc -Wl,--end-group
    makefile:230: recipe for target 'PProj.out' failed
    C:\ti\pdk_am437x_1_0_17\packages\ti\drv\mmcsd\lib\a9\release\ti.drv.mmcsd.aa9fg(MMCSD_v1.oa9fg): In function `MMCSD_v1_open':
    C:\ti\pdk_am437x_1_0_17\packages\ti\drv\mmcsd/src/v1/MMCSD_v1.c:854: undefined reference to `MuxIntcP_create'
    C:\ti\pdk_am437x_1_0_17\packages\ti\drv\mmcsd/src/v1/MMCSD_v1.c:854: undefined reference to `MuxIntcP_create'
    collect2.exe: error: ld returned 1 exit status
    gmake[1]: *** [PProj.out] Error 1
    gmake: *** [all] Error 2
    makefile:226: recipe for target 'all' failed

    **** Build Finished ****

  • Hi Yuval,

    Did you copy loading in all of the required modules in your .cfg file? Specially, OSAL?

    var socType="am437x";
    var osType = "tirtos";
    var Osal = xdc.useModule('ti.osal.Settings');
    Osal.osType = osType;
    Osal.socType = socType;

    Thanks,

    Max

  • Thanks for your help

    My cfg file is based on the ethercat slave full example , with the additional 2 modifications in the cfg ( and addtional m library)

  • Should i upload the file?

  • Hi Yuval.

    Feel free to upload the file, but please first try to add the osal library that I suggested above.

    Thanks,

    Max

  • Hi Max,

    most of the lines you wrote appear in the file , except Osal.socType = socType;

    when I add this it seems to compile without errors


    your are the BEST

    could you please point me to relevant docs explaining what these commands actually do ?