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.

#10234D Unresolved symbol

Other Parts Discussed in Thread: TM4C123GH6PGE, TEST2, SYSBIOS

I am using the Tiva C TM4C123G and can't get a very simple project to compile because I keep getting unresolved symbol errors

Here is my code

/*

* main.c

*/

#include <stdint.h>

#include <stdbool.h>

#include "C:/ti/TivaWare_C_Series-1.1/driverlib/sysctl.h"

#include "C:/ti/TivaWare_C_Series-1.1/driverlib/rom.h"

int
main(void) {

  //

   // Set the clocking to run directly from the crystal.

  //

    ROM_SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ |

                       SYSCTL_OSC_MAIN);

return 0;

}

My linker flags

-mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --diag_warning=225 --display_error_number --diag_wrap=off -z --stack_size=512 -m"test2.map" --heap_size=0 -i"C:/ti/ccsv5/tools/compiler/arm_5.0.4/lib" -i"C:/ti/ccsv5/tools/compiler/arm_5.0.4/include" --reread_libs --define=--define=ccs="ccs" --define=PART_TM4C123GH6PGE --define=TARGET_IS_BLIZZARD_RA1 --verbose_diagnostics --warn_sections --display_error_number --issue_remarks --diag_wrap=off --xml_link_info="test2_linkInfo.xml" --rom_model

Error

undefined          first referenced

  symbol                in file    

---------          ----------------

ROM_SysCtlClockSet ./main.obj     

error #10234-D: unresolved symbols remain

error #10010: errors encountered during linking; "test2.out" not built

>> Compilation failure

 

