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.

Including third party FatFs breaks build

Other Parts Discussed in Thread: ENERGIA

What's the right way to include this module? Because I've tried linking/copying the entire folder to no avail. This is the list of messages I get when I have the whole folder in my project folder. 

Description Resource Path Location Type
<a href="file:/home/krithik/ti/ccsv6/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain usb_host C/C++ Problem
#1965 cannot open source file "avr/io.h" sample-mmc.c /usb_host/third_party/fatfs/port line 9 C/C++ Problem
#10010 errors encountered during linking; "usb_host.out" not built usb_host C/C++ Problem
#35 #error directive: This file is not needed in current configuration. Remove from the project. cc936.c /usb_host/third_party/fatfs/src/option line 11 C/C++ Problem
#1965 cannot open source file "fatfs/src/diskio.h" dual-disk-driver.c /usb_host/third_party/fatfs/port line 13 C/C++ Problem
#1965 cannot open source file "fatfs/src/diskio.h" mmc-ek-tm4c1294xl.c /usb_host/third_party/fatfs/port line 23 C/C++ Problem
unresolved symbol f_mount, first referenced in ./main.obj usb_host C/C++ Problem
#179-D variable "g_sFileInfo" was declared but never referenced main.c /usb_host line 63 C/C++ Problem
#179-D variable "g_sDirObject" was declared but never referenced main.c /usb_host line 62 C/C++ Problem
#1965 cannot open source file "fatfs/src/diskio.h" mmc-ek-lm4f232.c /usb_host/third_party/fatfs/port line 23 C/C++ Problem
#1965 cannot open source file "fatfs/src/diskio.h" mmc-dk-tm4c123g.c /usb_host/third_party/fatfs/port line 23 C/C++ Problem

Below is a screenshot of my include options, I can provide more details of my project properties if necessary. 

I'm using versions

2.1.0.12573 of TivaWare.
6.0.0.00190  of Code Composer Studio
14.04 Ubuntu 

