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/TMS320F28069M: Code composer studio unresolved symbols

Part Number: TMS320F28069M
Other Parts Discussed in Thread: MOTORWARE, , DRV8301

Tool/software: Code Composer Studio

Guys, excuse my frustration:

Why, is CCS such a pain to configure?

I am desperately trying to split a project out of the proj_lab05g example and create my own self contained project.

I want to be able to zip the project folder and open it anytime and want to have the knowledge that everything is inside this folder and it wouldn't be modified upon motorware update for example.

I want to be able to move this folder on another PC, install CCS and be able to start working immediately.. it is such a simple wish.

I want all files to be in the workplace folder and not all over the hard drive.

I have wasted weeks now chasing something so so simple that I can achieve with IAR Workbench for example in seconds!

I have read countless threads on this forum and I have seen so many poor souls as myself trying to achieve the same.

And so many of the threads are inconclusively closed as "resolved" without any hint of how this was exactly done - if the user has given up one can't assume the problem was resolved. Even if the user has found a solution until this solution is shared on the forum practically no one can benefit from it.

Why, when I include the file absolutely or relatively in the source code I have to also provide the folder where the file is located in the file search path. Why if I do both it still doesn't work??

I have provided references in the project settings, I have addressed the files absolutely in the source code and frankly I have tried everything.

If I had a chance to drop CCS for IAR I would have done it by now but unfortunately this processor (TMS320F28069M) is only supported on CCS.

Please people, help...  

here's what the error looks like 

undefined first referenced
symbol in file
--------- ----------------
_CTRL_getVersion ./main.obj
_CTRL_initCtrl ./main.obj
_CTRL_runTraj ./MW/ctrl.obj
_CTRL_setEstParams ./MW/ctrl.obj
_CTRL_setUserMotorParams ./MW/ctrl.obj
_CTRL_setupCtrl ./MW/ctrl.obj
_CTRL_setupEstIdleState ./MW/ctrl.obj
_CTRL_setupEstOnLineState ./MW/ctrl.obj
_CTRL_setupTraj ./MW/ctrl.obj
_EST_doCurrentCtrl ./MW/ctrl.obj
_EST_doSpeedCtrl ./MW/ctrl.obj
_EST_getAngle_pu ./MW/ctrl.obj
_EST_getDcBus_pu ./main.obj
_EST_getFlux_VpHz ./main.obj
_EST_getFm_pu ./MW/ctrl.obj
_EST_getIdRated ./main.obj
_EST_getLs_d_H ./main.obj
_EST_getLs_q_H ./main.obj
_EST_getMaxCurrentSlope_pu ./main.obj
_EST_getOneOverDcBus_pu ./MW/ctrl.obj
_EST_getRr_Ohm ./main.obj
_EST_getRs_Ohm ./main.obj
_EST_getSignOfDirection ./MW/LIN.obj
_EST_getSpeed_krpm ./main.obj
_EST_getState ./main.obj
_EST_getTorque_Nm ./main.obj
_EST_get_krpm_to_pu_sf ./MW/ctrl.obj
_EST_get_pu_to_krpm_sf ./main.obj
_EST_isError ./MW/ctrl.obj
_EST_isIdle ./MW/ctrl.obj
_EST_isLockRotor ./MW/ctrl.obj
_EST_isMotorIdentified ./main.obj
_EST_isOnLine ./MW/ctrl.obj
_EST_run ./MW/ctrl.obj
_EST_setFlag_enableForceAngle ./main.obj
_EST_setFlag_enableRsRecalc ./main.obj
_EST_setId_ref_pu ./MW/ctrl.obj
_EST_setIdle ./MW/ctrl.obj
_EST_setIdle_all ./MW/ctrl.obj
_EST_setIq_ref_pu ./MW/ctrl.obj
_EST_setMaxCurrentSlope_pu ./main.obj
_EST_setRs_pu ./MW/ctrl.obj
_EST_updateId_ref_pu ./MW/ctrl.obj
_EST_updateState ./MW/ctrl.obj
_EST_useZeroIq_ref ./MW/ctrl.obj
_HAL_enableAdcInts ./main.obj
_HAL_enableDebugInt ./main.obj
_HAL_enableDrv ./main.obj
_HAL_enableGlobalInts ./main.obj
_HAL_init ./main.obj
_HAL_readDrvData ./main.obj
_HAL_setParams ./main.obj
_HAL_setupDrvSpi ./main.obj
_HAL_setupFaults ./main.obj
_HAL_writeDrvData ./main.obj
_PIE_clearAllInts ./main.obj
_PIE_enableInt ./MW/UART.obj
_SCI_enableRx ./MW/UART.obj
_SCI_enableTx ./MW/LIN.obj
_SPI_enableRxFifo ./MW/drv8301.obj
_SPI_getRxFifoStatus ./MW/drv8301.obj
_SPI_resetRxFifo ./MW/drv8301.obj
_USER_calcPIgains ./main.obj
_USER_checkForErrors ./main.obj
_USER_computeFlux ./main.obj
_USER_computeFlux_pu_to_VpHz_sf ./main.obj
_USER_computeFlux_pu_to_Wb_sf ./main.obj
_USER_computeTorque_Flux_Iq_pu_to_Nm_sf ./main.obj
_USER_computeTorque_Ls_Id_Iq_pu_to_Nm_sf ./main.obj
_USER_computeTorque_Nm ./main.obj
_USER_getErrorCode ./main.obj
_USER_setParams ./main.obj
_USER_softwareUpdate1p6 ./main.obj
__IQ24cosPU ./MW/ctrl.obj
__IQ24sinPU ./MW/ctrl.obj
__IQ24sqrt ./MW/ctrl.obj
__IQ24toF ./main.obj
_hal ./main.obj

