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/CC3200-LAUNCHXL: unresolved symbols during build

Part Number: CC3200-LAUNCHXL
Other Parts Discussed in Thread: CC3200SDK, CC3200

Tool/software: Code Composer Studio

Hello,

I am developing a personal application to control an audio amplifier, and was using the ADC UDMA  in ping pong mode as implemented in CC3200SmattPlug_1.0.0/src/SmartPlugSource/metrology/metrology.c, simplifying the code to remove most of the other features to concentrate on the ADC and udma.

In my first attempts I got unresolved symbols with the ADC drivers, and I realized I did not had defined the File Search path to driverlib.a. My surprise was that I coud not find the file in the driverlib folder that came with CC3200SmartPlug files, so I used the file form CC3200SDK_1.3.0/cc3200-sdk/driverlib/css/Release/diverlib.a. This removed the unresolved symbols to the drivers, but unresolved symbols remain, this time related to osi. I am attaching the output from the CDT build console.

Thanks,

Ramon


**** Build of configuration Debug for project Amplifier ****

"C:\\TI\\ccsv6\\utils\\bin\\gmake" -k all
'Building file: ../Process_ADC.c'
'Invoking: ARM Compiler'
"C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=vfplib -me --include_path="C:/TI/Amplifier/driverlib" --include_path="C:/TI/Amplifier/simplelink/source" --include_path="C:/TI/Amplifier/simplelink/include" --include_path="C:/TI/Amplifier/simplelink" --include_path="C:/TI/Amplifier/common" --include_path="C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/include" --include_path="C:/TI/Amplifier/inc" --include_path="C:/TI/Amplifier/oslib" -g --define=cc3200 --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="Process_ADC.d" "../Process_ADC.c"
"../Process_ADC.c", line 176: warning #552-D: variable "ulChannelStructIndex" was set but never used
'Finished building: ../Process_ADC.c'
' '
'Building file: ../cc3200.c'
'Invoking: ARM Compiler'
"C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=vfplib -me --include_path="C:/TI/Amplifier/driverlib" --include_path="C:/TI/Amplifier/simplelink/source" --include_path="C:/TI/Amplifier/simplelink/include" --include_path="C:/TI/Amplifier/simplelink" --include_path="C:/TI/Amplifier/common" --include_path="C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/include" --include_path="C:/TI/Amplifier/inc" --include_path="C:/TI/Amplifier/oslib" -g --define=cc3200 --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="cc3200.d" "../cc3200.c"
'Finished building: ../cc3200.c'
' '
'Building file: ../main.c'
'Invoking: ARM Compiler'
"C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=vfplib -me --include_path="C:/TI/Amplifier/driverlib" --include_path="C:/TI/Amplifier/simplelink/source" --include_path="C:/TI/Amplifier/simplelink/include" --include_path="C:/TI/Amplifier/simplelink" --include_path="C:/TI/Amplifier/common" --include_path="C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/include" --include_path="C:/TI/Amplifier/inc" --include_path="C:/TI/Amplifier/oslib" -g --define=cc3200 --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="main.d" "../main.c"
"../main.c", line 75: warning #225-D: function "InitTerm" declared implicitly
"../main.c", line 125: warning #169-D: argument of type "void (*)(void)" is incompatible with parameter of type "P_OSI_TASK_ENTRY"
'Finished building: ../main.c'
' '
'Building file: ../pinmux.c'
'Invoking: ARM Compiler'
"C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=vfplib -me --include_path="C:/TI/Amplifier/driverlib" --include_path="C:/TI/Amplifier/simplelink/source" --include_path="C:/TI/Amplifier/simplelink/include" --include_path="C:/TI/Amplifier/simplelink" --include_path="C:/TI/Amplifier/common" --include_path="C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/include" --include_path="C:/TI/Amplifier/inc" --include_path="C:/TI/Amplifier/oslib" -g --define=cc3200 --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="pinmux.d" "../pinmux.c"
'Finished building: ../pinmux.c'
' '
'Building file: ../udmadrv.c'
'Invoking: ARM Compiler'
"C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=vfplib -me --include_path="C:/TI/Amplifier/driverlib" --include_path="C:/TI/Amplifier/simplelink/source" --include_path="C:/TI/Amplifier/simplelink/include" --include_path="C:/TI/Amplifier/simplelink" --include_path="C:/TI/Amplifier/common" --include_path="C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/include" --include_path="C:/TI/Amplifier/inc" --include_path="C:/TI/Amplifier/oslib" -g --define=cc3200 --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="udmadrv.d" "../udmadrv.c"
'Finished building: ../udmadrv.c'
' '
'Building file: ../user_input.c'
'Invoking: ARM Compiler'
"C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=vfplib -me --include_path="C:/TI/Amplifier/driverlib" --include_path="C:/TI/Amplifier/simplelink/source" --include_path="C:/TI/Amplifier/simplelink/include" --include_path="C:/TI/Amplifier/simplelink" --include_path="C:/TI/Amplifier/common" --include_path="C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/include" --include_path="C:/TI/Amplifier/inc" --include_path="C:/TI/Amplifier/oslib" -g --define=cc3200 --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="user_input.d" "../user_input.c"
'Finished building: ../user_input.c'
' '
'Building target: Amplifier.out'
'Invoking: ARM Linker'
"C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=vfplib -me -g --define=cc3200 --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi -z -m"Amplifier.map" --stack_size=0x512 --heap_size=0x0 -i"C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/lib" -i"C:/TI/ccsv6/tools/compiler/ti-cgt-arm_15.12.7.LTS/include" --reread_libs --display_error_number --warn_sections --diag_wrap=off --xml_link_info="Amplifier_linkInfo.xml" --rom_model -o "Amplifier.out" "./Process_ADC.obj" "./cc3200.obj" "./main.obj" "./pinmux.obj" "./udmadrv.obj" "./user_input.obj" "../cc3200v1p32.cmd" -l"C:/TI/Amplifier/driverlib/ccs/Release/driverlib.a" -llibc.a
<Linking>

