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.

TivaWare example project startup_gcc.c stack is not 8 byte aligned, breaking gcc -flto

Other Parts Discussed in Thread: TM4C129XNCZAD, TM4C1294NCPDT

In the SW-EK-TM4C1294XL-2.1.0.12573.exe, examples/project/startup.gcc has the line:

static uint32_t pui32Stack[64];

which is used by the interrupt vector table to place the initial stack pointer. However, the arm ABI requires 8 byte alignment. This caused me some headaches w/ an implementation of printf to handle uint64_t  using va_args, which broke with a misaligned stack.

[EDIT to indicate that LTO wasn't the cause of my code blowing up, attempting to print uint64_t with a printf implementation was - LTO broke something unrelated due to excessive inlining breaking stack counting code]

  • Hello John

    Can you please share the Compile and Linker command line option being used with ARM EABI GNU tool chain?

    Regards
    Amit
  • Linker script:

    MEMORY
    {
        FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00100000
        SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00040000
    }

    SECTIONS
    {
        .text :
        {
            _text = .;
            KEEP(*(.isr_vector))
            *(.text*)
            *(.rodata*)
            _etext = .;
        } > FLASH
    /* Needed for 64-bit divide */
        .ARM.exidx : {
            __exidx_start = .;
            *(.ARM.exidx* .gnu.linkonce.armexidx.*)
            __exidx_end = .;
        } > FLASH
        .data :
        {
            _data = .;
            *(vtable)
            *(.data*)
            _edata = .;
        } > SRAM AT > FLASH
        _ldata = LOADADDR(.data);

        .bss :
        {
            _bss = .;
            *(.bss*)
            *(COMMON)
            _ebss = .;
        } > SRAM
    }

     

    Compiling startup_gcc.c:

    arm-stellaris-eabi-gcc -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C129XNCZAD -I/home/john/thesis/xbh -I/home/john/thesis/xbh/deps/TivaWare_driverlib -I/home/john/thesis/xbh/deps/TivaWare_driverlib/inc -I/home/john/thesis/xbh/deps/FreeRTOS/FreeRTOS//Source -I/home/john/thesis/xbh/deps/FreeRTOS/FreeRTOS//Source/include -I/home/john/thesis/xbh/deps/FreeRTOS/FreeRTOS//Source/portable/GCC/ARM_CM4F -I/home/john/thesis/xbh/deps/lwip/src/include -I/home/john/thesis/xbh/deps/lwip_port/tiva-tm4c129/include -std=gnu99 -DXBH_REVISION="afc6caf837897401b8ab0b64e69c0efc6c41e3a3" -Os -ggdb3 -flto=8 -fuse-linker-plugin -DTARGET_IS_TM4C129_RA0 -Dgcc -o /home/john/thesis/xbh/build/xbh/hal/startup_gcc.o -c /home/john/thesis/xbh/hal/startup_gcc.c

     

    Linking:

    arm-stellaris-eabi-gcc -T xbh.ld --entry ResetISR -Wl,--gc-sections -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -MD -std=c99 -Wall -pedantic -DPART_TM4C129XNCZAD -I/home/john/thesis/xbh -I/home/john/thesis/xbh/deps/TivaWare_driverlib -I/home/john/thesis/xbh/deps/TivaWare_driverlib/inc -I/home/john/thesis/xbh/deps/FreeRTOS/FreeRTOS//Source -I/home/john/thesis/xbh/deps/FreeRTOS/FreeRTOS//Source/include -I/home/john/thesis/xbh/deps/FreeRTOS/FreeRTOS//Source/portable/GCC/ARM_CM4F -I/home/john/thesis/xbh/deps/lwip/src/include -I/home/john/thesis/xbh/deps/lwip_port/tiva-tm4c129/include -std=gnu99 -DXBH_REVISION="afc6caf837897401b8ab0b64e69c0efc6c41e3a3" -Os -ggdb3 -flto=8 -fuse-linker-plugin -DTARGET_IS_TM4C129_RA0 -o /home/john/thesis/xbh/build/xbh.axf /home/john/thesis/xbh/build/xbh/hal/crc.o /home/john/thesis/xbh/build/xbh/hal/hal.o /home/john/thesis/xbh/build/xbh/hal/i2c_comm.o /home/john/thesis/xbh/build/xbh/hal/lwip_eth.o /home/john/thesis/xbh/build/xbh/hal/measure.o /home/john/thesis/xbh/build/xbh/hal/startup_gcc.o /home/john/thesis/xbh/build/xbh/hal/watchdog.o /home/john/thesis/xbh/build/xbh/main.o /home/john/thesis/xbh/build/xbh/util.o /home/john/thesis/xbh/build/xbh/xbd_multipacket.o /home/john/thesis/xbh/build/xbh/xbh.o /home/john/thesis/xbh/build/xbh/xbh_server.o /home/john/thesis/xbh/build/xbh/xbh_xbdcomm.o /home/john/thesis/xbh/lib/freertos.a /home/john/thesis/xbh/lib/libdriver.a /home/john/thesis/xbh/lib/liblwip.a /home/john/.opt/x-tools-linaro/arm-stellaris-eabi/lib/gcc/arm-stellaris-eabi/4.9.3/../../../../arm-stellaris-eabi/lib/libm.a /home/john/.opt/x-tools-linaro/arm-stellaris-eabi/lib/gcc/arm-stellaris-eabi/4.9.3/../../../../arm-stellaris-eabi/lib/libc.a /home/john/.opt/x-tools-linaro/arm-stellaris-eabi/lib/gcc/arm-stellaris-eabi/4.9.3/libgcc.a

     

     


    -> % arm-stellaris-eabi-objdump -j .bss -d xbh.axf


    xbh.axf:     file format elf32-littlearm


    Disassembly of section .bss:

    20000530 <_bss>:
        ...

    20000538 <reply_buf>:
        ...

    20000638 <xbh_cmd>:
        ...

    20000c14 <mac_addr>:
    20000c14:    00 00 00 00 00 00                                   ......

    20000c1a <XBDResponseBuf>:
        ...

    20000c40 <t_stop>:
        ...

    20000c48 <g_syshz>:
    20000c48:    00 00 00 00                                         ....

    20000c4c <udp_pcbs>:
    20000c4c:    00 00 00 00                                         ....

    20000c50 <ram_heap>:
        ...

    20010c6c <xActiveTimerList1>:
        ...

    20010c80 <xActiveTimerList2>:
        ...

    20010c94 <xbhsrv_task_handle>:
    20010c94:    00 00 00 00                                         ....

    20010c98 <ucMaxSysCallPriority>:
        ...

    20010c99 <memp_memory>:
        ...

    2002a3b4 <ulMaxPRIGROUPValue>:
    2002a3b4:    00 00 00 00                                         ....

    2002a3b8 <seqno.lto_priv.121>:
    2002a3b8:    00 00 00 00                                         ....

    2002a3bc <ackno.lto_priv.122>:
    2002a3bc:    00 00 00 00                                         ....

    2002a3c0 <recv_data.lto_priv.125>:
    2002a3c0:    00 00 00 00                                         ....

    2002a3c4 <recv_flags.lto_priv.126>:
        ...

    2002a3c5 <flags.lto_priv.123>:
        ...

    2002a3c6 <tcplen.lto_priv.124>:
        ...

    2002a3c8 <dhcp_rx_options_given>:
        ...

    2002a3d4 <xFreeBytesRemaining>:
    2002a3d4:    00 00 00 00                                         ....

    2002a3d8 <pxEnd>:
    2002a3d8:    00 00 00 00                                         ....

    2002a3dc <xStart>:
        ...

    2002a3e4 <ucHeap>:
        ...

    2003a3e4 <xBlockAllocatedBit>:
    2003a3e4:    00 00 00 00                                         ....

    2003a3e8 <xMinimumEverFreeBytesRemaining>:
    2003a3e8:    00 00 00 00                                         ....

    2003a3ec <dhcp_rx_options_val>:
        ...

    2003a414 <ram.lto_priv.171>:
    2003a414:    00 00 00 00                                         ....

    2003a418 <netif_default>:
    2003a418:    00 00 00 00                                         ....

    2003a41c <ram_end.lto_priv.172>:
    2003a41c:    00 00 00 00                                         ....

    2003a420 <lfree.lto_priv.173>:
    2003a420:    00 00 00 00                                         ....

    2003a424 <pbuf_free_ooseq_pending>:
    2003a424:    00 00 00 00                                         ....

    2003a428 <xid.5659>:
    2003a428:    00 00 00 00                                         ....

    2003a42c <ip_data>:
        ...

    2003a440 <g_ui32AbnormalInts>:
    2003a440:    00 00 00 00                                         ....

    2003a444 <g_pRxDescriptors>:
        ...

    2003a4d4 <netif_num>:
    2003a4d4:    00 00 00 00                                         ....

    2003a4d8 <pwr_sample_task_handle>:
    2003a4d8:    00 00 00 00                                         ....

    2003a4dc <eth_int_q_handle>:
    2003a4dc:    00 00 00 00                                         ....

    2003a4e0 <g_ui32NormalInts>:
    2003a4e0:    00 00 00 00                                         ....

    2003a4e4 <g_pTxDescriptors>:
        ...

    2003a604 <wrap_cap_cnt>:
    2003a604:    00 00 00 00                                         ....

    2003a608 <wrap_cnt>:
    2003a608:    00 00 00 00                                         ....

    2003a60c <eth_int_task_handle>:
    2003a60c:    00 00 00 00                                         ....

    2003a610 <lwip_netif>:
        ...

    2003a650 <cap_cnt>:
    2003a650:    00 00 00 00                                         ....

    2003a654 <wd_count.5023>:
        ...

    2003a655 <etharp_cached_entry>:
    2003a655:    00 00 00                                            ...

    2003a658 <tcpip_init_done_arg.lto_priv.164>:
    2003a658:    00 00 00 00                                         ....

    2003a65c <select_cb_list>:
    2003a65c:    00 00 00 00                                         ....

    2003a660 <select_cb_ctr>:
    2003a660:    00 00 00 00                                         ....

    2003a664 <ip_id>:
    2003a664:    00 00 00 00                                         ....

    2003a668 <tcpip_init_done.lto_priv.163>:
    2003a668:    00 00 00 00                                         ....

    2003a66c <mbox.lto_priv.165>:
    2003a66c:    00 00 00 00                                         ....

    2003a670 <sockets.lto_priv.150>:
        ...

    2003a6c0 <mem_mutex.lto_priv.130>:
    2003a6c0:    00 00 00 00                                         ....

    2003a6c4 <xPendingReadyList.lto_priv.142>:
        ...

    2003a6d8 <xTasksWaitingTermination.lto_priv.138>:
        ...

    2003a6ec <xSuspendedTaskList.lto_priv.143>:
        ...

    2003a700 <xInsideISR>:
    2003a700:    00 00 00 00                                         ....

    2003a704 <uxCurrentNumberOfTasks.lto_priv.139>:
    2003a704:    00 00 00 00                                         ....

    2003a708 <xDelayedTaskList1>:
        ...

    2003a71c <XBDCommandBuf.lto_priv.148>:
        ...

    2003a7bc <pxDelayedTaskList.lto_priv.135>:
    2003a7bc:    00 00 00 00                                         ....

    2003a7c0 <xbd_comm>:
    2003a7c0:    00 00 00 00                                         ....

    2003a7c4 <xTickCount.lto_priv.110>:
    2003a7c4:    00 00 00 00                                         ....

    2003a7c8 <pxCurrentTCB>:
    2003a7c8:    00 00 00 00                                         ....

    2003a7cc <g_inI2C>:
    2003a7cc:    00 00 00 00                                         ....

    2003a7d0 <xNumOfOverflows.lto_priv.140>:
    2003a7d0:    00 00 00 00                                         ....

    2003a7d4 <xSchedulerRunning.lto_priv.90>:
    2003a7d4:    00 00 00 00                                         ....

    2003a7d8 <uxTaskNumber>:
    2003a7d8:    00 00 00 00                                         ....

    2003a7dc <uxTopReadyPriority.lto_priv.134>:
    2003a7dc:    00 00 00 00                                         ....

    2003a7e0 <xDelayedTaskList2>:
        ...

    2003a7f4 <pxReadyTasksLists.lto_priv.137>:
        ...

    2003a858 <pxOverflowDelayedTaskList.lto_priv.136>:
    2003a858:    00 00 00 00                                         ....

    2003a85c <uxSchedulerSuspended.lto_priv.141>:
    2003a85c:    00 00 00 00                                         ....

    2003a860 <tcp_tw_pcbs>:
    2003a860:    00 00 00 00                                         ....

    2003a864 <tcp_listen_pcbs>:
    2003a864:    00 00 00 00                                         ....

    2003a868 <raw_pcbs.lto_priv.97>:
    2003a868:    00 00 00 00                                         ....

    2003a86c <tcp_active_pcbs>:
    2003a86c:    00 00 00 00                                         ....

    2003a870 <tcp_tmp_pcb>:
    2003a870:    00 00 00 00                                         ....

    2003a874 <xTimerQueue.lto_priv.133>:
    2003a874:    00 00 00 00                                         ....

    2003a878 <inseg.lto_priv.108>:
        ...

    2003a888 <tcp_bound_pcbs>:
    2003a888:    00 00 00 00                                         ....

    2003a88c <memp_tab.lto_priv.170>:
        ...

    2003a8bc <pxOverflowTimerList.lto_priv.160>:
    2003a8bc:    00 00 00 00                                         ....

    2003a8c0 <uxTasksDeleted>:
    2003a8c0:    00 00 00 00                                         ....

    2003a8c4 <uxPendedTicks>:
    2003a8c4:    00 00 00 00                                         ....

    2003a8c8 <xLastTime.5248>:
    2003a8c8:    00 00 00 00                                         ....

    2003a8cc <pxCurrentTimerList.lto_priv.159>:
    2003a8cc:    00 00 00 00                                         ....

    2003a8d0 <xYieldPending.lto_priv.144>:
    2003a8d0:    00 00 00 00                                         ....

    2003a8d4 <tcp_ticks>:
    2003a8d4:    00 00 00 00                                         ....

    2003a8d8 <netif_list>:
    2003a8d8:    00 00 00 00                                         ....

    2003a8dc <next_timeout.lto_priv.112>:
    2003a8dc:    00 00 00 00                                         ....

    2003a8e0 <tcp_input_pcb>:
    2003a8e0:    00 00 00 00                                         ....

    2003a8e4 <tcphdr.lto_priv.107>:
    2003a8e4:    00 00 00 00                                         ....

    2003a8e8 <tcp_optidx>:
        ...

    2003a8ea <tcp_active_pcbs_changed>:
        ...

    2003a8eb <tcp_timer>:
        ...

    2003a8ec <tcphdr_opt2.lto_priv.120>:
    2003a8ec:    00 00 00 00                                         ....

    2003a8f0 <tcphdr_opt1len.lto_priv.119>:
    2003a8f0:    00 00 00 00                                         ....

    2003a8f4 <tcpip_tcp_timer_active>:
    2003a8f4:    00 00 00 00                                         ....

    2003a8f8 <tcp_timer_ctr.lto_priv.109>:
    2003a8f8:    00 00 00 00                                         ....

    2003a8fc <arp_table.lto_priv.111>:
        ...

    2003a9ec <pui32Stack>:
        ...

    2003aaec <errno>:
    2003aaec:    00 00 00 00                                         ....

    Note the that the address of pui32Stack is not 8-byte aligned.

  • Hello John

    Since the pui32Stack is defined to be 32-bit unsigned integer, the compiler will use a 4 byte alignment. Unless you specify the attribute of REQUIRE8 it will map it to 32-bit aligned location (as per the ARM documentation)

    Regards
    Amit
  • I realize that; I'm trying to point out that the examples bundled w/ Tivaware should have either have the pui32Stack specified with __attribute__(aligned(8)), defined as uint64_t, or defined in the linker script w/ the appropriate alignment, and that it's a bug w/ Tivaware which is missing these attributes.

  • I would go even further and say the whole stack / heap management is fundamentally broken in the CCS V7 ARM GCC default project settings. The tm4c1294ncpdt_startup_ccs_gcc.c startup code is not even considering the heap and stack size defined in the linker script. The only thing that is taken care of is copying initialized variables to RAM and zero the BSS.

    The Stack is initialized to 128 words, and the location of the stack is purely depended on where pui32Stack is actually placed. It should be initialised to RAMTOP which is around 0x20040000. As it should be 8 byte aligned (otherwise it not only breaks the -flto, but also any floating point printf-operation, see here: answers.launchpad.net/.../235875 ) I guess it should be set to 0x2003 FFF8.

    Right now it is pure luck if all your variables by chance make pui32Stack sit on a 8 byte boundary. And the default stack size with 128 words is ridiculously low with a 256K ram device which cost me hours to figure out whats actually going on. Lots of hard fault stuff going on.

    For now I increased the

    static uint32_t pui32Stack[128];

    to 

    static uint32_t __attribute__((aligned(0x8))) pui32Stack[32768];

    to make it larger and proper aligned, which works, but still the stack is in between BSS and HEAP where it definitely should not be. I still experience issue, and I'm not sure this is heap related, I think vsnprintf and va_arg actually do use the heap and malloc()

    My Map File looks like this afterwards:

     .bss.ucScreenNumber.6949
                    0x200012d1        0x1 ./main.o
     *fill*         0x200012d2        0x6 
     .bss.pui32Stack
                    0x200012d8    0x20000 ./tm4c1294ncpdt_startup_ccs_gcc.o
     .bss.ucRxState.5279
                    0x200212d8        0x4 ./Communication/Communication.o
     .bss.nRxBytes.5281
                    0x200212dc        0x8 ./Communication/Communication.o
     .bss.bDataLinkEscape.5280
                    0x200212e4        0x4 ./Communication/Communication.o
     .bss.__malloc_sbrk_start
                    0x200212e8        0x4 c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-nano-mallocr.o)
                    0x200212e8                __malloc_sbrk_start
     .bss.__malloc_free_list
                    0x200212ec        0x4 c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-nano-mallocr.o)
                    0x200212ec                __malloc_free_list
     .bss.heap_end.4079
                    0x200212f0        0x4 c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libnosys.a(sbrk.o)
     *(COMMON)
     COMMON         0x200212f4      0x4d0 ./IconManager.o
                    0x200212f4                StatusIcons
     *fill*         0x200217c4        0x4 
     COMMON         0x200217c8      0x3c8 ./NMEAParser.o
                    0x200217c8                dLonSecs
                    0x200217d0                dVTGTrueHeading
                    0x200217d8                dGGAAltitude
                    0x200217e0                dwGGACount
                    0x200217e4                ucGGAHour
                    0x200217e8                nGGAOldVSpeedSeconds
                    0x200217ec                ucChecksum
                    0x200217f0                dGGAOldVSpeedAlt
                    0x200217f8                ucNumRxBytes
                    0x200217f9                ucReceivedChecksum
                    0x200217fc                pData
                    0x200218fc                wIndex
                    0x20021900                nState
                    0x20021904                ucNMEARxData
                    0x200219fe                ucGGAMinute
                    0x200219ff                ucGPSPositionValid
                    0x20021a00                dLatDegrees
                    0x20021a08                ucNMEAAvail
                    0x20021a09                ucGGAGPSQuality
                    0x20021a10                dGGALongitude
                    0x20021a18                dwCommandCount
                    0x20021a20                dGGAVertSpeed
                    0x20021a28                dVTGMagneticHeading
                    0x20021a30                dVTGSpeedInKmh
                    0x20021a38                dwVTGCount
                    0x20021a40                dLatSecs
                    0x20021a48                dLonDegrees
                    0x20021a50                dGGALatitude
                    0x20021a58                dLatMinutes
                    0x20021a60                ucGGANumOfSatsInUse
                    0x20021a64                pCommand
                    0x20021a70                dGGAHDOP
                    0x20021a78                ucNMEAString
                    0x20021b78                dLonMinutes
                    0x20021b80                ucGGASecond
                    0x20021b88                dVTGSpeedInknots
     COMMON         0x20021b90       0x28 ./adc.o
                    0x20021b90                uiADCChannels
     COMMON         0x20021bb8       0x58 ./ds3231.o
                    0x20021bb8                aDSBuffer
                    0x20021bf8                ucHour
                    0x20021bf9                ucDayOfWeek
                    0x20021bfa                ucMonth
                    0x20021bfc                uiYear
                    0x20021bfe                ucSecond
                    0x20021bff                ucMinute
                    0x20021c00                ucDayOfMonth
                    0x20021c08                dTemperature
     COMMON         0x20021c10        0x4 ./int035.o
                    0x20021c10                pFontGlyphDefs
     COMMON         0x20021c14      0x305 ./main.o
                    0x20021c14                CurrentGPSPosition
                    0x20021c2b                bWipeOnce
                    0x20021c2c                MyHousekeeping
                    0x20021c34                uiPublicKeyLen
                    0x20021c38                iMeanInputVoltage
                    0x20021c3a                iMeanCoreVoltage
                    0x20021c3c                ucCurrentFrame
                    0x20021c40                aPublicKeyBuffer
                    0x20021f08                CurrentTime
                    0x20021f10                bLoadFlag
                    0x20021f12                uiMeanTemperatureInt
                    0x20021f14                g_ui32SysClock
                    0x20021f18                bProgramRunning
     *fill*         0x20021f19        0x7 
     COMMON         0x20021f20       0x10 ./timer.o
                    0x20021f20                ucAnimationFlag
                    0x20021f22                uimsDelay
                    0x20021f24                g_uiSysTickReload
                    0x20021f28                g_ullSysTicks
     COMMON         0x20021f30     0x1230 ./Communication/Communication.o
                    0x20021f30                TransmitCharFunction
                    0x20021f40                RxMsgCompleteFunc
                    0x20021f50                uiProcessedMessages
                    0x20021f58                aPrintBuf
                    0x20022058                uiNumCRCRxErrors
                    0x20022060                aCommRxBuffer
                    0x20022860                sMyCommand
                    0x20022960                aCommTxBuffer
     COMMON         0x20023160        0x4 c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a(lib_a-reent.o)
                    0x20023160                errno
                    0x20023164                . = ALIGN (0x4)
                    0x20023164                __bss_end__ = .
    
    .heap           0x20023164        0x0
                    0x20023164                __heap_start__ = .
                    0x20023164                end = __heap_start__
                    0x20023164                _end = end
                    0x20023164                __end = end
     *(.heap)
                    0x20023164                __heap_end__ = .
                    0x20023164                __HeapLimit = __heap_end__
    
    .stack          0x20023168        0x0
                    0x20023168                _stack = .
                    0x20023168                __stack = .
     *(.stack)
    START GROUP
    LOAD c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libnosys.a
    LOAD c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a
    LOAD c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/armv7e-m/fpu\libgcc.a
    LOAD c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_nano.a
    LOAD c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libm.a
    END GROUP
    START GROUP
    LOAD c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/armv7e-m/fpu\libgcc.a
    LOAD c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg_nano.a
    LOAD c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a
    END GROUP
    START GROUP
    LOAD c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/armv7e-m/fpu\libgcc.a
    LOAD c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc_nano.a
    END GROUP
    LOAD c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/armv7e-m/fpu/crtend.o
    LOAD c:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/armv7e-m/fpu/crtn.o
    OUTPUT(VKS_MS_NG_45_Firmware.out elf32-littlearm)

    Anyone has a better startup file?

    Markus