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/AWR1642: Creating an .aer4f file using CCS

Part Number: AWR1642

Tool/software: Code Composer Studio

Hi xWR team,

My customer is trying to re-create the contents of the C:\ti\mmwave_sdk_01_02_00_05\packages\ti\drivers\can\lib directory, specifically the .aer4f files. For internal reasons he needs to re-structure the mmwSDK, and is attempting to do so using CCS to build the .aer4f file, however he is getting the following error:

'Building target: "can-MSS.aer4f"'
'Invoking: ARM Linker'
"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 --define=SOC_XWR16XX --define=SUBSYS_MSS -g --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi -z -m"can-MSS.map" --heap_size=0x800 --stack_size=0x800 -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS/lib" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="can-MSS_linkInfo.xml" --rom_model --be32 -o "can-MSS.aer4f" "./can.obj" "./can_xwr16xx.obj" "./dcan.obj" "../xwr1642_r4f.cmd"  -llibc.a
<Linking>

 undefined first referenced                                                                                
  symbol       in file                                                                                     
 --------- ----------------                                                                                
 main      C:\ti\ccsv7\tools\compiler\ti-cgt-arm_18.1.1.LTS\lib\rtsv7R4_A_be_v3D16_eabi.lib<args_main.c.obj>

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "can-MSS.aer4f" not built

>> Compilation failure
makefile:143: recipe for target 'can-MSS.aer4f' failed
gmake[1]: *** [can-MSS.aer4f] Error 1
makefile:139: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****

Errors:

Description    Resource    Path    Location    Type
#10010 null: errors encountered during linking; "can-MSS.aer4f" not built    can-MSS             C/C++ Problem
#10234-D null: unresolved symbols remain    can-MSS             C/C++ Problem
gmake: *** [all] Error 2    can-MSS             C/C++ Problem
gmake[1]: *** [can-MSS.aer4f] Error 1    can-MSS             C/C++ Problem
unresolved symbol main, first referenced in C:\ti\ccsv7\tools\compiler\ti-cgt-arm_18.1.1.LTS\lib\rtsv7R4_A_be_v3D16_eabi.lib<args_main.c.obj>    can-MSS             C/C++ Problem

Do you recommend building/setting up the project in a different way? Maybe a guide to building .aer4f files from a new project would be better here, so we can skip the debug and start off on the right foot.

Thanks,
Barend

  • Hi Barend,

    The simplest way to build in CCS is to create a project with a projectspec. All of the projectspecs that we provide (to build demos) create executables (.xer4f files). What needs to be done in this case is to run the archiver to produce libraries (.aer4f files). The easiest way I know of to do this is via a working example. I would rebuild the CAN library using the provided makefiles in the SDK, then copy the flags in the linker step to the new CCS projectspec. Also, armar.exe should probably be used instead of armcl.exe, and this will be seen as well when running the makefile to see what it is doing.

    -dave
  • Update on this: the customer added a main() function and it solved the error, but he does not want a main() in his code. Is there a way to circumvent this requirement?

    Thanks,
    Barend
  • I believe it is because an executable is being built, not a library.
  • Hi Dave,

    Thanks for the info! To clarify, I built a library(New CCS Project->AWR1642->Advance Settings->Output type: Static Library"), and I see a .lib file built, but not an .aer4f. To create the .aer4f file, I will need to run the archiver, correct? Following your above instructions, I looked at the mss_can_linker file in "C:\ti\mmwave_sdk_01_02_00_05\packages\ti\drivers\can\test\xwr16xx", but there doesn't seem to be much to the file, am I looking at the correct one? See below:

    /*----------------------------------------------------------------------------*/
    /* Linker Settings                                                            */
    --retain="*(.intvecs)"
    
    /*----------------------------------------------------------------------------*/
    /* Section Configuration                                                      */
    SECTIONS
    {
        systemHeap      : { } > DATA_RAM
        .MCPILogBuffer  : { } > DATA_RAM
    }
    /*----------------------------------------------------------------------------*/

    Also, is this: processors.wiki.ti.com/index.php/ProjectSpecs_in_CCS our best resource for understanding the ProjectSpec? Can you also please tell me a bit more about armar.exe and armcl.exe? I didn't have much luck googling.

    Thank you,
    Barend

  • There is a Compiler page in the wiki, but I don't think there's much there on the archiver. You can run it standalone, from DOS, like this:


    C:\ti\mmwave_sdk_01_02_00_05\packages\ti\drivers\can\lib> c:\ti\ti-cgt-arm_16.9.6.LTS\bin\armar -t libcan_xwr16xx.aer4f

    SIZE DATE FILE NAME
    -------- ------------------------ -----------------
    56700 Wed Mar 07 21:50:44 2018 can.oer4f
    79348 Wed Mar 07 21:50:45 2018 dcan.oer4f
    22500 Wed Mar 07 21:50:45 2018 can_xwr16xx.oer4f

    C:\ti\mmwave_sdk_01_02_00_05\packages\ti\drivers\can\lib>

    The -t causes a list of the library's objects to be printed. You can also get help: "armar -help". The compiler forum is a better place for this discussion, as this forum is for mmWave issues.

    -dave
  • Hi Dave,

    Thank you, I'll reach out to them.

    Thanks,
    Barend