undefined first referenced
symbol in file
--------- ----------------
GetCmd ./user_input.obj
InitTerm ./main.obj
Report ./Process_ADC.obj
osi_MsgQCreate ./main.obj
osi_MsgQRead ./Process_ADC.obj
osi_MsgQWrite ./Process_ADC.obj
osi_TaskCreate ./main.obj
osi_start ./main.obj

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "Amplifier.out" not built

>> Compilation failure
makefile:146: recipe for target 'Amplifier.out' failed
gmake: *** [Amplifier.out] Error 1
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

  • Hi Ramon,

    There should be libraries included in the SmartPlug source package (src/driverlib/ccs/Exe/driverlib.a), but since the SmartPlug source is based on an old version of the SDK, I do highly suggest you continue to use the libraries directly from CC3200 SDK 1.3 or 1.4. Please be sure your simplelink.a is from the latest SDK as well.

    GetCmd, InitTerm, and Report are UART helper functions given in example application source. You can use these by adding uart_if.c and uart_if.h from cc3200-sdk/example/common. Be sure you have uart_if.h included in your source file.

    The osi functions you can find in cc3200-sdk/oslib/ccs and choose either ti_rtos.a or free_rtos.a. Be sure you have osi.h included in your source file.

    Best regards,

    Sarah

  • Sarah,

    Thank you so much for your quick reply, as always.

    I had already set the File Search Path to the driverlib from CC3200-SDK 1.3, which is in the project includes, I am using ti_rtos, and I had uart_if.c and uart_if.h. as cc3200-sdk/example/common was also in the project includes.

    What caught my attention is your last sentence where you ask to make sure that osi.h in included in my source file. So I opened main.c and i saw osi.h, but not simplelink.h. I added it and my errors disappeared, except for a new one that popped up:

    #41 expected an identifier, and the compiler points the location of the error on line 59 of the osi.h file:

    57 typedef enum

    58 {

    59     OSI_OK = 0,

    60     OSI_FAILURE = -1,

    etc.

    I searched on the internet and saw that error #41 can be caused by a dual declaration on another file, and I found that CC3200-SDK 1.3.0\cc3200-sdk\simplelink\source\nonos.1 contains the line:

    81 #define OSI_OK  NONOS_RET_OK

    What should I do next?

    Ramon

  • Hi Ramon,

    It's likely the SimpleLink library is pulling a nonos reference somewhere. Assuming you're using FreeRTOS:

    • Make sure your path is to an OS version of the SimpleLink library (simplelink/ccs/OS or simplelink/ccs/OS_debug). If you are using the power management framework, use the PM_Framework version of the library.
    • You should have SL_PLATFORM_MULTI_THREADED and USE_FREERTOS defined as symbols in your project properties

    Best regards,

    Sarah

  • Sarah,

    I added a path to swimplelink/ccs/OS/simplalink.a, but i still get the same error.

    Also, I intend to use ti_rtos. Do I still need to have SL_PLATFORM_MULTI_THREADED as symbol? Do I need a symbol for ti_rtos? How do I set the symbols in the Project Properties window?

    For information, I selected under CCS General/Products CC3200 SimpleLink Wifi, TI-RTOS for CC32XX, TI-RTOS for SimpleLink Wireless MCU and XDCtools. Should keep all these?

    Thanks,

    Ramon

  • Hi Ramon,

    If you're using TI-RTOS, try the following:

    • Add USE_TIRTOS and SL_PLATFORM_MULTI_THREADED as predefined symbols in your application project. You can do this by left-clicking the project to go to Properties->Build->ARM Compiler->Predefined symbols.
    • Install the TI-RTOS for CC3200 package (if you don't have it already). The latest version supporting CC3200 is 2.16.01.14. You can find it here: http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/index.html
    • Add the ti_rtos_config project to your workspace. You can import this project from cc3200-sdk/ti_rtos/ti_rtos_config. This project finds the TI-RTOS package install in its Linked Resources and configures the RTOS settings.
    • From your application project, add the ti_rtos_project as a dependency. 

     For more on TI-RTOS, please see the user's guide in the docs folder of the SDK. You can also check out any TI-RTOS example in the SDK as a guide.

    Best regards,

    Sarah

  • Sarah,

    Thank you very much for your help. This is the information that I was looking for, but I cannot find the Predefined Symbols in my project properties, which makes me think that my project is not correctly configured. I will review the ti_rtos documentation during the holiday weekend and revise my code. I also found many orphan references from the original SmartPlug code that I copied and then reduced to the ADC with udma transfer functions.

    In the meantime, have wonderful Thanksgiving!

    Ramon

  • Hi Ramon,

    You may want to start with a TI-RTOS example from the SDK, and you can delete the .c and .h files and add in your own source files. That way you should have all of the correct project configurations.

    Happy Thanksgiving!

    -Sarah

  • Hello Sarah,

    I hope you had a great Thanksgiving too. Your advice worked wonders! I went back to the wlan_station example, loaded driverlib, oslib, simple link and ti_rtos config and built them as described in SWRU376E and understood what I had missed before. Then loaded wlan_station and replaced the .c files as you suggested, and it buit without errors after cleaning a couple of mistakes and adding #include <stdlib.h> just before #include "osi.h" as I saw in a E2E chat.

    I still have a warning I do not know how to solve: 

    "../main.c", line 130: warning #169-D: argument of type "void (*)(void)" is incompatible with parameter of type "P_OSI_TASK_ENTRY"

    line 130 reads as follows:

    osi_TaskCreate( ProcessADCTask,
                                      (const signed char*)"ProcessADC",
                                        6144,
                                       (void *) &param,
                                       PROCESS_ADC_BASE_TASK_PRIO, 
                                        &ProcessADCTaskHndl ) 

    Some lines above I have the statement: osi_MsgQCreate(&ProcessADCTaskMsgQ,"ProcessADCTaskMsgQ",sizeof(UINT32),DEC_FACT2);

    and it does not seem to generate any error. Ilooked in osi.c and both, Task_Create and MasgQCreate seem to have a similar structure.

    Thanks in advance for your invaluable help,

    Ramon