Thanks,
Krithik

  • I removed the following files (cc950, 949, 936, 932.c) from my project directory: 

    This is what I get when I try to do a clean re-build

    Description Resource Path Location Type
    #1965 cannot open source file "fatfs/src/diskio.h" mmc-ek-lm4f232.c /usb_host/third_party/fatfs/port line 23 C/C++ Problem
    #1965 cannot open source file "fatfs/src/diskio.h" mmc-dk-tm4c129x.c /usb_host/third_party/fatfs/port line 23 C/C++ Problem
    #1965 cannot open source file "malloc.h" syscall.c /usb_host/third_party/fatfs/src/option line 7 C/C++ Problem
    #1965 cannot open source file "fatfs/src/diskio.h" fat_usbmsc.c /usb_host/third_party/fatfs/port line 19 C/C++ Problem
    #1965 cannot open source file "fatfs/src/diskio.h" dual-disk-driver.c /usb_host/third_party/fatfs/port line 13 C/C++ Problem
    #1965 cannot open source file "fatfs/src/diskio.h" mmc-ek-tm4c1294xl.c /usb_host/third_party/fatfs/port line 23 C/C++ Problem
    #1965 cannot open source file "fatfs/src/diskio.h" mmc-dk-tm4c123g.c /usb_host/third_party/fatfs/port line 23 C/C++ Problem

  • I've attached an archived version of the project, would really appreciate any sort of feedback. I haven't been able to root cause the problem yet. 

    1638.ccs_usb_mass_storage_example_tm4c123gh6pm.zip

  • Hi,

    You have some paths problem - the best thing is to learn yourself from mistakes - please do the followings: 

    - go to Tiva/boards/dk-tm4c123g/usb_host_msc folder and import this project and compile/link it. At successful operation, go to Project | Properties and inspect each item/tab and see the paths and options used by this project. This way you will learn how to set the paths. Take care - TI may use symbolic links for various files.

    - apply these to your project. 

    Consider to really do that, do it only once and learn for the rest of your TI project. pay attention, it is important.

    Another thing: your startup_ccs.c file is modified, seems you do not like the TI info - you removed the notice showing the Tiva version - do not do that, it is important - at one time you will use several versions and do not know which one is good or bad for your case.

    Petrei

  • Hi Petrei, 

    I did exactly what you recommended, before I posted the attachment. I tried to match the paths to my project, although I wasn't able to compile/link the project. Instead, I proceeded to create a fresh project and added content from the  dk-tm4c123g using a piece-by-piece approach to see exactly where it breaks.

    In any case I just imported the project again, the build still breaks. 

    l'll try to summarize the project properties 

    By default, the path to SW_ROOT was set to ${ORIGINAL_PROJECT_ROOT}/../../../../..

    Path Variables
    SW_ROOT = /home/krithik/Development/tiva/tivaware

    Build Variables 
    SW_ROOT = /home/krithik/Development/tiva/tivaware

    Driverlib
    The link to driverlib.lib was missing, so I added that relative to the path SW_ROOT

    Include Options 

    Predefined Symbols


    GCC Extensions

    Support for gcc extensions was enabled in Language Options.  

     

  • This is the set of errors that I'm getting.

    Description Resource Path Location Type
    This project was created using a version of compiler that is not currently installed: 5.0.4 [ARM]. Another version of the compiler will be used during build: 5.1.7.Please go to <a href="liveaction:OpenAppCenter">CCS App Center</a> to install the compiler of the required version, or migrate the project to one of the available compiler versions by adjusting project properties. usb_host_msc properties Problems

    unresolved symbol TouchScreenCallbackSet, first referenced in ./usb_host_msc.obj usb_host_msc C/C++ Problem
    unresolved symbol TouchScreenInit, first referenced in ./usb_host_msc.obj usb_host_msc C/C++ Problem
    unresolved symbol TouchScreenIntHandler, first referenced in ./startup_ccs.obj usb_host_msc C/C++ Problem
    unresolved symbol f_mount, first referenced in ./usb_host_msc.obj usb_host_msc C/C++ Problem
    #10229-D output section ".data" refers to load symbol "g_sKentec320x240x16_SSD2119" and hence cannot be compressed; compression "rle" is ignored usb_host_msc C/C++ Problem
    unresolved symbol FrameDraw, first referenced in ./usb_host_msc.obj usb_host_msc C/C++ Problem
    unresolved symbol Kentec320x240x16_SSD2119Init, first referenced in ./usb_host_msc.obj usb_host_msc C/C++ Problem
    unresolved symbol PinoutSet, first referenced in ./usb_host_msc.obj usb_host_msc C/C++ Problem
    unresolved symbol uvsnprintf, first referenced in ./usb_host_msc.obj usb_host_msc C/C++ Problem
    <a href="file:/home/krithik/ti/ccsv6/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain usb_host_msc C/C++ Problem
    #10010 errors encountered during linking; "usb_host_msc.out" not built usb_host_msc C/C++ Problem
    unresolved symbol f_opendir, first referenced in ./usb_host_msc.obj usb_host_msc C/C++ Problem
    unresolved symbol f_readdir, first referenced in ./usb_host_msc.obj usb_host_msc C/C++ Problem
    unresolved symbol g_sKentec320x240x16_SSD2119, first referenced in ./usb_host_msc.obj usb_host_msc C/C++ Problem
    unresolved symbol usnprintf, first referenced in ./usb_host_msc.obj usb_host_msc C/C++ Problem

  • Hi,

    I am not sure if you really imported the project or just copy-pasted it. Below are some picture from my setup (Win, not LX) but should be used as references. What to look for are as follows:

    In the above picture ignore Energia_xxx, it is mine use, you do not need it. 

    In the above picture, take care to have the message: Variable Relative Location. If you have the word "Absolute" for any item, then select each item with Absolute qualifier, and press the button Convert... at the right to convert it to relative paths.

    This is for compiler included options.

    Here are the graphics libraries added to the linker. This one is missing in your settings.

    And the final build result:

    Compare these settings with yours. Repeat the importing the project - take at most 5 minutes (for me, taking the pictures...)

    Importing is started from Project | Import CCS Projects..

    Petrei

     

  • Hi, 

    I was finally able to solve this! No errors or warnings after the build. The screenshots really helped :) 

    Essentially my Linked Resources Tab was blank, unlike yours which had all the necessary third party files. I added them, with a relative location. Not sure why they didn't get added when I did in fact simply import the project. 

    Thank you so much! 

  • Hi,

    I suggest to try importing one or two more projects and if the result of Linked Resource Tab is still empty, then it is wise to complain about at CCS forum for inspection/corrections - could be related to CCS implementation on Linux - helps also for other users.

    Petrei