error #10234-D: unresolved symbols remain

  • Typically the "unresolved symbols remain" errors occur when the linker is not able to find the definitions for those symbols. The definitions may be in a source file or a library, but those files must either be compiled as part of the project (if its a source file) or passed to the linker (if its a library).

    More info here:
    http://software-dl.ti.com/ccs/esd/documents/sdto_ccs_build-errors.html#error-unresolved-symbols-remain

    Regarding zipping up an example project and extracting it in another location or another machine, the process would vary a bit depending on whether the original project contains "linked" resources or not.  If there are linked resources, this page describes how to export the project for sharing: http://software-dl.ti.com/ccs/esd/documents/ccs_sharing-projects.html

    I suspect that when you archived the project and moved it to another PC, the linked resources did not come through with it. If you compare the build output of your custom project with the Motorware example you started with, that should help you identify which, if any, source files or libraries may be missing in your project. Also the name of the symbol usually gives some clues about which source file it may be defined in.

  • Many thanks for taking time to answer AartiG

    All this time I have been trying to remove any links to motorware, track down all originally linked files and copy them to my folder... and when I finally have them, and I have setup the folders in CCS then I still get the above errors. This was code that was originally working. How come the linker doesn't know of the above functions when I have given these folders exactly in the linker file search path settings?

    It feels like there is some setting that I am missing or some background hard-coded protection in motorware so that it can only run from it's originally installed folder. If this is the case then I understand.
  • Dimo Dimov1 said:
    How come the linker doesn't know of the above functions when I have given these folders exactly in the linker file search path settings?

    Could you provide the full build log from the CCS build console? This page tells you how you can save the build log to a text file. Please attach the file here. That might give us a better idea of what is missing.

  • My apologies, I erased all the project already and started all over again.

    However, I have a theory of what was wrong: I don't think I have managed to sever all links to motorware files with my previous attempt.

    When splitting a project lab from motorware it is a good idea to delete or rename the original file (I previously left the original motorware files untouched). After compiling, all links to the renamed file can be redirected correctly. Also it is a good idea to change the name (e.g. add a prefix).

    Another challenge was that I previously started from clean sheet. My new method is to start with a working project lab, then move the motorware files one by one to specific project folder and work on redirecting the links. 

    I am still not 100% ready but it looks good so far.

    Please leave the thread alive for a while if possible - I will come back if I have more problems.

  • Hi AartiG, project conversion goes well. I have converted almost all "modules" from motorware and some of the "drivers". I take time to test the firmware every few files - this adds time.

    For each module I create a new source (where source file is available) and header files in my project. The names of the new files have the prefix "mod_". Then I copy the contents from the original motorware files into the newly created "mod_" files. Then I rename the original motorware files, compile and fix any links pointing to the missing original files.

    So far I stumbled on one problem only: When I repeat the above procedure for the module datalog I get the following error:

    "C:/ti/motorware/motorware_1_01_00_18/sw/ide/ccs/cmd/f2806x/F28069F.cmd", line 138: error #10099-D:
    program will not fit into available memory. run placement with
    alignment/blocking fails for section "graph_data" size 0x9a0 page 1.
    Available memory ranges:
    RAML2_3 size: 0x1400 unused: 0xa8 max hole: 0xa8
    error #10010: errors encountered during linking; "WC007-8305.out" not built

    From what I can see there are three buffers with length DATA_LOG_BUFF_SIZE= 0x400 declared in page 1 RAML2_3 section in RAM.

    Originally RAM2_3 section was 0x1400 bytes long. I fixed this error by adding extra memory in RAM2_3 section in F28069F.cmd as follows:

    RAML2_3 : origin = 0x008C00, length = 0x002400 /* on-chip RAM block L2 */ //<----- Added 0x1000
    RAML4 : origin = 0x00B000, length = 0x002000 /* on-chip RAM block L4 */
    RAML5 : origin = 0x00D000, length = 0x002000 /* on-chip RAM block L5 */
    RAML6 : origin = 0x00F000, length = 0x002000 /* on-chip RAM block L6 */
    RAML7 : origin = 0x011000, length = 0x002000 /* on-chip RAM block L7 */
    RAML8 : origin = 0x013000, length = 0x001800 /* on-chip RAM block L8. From 0x13800 to 0x14000 is reserved for InstaSPIN */
    USB_RAM : origin = 0x040000, length = 0x000800 /* USB RAM */

    I am wondering why the above process of file conversion is preventing the RAM placement from doing it's job?

    Do you have any ideas?

  • Dimo Dimov1 said:
    I am wondering why the above process of file conversion is preventing the RAM placement from doing it's job?

    I can only guess that some other sections are also being allocated to RAML2_3 and for some reason, in the modified project alone it is running out of space for all those allocations. I would not expect that to happen if the only thing that changed between the original example and your modified project is the name of the source file. If, on the other hand, you made some modifications to the source, then it is possible that the code size of some sections increased sufficiently enough that they no longer fit within memory region. But your solution is on the right track.

    Since your original question is now resolved, we would like to close out this thread. However, if you have further questions about the allocation or other questions in the future, please feel free to create a new thread so we can track separate discussions for each topic/question. Thanks!

  • I agree, we should close the thread as the prioblem is now solved. The project now compiles without the motorware folder present on the drive.

    Many thanks for your time and effort!