I am sure I must be missing something really stupid but I just can't get any project I create to find symbols in the driverlib.lib

 

 

 

 

 

  • I did finally get this to work by adding a couple more includes

     

    #include "inc/hw_memmap.h"

    #include"driverlib/gpio.h"

    #include"driverlib/sysctl.h"

    #include"driverlib/rom.h"

    Now I am moving on to getting the display driver initialized and again am running into undefined problems. What documents do I need to look at that help me create projects for this board - show me how to write to the display and use the graphic library.

  • Your example worked for me with CCS 5.5.

    ROM_SysCtlClockSet is defined in rom.h and depends on the TARGET_IS_BLIZZARD_RA1 define. Perhaps you haven't rebuilt main.o since defining it? Perhaps try cleaning the project and rebuilding.

    Note that if you are using a tiva part (not the older stellaris LM4F) you'll want TARGET_IS_BLIZZARD_RB1 define.

    Otherwise can you post the full output of the the compile and link from the console?

  • I believe the recommended way is to import an example project and start from there. I don't know if there is a step by step guide to setting up a Tiva project from scratch. I pretty much did what you did. Looked errors and manually compared the example project's settings to what I made.

    Edit: You already have ccs defined. I'm full of redundant info today!

    If you are setting up the project yourself you'll probably need to define:

    ccs="ccs"

    This fixes "fatal error #35: #error directive: Unrecognized COMPILER!”

    The other thing you might run into is the utils files. To use these files, make a utils folder in your project and copy just the files you need. Check the user's guide SW-TM4C-UTILS-UG-1.1.pdf for more info.

  • @ stepman,

    Re: "I'm full of redundant info today!"

    Who is not?  And - far worse exists (to be full of...)

    Good job here/elsewhere - you've helped many...

    As you've advised - attempting the famed/always desired, "custom/individual project" dooms most!  So much easier/safer to instead choose, "factory version - reasonably close" - which has all the IDE "ins/outs" properly implemented & tested...

  • For the display dirver cfal96x64x16.c do I have to put this in a drivers folder like the util files

  • Don't like nor use ccs - but sense it best for you to search on related file, "cfal96x64x16.h" and see how its included w/in a known good, (i.e. factory supplied) project.  The .h file should be included w/in relevant project - and then you can extend your search for its .c variant.   

    While you are making good progress - sticking w/ "pre-made/tested" projects makes life so much simpler...  Plenty of time, "downstream" for you to become IDE "maven" - likely of little value now... (beyond upping frustration coefficient)

  • If you don't like ccs what do you use. I am just at the starting stage in my project so I am still open to using different tools.

    I guess I will have to cry uncle and start with a pre-made project. I hate doing that because it seems like it should be so simple to recreate but I have spent way too much time on it already.

  • We have long used paid IAR - find it vastly superior:

    a) accommodates MCUs from multiple vendors (many others make ARM/other MCUs)

    b) accommodates faster, more efficient SWD (rather than 4 pin JTAG) (saves 2 pins - every device)

    c) appears far more robust, crash-free, and simply works.  Also supplies "Cycle Counter" enabling the instant, effort-free measurement & display of the "execution time" of each/every function (or partial function)

    d) far faster - via JLink probe - than FTDI or newer, MCU incarnations available here

    Free - code size limited versions of both IAR & Keil are available.  We find that's most always most effective manner to try/evaluate different approaches.

    You are far, far away from being alone in your recent IDE difficulties.  In fact - key vendor engineer admitted today that explanation of IDE set-up/config was, "lacking."  (to be kind)

    It is not easy to start, "your own" - and the motivation for so doing is never detailed - nor justified.  Yet - "attaching" your unique functions - systematically to "known good/working" project gets you INSTANTLY/CORRECTLY, "On the Air."   Far better ways to inflict pain/suffering than thru IDE mastery - and - for what reason? 

    Suggest you better choose your battles - keep your MCU mission frontmost - tool mastery is an unnecessary diversion - drains time, effort, morale.   (and - did we ask "why" it appears so important?)

  • cb1_mobile,

    Thanks for the kind note!

    I can see the advantage of IAR on multiple devices. You only have to learn the "IAR way" once!

    I think this particular issue is really a TivaWare documentation issue, and how they setup the project dependencies, plus a bit of CCS build settings. Pretty sure the same would crop up with IAR. If I get a chance I'll write up a walkthrough on setting up a project the recommended way (or find TIs), and the project from scratch. I also have notes on building driverlib and usblib with debug enabled so it uses ASSERT().

    I, personally, like to document my build env. and tool chain dependencies up front. It really helps when I have to come back to a project.

    Teresa,

    I haven't used the display driver, but yes that should work. You'll either need to change cfal96x64x16.c to include the full path like you for main.c or adjust your project's include path (recommended). If you are still having problems building post back.

    Also, if you do try out IAR, I'd be interested in hearing how it worked.

  • I finally got it to by going to cfa96x64x16.x properties->CCS Build->Advanced Options->Prefined symbols and added

    TARGET_IS_BLIZZARD_RA1 and PART_TM4C123GH6PGE. Which seemed crazy to me because I have those defined my project. But I verifed this really was the case by removing the defines and seeing if the problem came back and it did.

    I have started doing exactly what you recommended creating a document that documents what I had to do to the build enviroment. 

     

  • Document all the links to the PDFs that describe the MCU and the links to the compiler versions etc as well... It is easy to lose the links to the various documents.

    I also keep a notebook beside the project where I scribble quick notes as to settings.

    If you need to document circuits -- you can get DesignSpark as well... (Just google it.)

    It's easy to forget connections when you add parts to your project.

    Also document the project directories and Tell CCS to remember more project work spaces.

    All of this will become second nature -- especially if you have to revive a project like I did today and you have to start remembering things... (I have had to drop projects for up to a year at a time to travel...)

    CB1 favors IAR workbench -- I have a strong preference for CCS -- each to their own. It ties in neatly with the TI RTOS and SYSBIOS. 

    I keep a completely working project with all the defines and a drivers directory with links just so I can remeber how to set up a new project. You caould also create a new project template -- which would be faster....

    If you MUST try the GNU compiler -- set up a completely separate workspace with a new copy of your project.... Or be prepared to "remember all the settings and directories and so on...

    I use OpenOffice (Libre Office 4.0 actually) handy and embed links to all documents and directories in a cover document for each project along with wiring hook-up descriptions etc.

    Once you get a system organized it is a lot easier.

  • Teresa Ainsworth said:

    I finally got it to by going to cfa96x64x16.x properties->CCS Build->Advanced Options->Prefined symbols and added

    TARGET_IS_BLIZZARD_RA1 and PART_TM4C123GH6PGE. Which seemed crazy to me because I have those defined my project.

    That doesn't seem right. I'm using CCS 5.5 and I don't need to set per file settings. I just played with it and it looks like the per file settings override the project settings.

    Option1: Start a new project and do the setup again. It's probably worthwhile to do this if you are documenting it so you can verify the settings. Avoid the per file settings.

    Option2: Select all the source/header files (maybe folders too?), right click -> Resource Configurations -> Reset to Default... This appears to remove the per file settings and uses the projects settings.

    Edit: This is probably to root cause of your issues! Once a file has it's own settings, none of the changes you make on the project will show up.

    Looks like the icon changes if you have a per file setting. Note the "key" on main.c

    Good Luck!