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.

Hello world program with TI-cgt-arm lining with libc.a

Other Parts Discussed in Thread: TDA4VM

hi guys

writing small hello world program, 

int main(int argc, char *argv[])

{

if (Counter1 >= 100)
{
Counter1=0;
}
else
{Counter1++;}

Counter6[0]=100;
Counter6[199]=100;
Counter5[1]=100;
Counter5[99]=100;
myPrintHelloMake();
/* BswM_MainFunction();
Dcm_MainFunctionTimer();
Dcm_MainFunction(); */
mul_div(1,2,4);

return 0;

}

linker options used along with runt time library libc.a

--emit_warnings_as_errors
-qq --diag_warning=225 --diag_suppress=23000
-w -q
-c
-mv7R5
--diag_suppress=10063
--abi=eabi
--embedded_constants=on
--object_format=elf
--quiet
--silicon_version=7R5
--issue_remarks
--rom_model
--heap_size=0x8000

I am able link program and generate .elf/.hex

but I am really now sure as my helloworld program is linked as from .map output file is 

SECTION ALLOCATION MAP

output attributes/
section page origin length input sections
-------- ---- ---------- ---------- ----------------
.OS_EXCVEC_CORE0_CODE
* 0 41010000 00000000 UNINITIALIZED

.cinit 0 41ce2100 00000000 UNINITIALIZED

__llvm_prf_cnts
* 0 9d000000 00000000 UNINITIALIZED

MODULE SUMMARY

how to make sure libc.a will call out main function(defined in helloworld) so that all samples  code will get link in .elf/hex

  • but I am really not sure as my helloworld program is linked as from .map output file is 

  • how to make sure libc.a will call out main function(defined in helloworld) so that all samples  code will get link in .elf/hex

    When a CCS project is created for an Executable output type, libc.a normally ends up calling out to main without any specific configuration required in the CCS project.

    Can you show the complete output from the CCS Console when you re-build your helloworld program?

  • Hello Ganesh,

    What uController are you using? 

    ~Leonard 

  • INFO: Start TriCore_Debug Build
    INFO: Workspace: C:\GIT_Repo\L2H5050_Software\L2H5050_Software\build\TriCore_Debug


    C:\prjtools\cmake\ver_3.16.6\bin\cmake.exe --build C:\GIT_Repo\L2H5050_Software\L2H5050_Software\\build\TriCore_Debug --target all --config DEBUG -j 4
    [1/2] Building C object CMakeFiles\VW_L2H5050_FCM_Application.elf.dir\HELLOWORLD\hello.c.obj
    TI ARM C/C++ Compiler v20.2.0.LTS
    Copyright (c) 1996-2018 Texas Instruments Incorporated
    "C:\GIT_Repo\L2H5050_Software\L2H5050_Software\pkg\HELLOWORLD\hello.c" ==> myPrintHelloMake
    "C:\GIT_Repo\L2H5050_Software\L2H5050_Software\pkg\HELLOWORLD\hello.c" ==> mul_div
    [2/2] Linking C executable bin\VW_L2H5050_FCM_Application.elf
    <Linking>
    remark: automatic RTS selection: linking in "rtsv4_A_le_eabi.lib" in place of
    index library "libc.a"


    lst files copied to: C:\GIT_Repo\L2H5050_Software\L2H5050_Software\\build\TriCore_Debug\lst
    object files copied to: C:\GIT_Repo\L2H5050_Software\L2H5050_Software\\build\TriCore_Debug\obj
    error files copied to: C:\GIT_Repo\L2H5050_Software\L2H5050_Software\\build\TriCore_Debug\err


    INFO: Build Successful
    Build took 0:0:1 (1.10s total)
    ExitCode: 0.

    ========================================================================================================
    BUILD successful for Variant: TriCore_Debug
    ========================================================================================================
    Script start at: 9:57:02
    Script ended at: 9:57:05

    This is output console

  • @chester see below

    INFO: Start TriCore_Debug Build
    INFO: Workspace: C:\GIT_Repo\L2H5050_Software\L2H5050_Software\build\TriCore_Debug


    C:\prjtools\cmake\ver_3.16.6\bin\cmake.exe --build C:\GIT_Repo\L2H5050_Software\L2H5050_Software\\build\TriCore_Debug --target all --config DEBUG -j 4
    [1/2] Building C object CMakeFiles\VW_L2H5050_FCM_Application.elf.dir\HELLOWORLD\hello.c.obj
    TI ARM C/C++ Compiler v20.2.0.LTS
    Copyright (c) 1996-2018 Texas Instruments Incorporated
    "C:\GIT_Repo\L2H5050_Software\L2H5050_Software\pkg\HELLOWORLD\hello.c" ==> myPrintHelloMake
    "C:\GIT_Repo\L2H5050_Software\L2H5050_Software\pkg\HELLOWORLD\hello.c" ==> mul_div
    [2/2] Linking C executable bin\VW_L2H5050_FCM_Application.elf
    <Linking>
    remark: automatic RTS selection: linking in "rtsv4_A_le_eabi.lib" in place of
    index library "libc.a"


    lst files copied to: C:\GIT_Repo\L2H5050_Software\L2H5050_Software\\build\TriCore_Debug\lst
    object files copied to: C:\GIT_Repo\L2H5050_Software\L2H5050_Software\\build\TriCore_Debug\obj
    error files copied to: C:\GIT_Repo\L2H5050_Software\L2H5050_Software\\build\TriCore_Debug\err


    INFO: Build Successful
    Build took 0:0:1 (1.10s total)
    ExitCode: 0.

    ========================================================================================================
    BUILD successful for Variant: TriCore_Debug
    ========================================================================================================
    Script start at: 9:57:02
    Script ended at: 9:57:05

  • Hello LeonardEllis, we planned to use TI TDA4VM SOC