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.

warning on linking about libmath.a not compatible

Other Parts Discussed in Thread: MSP430F47187, MSPMATHLIB

hi, 

i just upgraded to ccs6 and c compiler v4.3.4 but now i get a warning at linking step

'Invoking: MSP430 Linker'
"c:/ti/ccsv6/tools/compiler/msp430_4.3.4/bin/cl430" -vmspx --abi=coffabi --code_model=large --data_model=restricted --near_data=none -O2 --opt_for_speed=3 --symdebug:none --gcc --define=__MSP430F47187__ --define=H_CC --define=S_AC --diag_warning=225 --display_error_number --printf_support=full -z -m"MBFireflies.map" --heap_size=80 --stack_size=80 --use_hw_mpy=32 --cinit_hold_wdt=on -i"c:/ti/ccsv6/ccs_base/msp430/include" -i"c:/ti/ccsv6/tools/compiler/msp430_4.3.4/lib" -i"c:/ti/ccsv6/tools/compiler/msp430_4.3.4/include" -i"c:/ti/ccsv6/ccs_base/msp430/lib/4xx" --reread_libs --warn_sections --display_error_number --xml_link_info="MBFireflies_linkInfo.xml" --rom_model -o "MBFireflies.out" "./HardwareProfile.obj" "./main.obj" "./Peripheral/INT_Pin.obj" "./Peripheral/MSPI2C.obj" "./Peripheral/MSPUART.obj" "./Peripheral/sd16a.obj" "./Peripheral/spi.obj" "./Peripheral/systemClock.obj" "./Peripheral/timer.obj" "./Measures/Alarms.obj" "./Measures/MeasureAZFuelGauge.obj" "./Measures/MeasureBattery.obj" "./Measures/MeasureCairClip.obj" "./Measures/MeasureChannels.obj" "./Measures/MeasureGPS.obj" "./Measures/MeasureISL29023.obj" "./Measures/MeasureMICOZ47.obj" "./Measures/MeasureModbus.obj" "./Measures/MeasureMultiMode.obj" "./Measures/MeasureNoise.obj" "./Measures/MeasureNoise_v2.obj" "./Measures/MeasurePPD42NS.obj" "./Measures/MeasureS100.obj" "./Measures/MeasureSHT21.obj" "./Measures/MeasureTeleInfo.obj" "./Drivers/23K640.obj" "./Drivers/25X016.obj" "./Drivers/G24.obj" "./Drivers/HRider.obj" "./Drivers/LEDBiColor.obj" "./Drivers/M41T93.obj" "./Drivers/MCP3301.obj" "./Drivers/OLED_M300.obj" "./Drivers/PowerCommutation.obj" "./Drivers/SC16IS7XX.obj" "./Drivers/SC18IS600.obj" "./Drivers/Timer.obj" "./Drivers/UARTCommon.obj" "./Drivers/WaveCard.obj" "./Drivers/XBee.obj" "./Drivers/XBee_v2.obj" "./Common/UtilsDerell.obj" "./Apps/ConfigNPA.obj" "./Apps/ConfigNTA.obj" "./Apps/ConfigNTS.obj" "./Apps/ConsoleNPA.obj" "./Apps/ConsoleNTA.obj" "./Apps/ConsoleNTS.obj" "./Apps/IHM_Display.obj" "./Apps/MainNPA.obj" "./Apps/MainNTA.obj" "./Apps/MainNTS.obj" "./API/Config.obj" "./API/Console.obj" "./API/CoronisAPI.obj" "./API/FTPClient.obj" "./API/FWUpdate.obj" "./API/FileSystem.obj" "./API/GFX_displayAPI.obj" "./API/GPO.obj" "./API/GatewayComm.obj" "./API/GatewayComm_v2.obj" "./API/HRiderAPI.obj" "./API/LEDAPI.obj" "./API/ModbusAPI .obj" "./API/PICComm.obj" "./API/PubWrapperEth.obj" "./API/PubWrapperG24.obj" "./API/ServerComm.obj" "./API/Sleep.obj" "./API/TCPClient.obj" "./API/ZBComm.obj" "./API/ZBComm_v2.obj" "./API/glcdfont.obj" "../lnk_msp430f47187-MBFireflies.cmd" -l"libmath.a" -l"libc.a"
<Linking>
warning #10204-D: could not resolve index library "libmath.a" to a compatible
library

i have read some other posts about this without found a solution.

i have check the lib dir, but all seem to be good for me..

Répertoire de C:\ti\ccsv6\ccs_base\msp430\lib\4xx

22/09/2014 17:45 <REP> .
22/09/2014 17:45 <REP> ..
16/05/2014 17:02 2 078 libmath.a
16/05/2014 17:02 113 688 MSPMATHLIB_CCS_msp430_4xx_CPUX_large_code_large_data.lib
16/05/2014 17:02 113 624 MSPMATHLIB_CCS_msp430_4xx_CPUX_large_code_restricted_data.lib
16/05/2014 17:02 113 480 MSPMATHLIB_CCS_msp430_4xx_CPUX_large_code_small_data.lib
16/05/2014 17:02 113 480 MSPMATHLIB_CCS_msp430_4xx_CPUX_small_code_small_data.lib
16/05/2014 17:02 114 560 MSPMATHLIB_CCS_msp430_4xx_small_code_small_data.lib

please help, i don't like this kind of warning...

  • The problem is you are building with the older COFF ABI, but all those MSPMATHLIB libraries are built for the newer EABI.  So, the warning is correct, none of the libraries are compatible.  You need to change from --abi=coffabi to --abi=eabi.

    Thanks and regards,

    -George

  • hum, ok, but if i choose then new EABI, i get a linker error like this:

    'Invoking: MSP430 Linker'
    "c:/ti/ccsv6/tools/compiler/msp430_4.3.4/bin/cl430" -vmspx --abi=eabi --code_model=large --data_model=restricted --near_data=globals -O2 --opt_for_speed=3 --symdebug:none --gcc --define=__MSP430F47187__ --define=H_CC --define=S_AC --diag_warning=225 --display_error_number --printf_support=full -z -m"MBFireflies.map" --heap_size=80 --stack_size=80 --use_hw_mpy=32 --cinit_hold_wdt=on -i"c:/ti/ccsv6/ccs_base/msp430/include" -i"c:/ti/ccsv6/tools/compiler/msp430_4.3.4/lib" -i"c:/ti/ccsv6/tools/compiler/msp430_4.3.4/include" -i"c:/ti/ccsv6/ccs_base/msp430/lib/4xx" --reread_libs --warn_sections --display_error_number --xml_link_info="MBFireflies_linkInfo.xml" --rom_model -o "MBFireflies.out" "./HardwareProfile.obj" "./main.obj" "./Peripheral/INT_Pin.obj" "./Peripheral/MSPI2C.obj" "./Peripheral/MSPUART.obj" "./Peripheral/sd16a.obj" "./Peripheral/spi.obj" "./Peripheral/systemClock.obj" "./Peripheral/timer.obj" "./Measures/Alarms.obj" "./Measures/MeasureAZFuelGauge.obj" "./Measures/MeasureBattery.obj" "./Measures/MeasureCairClip.obj" "./Measures/MeasureChannels.obj" "./Measures/MeasureGPS.obj" "./Measures/MeasureISL29023.obj" "./Measures/MeasureMICOZ47.obj" "./Measures/MeasureModbus.obj" "./Measures/MeasureMultiMode.obj" "./Measures/MeasureNoise.obj" "./Measures/MeasureNoise_v2.obj" "./Measures/MeasurePPD42NS.obj" "./Measures/MeasureS100.obj" "./Measures/MeasureSHT21.obj" "./Measures/MeasureTeleInfo.obj" "./Drivers/23K640.obj" "./Drivers/25X016.obj" "./Drivers/G24.obj" "./Drivers/HRider.obj" "./Drivers/LEDBiColor.obj" "./Drivers/M41T93.obj" "./Drivers/MCP3301.obj" "./Drivers/OLED_M300.obj" "./Drivers/PowerCommutation.obj" "./Drivers/SC16IS7XX.obj" "./Drivers/SC18IS600.obj" "./Drivers/Timer.obj" "./Drivers/UARTCommon.obj" "./Drivers/WaveCard.obj" "./Drivers/XBee.obj" "./Drivers/XBee_v2.obj" "./Common/UtilsDerell.obj" "./Apps/ConfigNPA.obj" "./Apps/ConfigNTA.obj" "./Apps/ConfigNTS.obj" "./Apps/ConsoleNPA.obj" "./Apps/ConsoleNTA.obj" "./Apps/ConsoleNTS.obj" "./Apps/IHM_Display.obj" "./Apps/MainNPA.obj" "./Apps/MainNTA.obj" "./Apps/MainNTS.obj" "./API/Config.obj" "./API/Console.obj" "./API/CoronisAPI.obj" "./API/FTPClient.obj" "./API/FWUpdate.obj" "./API/FileSystem.obj" "./API/GFX_displayAPI.obj" "./API/GPO.obj" "./API/GatewayComm.obj" "./API/GatewayComm_v2.obj" "./API/HRiderAPI.obj" "./API/LEDAPI.obj" "./API/ModbusAPI .obj" "./API/PICComm.obj" "./API/PubWrapperEth.obj" "./API/PubWrapperG24.obj" "./API/ServerComm.obj" "./API/Sleep.obj" "./API/TCPClient.obj" "./API/ZBComm.obj" "./API/ZBComm_v2.obj" "./API/glcdfont.obj" "../lnk_msp430f47187-MBFireflies.cmd" -l"libc.a" -l"libmath.a"
    <Linking>
    "../lnk_msp430f47187-MBFireflies.cmd", line 164: error #10099-D: program will
    not fit into available memory. placement with alignment fails for section

    >> Compilation failure
    ".cinit" size 0x92 . Available memory ranges:
    FLASH size: 0xc4b0 unused: 0x0 max hole: 0x0
    error #10010: errors encountered during linking; "MBFireflies.out" not built
    gmake: *** [MBFireflies.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

    i'm sure the code size is small ti fit in flash (with legacy coff, all is good !)

    here my cmd file (same used for many projects based on approx same hardware.)

    /******************************************************************************/
    /* lnk_msp430f47187.cmd - LINKER COMMAND FILE FOR LINKING MSP430F47187 PROGRAMS */
    /* */
    /* Usage: lnk430 <obj files...> -o <out file> -m <map file> lnk.cmd */
    /* cl430 <src files...> -z -o <out file> -m <map file> lnk.cmd */
    /* */
    /*----------------------------------------------------------------------------*/
    /* These linker options are for command line linking only. For IDE linking, */
    /* you should set your linker options in Project Properties */
    /* -c LINK USING C CONVENTIONS */
    /* -stack 0x0100 SOFTWARE STACK SIZE */
    /* -heap 0x0100 HEAP AREA SIZE */
    /* */
    /*----------------------------------------------------------------------------*/


    /****************************************************************************/
    /* SPECIFY THE SYSTEM MEMORY MAP */
    /****************************************************************************/

    MEMORY
    {
    SFR : origin = 0x0000, length = 0x0010
    PERIPHERALS_8BIT : origin = 0x0010, length = 0x00F0
    PERIPHERALS_16BIT : origin = 0x0100, length = 0x0100
    RAM : origin = 0x1100, length = 0x2000
    INFOA : origin = 0x10C0, length = 0x0040
    INFOB : origin = 0x1080, length = 0x0040
    INFOC : origin = 0x1040, length = 0x0040
    INFOD : origin = 0x1000, length = 0x0040
    FWINFO : origin = 0x3100, length = 0x0010
    #if defined(DEBUG)
    FLASH : origin = 0x3110, length = 0xCEB0
    INT00 : origin = 0xFFC0, length = 0x0002
    INT01 : origin = 0xFFC2, length = 0x0002
    INT02 : origin = 0xFFC4, length = 0x0002
    INT03 : origin = 0xFFC6, length = 0x0002
    INT04 : origin = 0xFFC8, length = 0x0002
    INT05 : origin = 0xFFCA, length = 0x0002
    INT06 : origin = 0xFFCC, length = 0x0002
    INT07 : origin = 0xFFCE, length = 0x0002
    INT08 : origin = 0xFFD0, length = 0x0002
    INT09 : origin = 0xFFD2, length = 0x0002
    INT10 : origin = 0xFFD4, length = 0x0002
    INT11 : origin = 0xFFD6, length = 0x0002
    INT12 : origin = 0xFFD8, length = 0x0002
    INT13 : origin = 0xFFDA, length = 0x0002
    INT14 : origin = 0xFFDC, length = 0x0002
    INT15 : origin = 0xFFDE, length = 0x0002
    INT16 : origin = 0xFFE0, length = 0x0002
    INT17 : origin = 0xFFE2, length = 0x0002
    INT18 : origin = 0xFFE4, length = 0x0002
    INT19 : origin = 0xFFE6, length = 0x0002
    INT20 : origin = 0xFFE8, length = 0x0002
    INT21 : origin = 0xFFEA, length = 0x0002
    INT22 : origin = 0xFFEC, length = 0x0002
    INT23 : origin = 0xFFEE, length = 0x0002
    INT24 : origin = 0xFFF0, length = 0x0002
    INT25 : origin = 0xFFF2, length = 0x0002
    INT26 : origin = 0xFFF4, length = 0x0002
    INT27 : origin = 0xFFF6, length = 0x0002
    INT28 : origin = 0xFFF8, length = 0x0002
    INT29 : origin = 0xFFFA, length = 0x0002
    INT30 : origin = 0xFFFC, length = 0x0002
    RESET : origin = 0xFFFE, length = 0x0002
    FLASH2 : origin = 0x10000,length = 0x10000
    #elif defined(BSL)
    BOOTINFO : origin = 0xF600, length = 0x0010
    FLASH : origin = 0xF610, length = 0x0930
    INTBOOTWRAPPER : origin = 0xFF40, length = 0x0080
    INT00 : origin = 0xFFC0, length = 0x0002
    INT01 : origin = 0xFFC2, length = 0x0002
    INT02 : origin = 0xFFC4, length = 0x0002
    INT03 : origin = 0xFFC6, length = 0x0002
    INT04 : origin = 0xFFC8, length = 0x0002
    INT05 : origin = 0xFFCA, length = 0x0002
    INT06 : origin = 0xFFCC, length = 0x0002
    INT07 : origin = 0xFFCE, length = 0x0002
    INT08 : origin = 0xFFD0, length = 0x0002
    INT09 : origin = 0xFFD2, length = 0x0002
    INT10 : origin = 0xFFD4, length = 0x0002
    INT11 : origin = 0xFFD6, length = 0x0002
    INT12 : origin = 0xFFD8, length = 0x0002
    INT13 : origin = 0xFFDA, length = 0x0002
    INT14 : origin = 0xFFDC, length = 0x0002
    INT15 : origin = 0xFFDE, length = 0x0002
    INT16 : origin = 0xFFE0, length = 0x0002
    INT17 : origin = 0xFFE2, length = 0x0002
    INT18 : origin = 0xFFE4, length = 0x0002
    INT19 : origin = 0xFFE6, length = 0x0002
    INT20 : origin = 0xFFE8, length = 0x0002
    INT21 : origin = 0xFFEA, length = 0x0002
    INT22 : origin = 0xFFEC, length = 0x0002
    INT23 : origin = 0xFFEE, length = 0x0002
    INT24 : origin = 0xFFF0, length = 0x0002
    INT25 : origin = 0xFFF2, length = 0x0002
    INT26 : origin = 0xFFF4, length = 0x0002
    INT27 : origin = 0xFFF6, length = 0x0002
    INT28 : origin = 0xFFF8, length = 0x0002
    INT29 : origin = 0xFFFA, length = 0x0002
    INT30 : origin = 0xFFFC, length = 0x0002
    RESET : origin = 0xFFFE, length = 0x0002
    #else
    FLASH : origin = 0x3110, length = 0xC4B0
    INT00 : origin = 0xF5C0, length = 0x0002
    INT01 : origin = 0xF5C2, length = 0x0002
    INT02 : origin = 0xF5C4, length = 0x0002
    INT03 : origin = 0xF5C6, length = 0x0002
    INT04 : origin = 0xF5C8, length = 0x0002
    INT05 : origin = 0xF5CA, length = 0x0002
    INT06 : origin = 0xF5CC, length = 0x0002
    INT07 : origin = 0xF5CE, length = 0x0002
    INT08 : origin = 0xF5D0, length = 0x0002
    INT09 : origin = 0xF5D2, length = 0x0002
    INT10 : origin = 0xF5D4, length = 0x0002
    INT11 : origin = 0xF5D6, length = 0x0002
    INT12 : origin = 0xF5D8, length = 0x0002
    INT13 : origin = 0xF5DA, length = 0x0002
    INT14 : origin = 0xF5DC, length = 0x0002
    INT15 : origin = 0xF5DE, length = 0x0002
    INT16 : origin = 0xF5E0, length = 0x0002
    INT17 : origin = 0xF5E2, length = 0x0002
    INT18 : origin = 0xF5E4, length = 0x0002
    INT19 : origin = 0xF5E6, length = 0x0002
    INT20 : origin = 0xF5E8, length = 0x0002
    INT21 : origin = 0xF5EA, length = 0x0002
    INT22 : origin = 0xF5EC, length = 0x0002
    INT23 : origin = 0xF5EE, length = 0x0002
    INT24 : origin = 0xF5F0, length = 0x0002
    INT25 : origin = 0xF5F2, length = 0x0002
    INT26 : origin = 0xF5F4, length = 0x0002
    INT27 : origin = 0xF5F6, length = 0x0002
    INT28 : origin = 0xF5F8, length = 0x0002
    INT29 : origin = 0xF5FA, length = 0x0002
    INT30 : origin = 0xF5FC, length = 0x0002
    RESET : origin = 0xF5FE, length = 0x0002
    BSL_RESERVED : origin = 0xF600, length = 0x0A00
    FLASH2 : origin = 0x10000,length = 0x10000
    #endif
    }

    /****************************************************************************/
    /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
    /****************************************************************************/

    SECTIONS
    {
    .bss : {} > RAM /* GLOBAL & STATIC VARS */
    .data : {} > RAM /* GLOBAL & STATIC VARS */
    .TI.noinit : {} > RAM /* For #pragma noinit */
    .sysmem : {} > RAM /* DYNAMIC MEMORY ALLOCATION AREA */
    .stack : {} > RAM (HIGH) /* SOFTWARE SYSTEM STACK */

    .fwinfo : {} > FWINFO
    #if defined(BSL)
    .bootinfo : {} > BOOTINFO
    .text : {}>> FLASH /* CODE */
    .const : {} > FLASH /* CONSTANT DATA */
    #else
    .bootinfo : {} > FLASH | FLASH2 // unused except in BSL mode
    .text : {}>> FLASH | FLASH2 /* CODE */
    .const : {} > FLASH | FLASH2 /* CONSTANT DATA */
    #endif
    .text:_isr : {} > FLASH /* ISR CODE SPACE */
    .cinit : {} > FLASH /* INITIALIZATION TABLES */
    .cio : {} > RAM /* C I/O BUFFER */

    .pinit : {} > FLASH /* C++ CONSTRUCTOR TABLES */
    .init_array : {} > FLASH /* C++ CONSTRUCTOR TABLES */
    .mspabi.exidx : {} > FLASH /* C++ CONSTRUCTOR TABLES */
    .mspabi.extab : {} > FLASH /* C++ CONSTRUCTOR TABLES */

    .infoA : {} > INFOA /* MSP430 INFO FLASH MEMORY SEGMENTS */
    .infoB : {} > INFOB
    .infoC : {} > INFOC
    .infoD : {} > INFOD

    /* MSP430 INTERRUPT VECTORS */
    #if defined(BSL)
    .intwrapper : {} > INTBOOTWRAPPER /* MSP430 INTERRUPT VECTORS */
    #endif
    .int00 : {} > INT00
    .int01 : {} > INT01
    .int02 : {} > INT02
    .int03 : {} > INT03
    .int04 : {} > INT04
    .int05 : {} > INT05
    .int06 : {} > INT06
    .int07 : {} > INT07
    .int08 : {} > INT08
    .int09 : {} > INT09
    .int10 : {} > INT10
    .int11 : {} > INT11
    .int12 : {} > INT12
    .int13 : {} > INT13
    .int14 : {} > INT14
    DMA : { * ( .int15 ) } > INT15 type = VECT_INIT
    BASICTIMER : { * ( .int16 ) } > INT16 type = VECT_INIT
    PORT2 : { * ( .int17 ) } > INT17 type = VECT_INIT
    USCIAB1TX : { * ( .int18 ) } > INT18 type = VECT_INIT
    USCIAB1RX : { * ( .int19 ) } > INT19 type = VECT_INIT
    PORT1 : { * ( .int20 ) } > INT20 type = VECT_INIT
    TIMERA1 : { * ( .int21 ) } > INT21 type = VECT_INIT
    TIMERA0 : { * ( .int22 ) } > INT22 type = VECT_INIT
    SD16A : { * ( .int23 ) } > INT23 type = VECT_INIT
    USCIAB0TX : { * ( .int24 ) } > INT24 type = VECT_INIT
    USCIAB0RX : { * ( .int25 ) } > INT25 type = VECT_INIT
    WDT : { * ( .int26 ) } > INT26 type = VECT_INIT
    COMPARATORA : { * ( .int27 ) } > INT27 type = VECT_INIT
    TIMERB1 : { * ( .int28 ) } > INT28 type = VECT_INIT
    TIMERB0 : { * ( .int29 ) } > INT29 type = VECT_INIT
    NMI : { * ( .int30 ) } > INT30 type = VECT_INIT
    .reset : {} > RESET /* MSP430 RESET VECTOR */
    }

    /****************************************************************************/
    /* INCLUDE PERIPHERALS MEMORY MAP */
    /****************************************************************************/

    -l msp430f47187.cmd

  • eric bouxirot said:

    "../lnk_msp430f47187-MBFireflies.cmd", line 164: error #10099-D: program will
    not fit into available memory. placement with alignment fails for section
    ".cinit" size 0x92 . Available memory ranges:
    FLASH size: 0xc4b0 unused: 0x0 max hole: 0x0

    The program does not fit in available memory.  Your code size might be ok, but .cinit is initialization data.  Please post your linker map file so that we can see what the problem sections are.

  • I'm ok with this but i don't understand why with coff that work fine  ! 

    I will send you the map as soon as possible.

  • COFF and EABI do some things in a different way; in particular, EABI has some library functions that COFF doesn't.  This won't have much of an effect on the average program, but if your COFF program was already brushing up against running out of memory, changing the ABI could possibly have put you a few bytes over.  It could have gone the other way - sometimes EABI is smaller.

  • eric bouxirot said:
    I'm ok with this but i don't understand why with coff that work fine  !

    Does the code use any floating point calculations?

    If so, see Differences between legacy coff and EABI ELF regarding code size for a possible reason.

  • ok, i know it can be few bytes difference between COFF and EABI, but in my case, even if my code is half the flash size in COFF, it don't fit in EABI...

    to answer the next post, yes we use 1 or 2 floats (no double)

    attached my MAP file for COFF and EABI..

    haven't found what's wrong !

    (code in COFF is about 75k (flash is 116k, which mean there is ~41k free !! )

    A-NPA_Boot.zip
  • eric bouxirot said:
    haven't found what's wrong !

    (code in COFF is about 75k (flash is 116k, which mean there is ~41k free !! )

    The only section which failed to allocate was .cinit. Therefore, believe you are encountering the problem described in MSP430 linker reports "error #10099-D: program will not fit into available memory" even when there is space.

    The referenced thread has some work-arounds which involve changing placement definitions in the linker command file.

  • hummm.ok... but no good solution since 2 years ++

    so i come back to my previous question... what is so different between EABI and COFF to do this BUG ?

    with COFF the linker found place to put cinit in FLASH without any trick in cmd file...

    why TI do not support anymore COFF format (libmath not supported in this format for ex...) with an no-working EABI format ?

    i need a good explanation from TI compiler team, because i understand that i need to find a workaround by myself if i want to continue to use your products..

  • In COFF, the compiler generates the .cinit sections before link time, but in EABI, the linker creates the .cinit sections at link time.  In EABI, the final size of the .cinit section is not known before the placement of other sections is known.  For this reason, in EABI .cinit must be placed after most other sections are placed.  However, in COFF, .cinit can be placed at the same time as .text, and it just so happens to work in this case.

    A general solution to this problem in the linker will be quite difficult, and there exists a fairly easy workaround, which is why TI has not prioritized SDSCM00045294 above other issues that don't have workarounds.

  • ok, 

    i have make some changes on cmd file, so now it compile.

    but, now, when compiling in EABI, the overrall code size is 5k + !

    (theses 5k are used only by RTS as you can see below)

    using COFF

    23K640.obj 266
    25X016.obj 1286
    Config.obj 1236
    ConfigNPA.obj 800
    Console.obj 1436
    ConsoleNPA.obj 2250
    FileSystem.obj 3450
    FTPClient.obj 1954
    FWUpdate.obj 1444
    G24.obj 8184
    HardwareProfile.obj 154
    INT_Pin.obj 74
    LEDAPI.obj 786
    LEDBiColor.obj 126
    M41T93.obj 1242
    main.obj 744
    MainNPA.obj 3404
    MSPUART.obj 990
    PICComm.obj 2228
    PubWrapperG24.obj 96
    rts430x_lc_rd.lib 15178
    SC16IS7XX.obj 1830
    sd16a.obj 102
    ServerComm.obj 5180
    spi.obj 178
    systemClock.obj 266
    TCPClient.obj 1338
    Timer.obj 100
    UARTCommon.obj 556
    UtilsDerell.obj 526
    XBee.obj 4994
    ZBComm.obj 3262
    (vide)
    Total général 65660

    using EABI

    23K640.obj 266
    25X016.obj 1286
    Config.obj 1236
    ConfigNPA.obj 800
    Console.obj 1436
    ConsoleNPA.obj 2276
    FileSystem.obj 3454
    FTPClient.obj 1954
    FWUpdate.obj 1444
    G24.obj 8184
    HardwareProfile.obj 154
    INT_Pin.obj 74
    LEDAPI.obj 786
    LEDBiColor.obj 126
    M41T93.obj 1242
    main.obj 744
    MainNPA.obj 3404
    MSPUART.obj 990
    PICComm.obj 2228
    rts430x_lc_rd_eabi.lib 20894
    SC16IS7XX.obj 1830
    sd16a.obj 102
    ServerComm.obj 5180
    spi.obj 178
    systemClock.obj 266
    TCPClient.obj 1338
    Timer.obj 100
    UARTCommon.obj 556
    UtilsDerell.obj 526
    XBee.obj 4994
    ZBComm.obj 3262
    (vide)
    Total général 71310

    ok, i have understood that EABI can increase a little code size... but here i get around 5k....which is huge !

    there are no changes in compiler setup except EABI or COFF. all are with optimization (-O2 --opt_for_speed=3)

  • Your map file shows that you are calling printf somewhere, and using --printf_support=full, which pulls in the floating-point support.  This is a pretty large chunk of code, and because the size of the type double is different in EABI, the EABI adds a lot of code to deal with two distinct sizes of floating-point types, as noted in the page Chester referred to.  If you avoid printing floating-point values and use --printf_support=nofloat, you should see the .text sizes become much more similar between COFF and EABI.

  • hi, 

    ok, thank a lot for this answer !

    but i have 1 more question related.

    yes i use some float printf, but always with float. no double anywhere.

    is it possible to disable double handling ? or make double as float ? in order to reduce RTS size.

    what can i do to do this?

    if not a option now, do you plan to add this in futur release? (not all dev need double precision.)

    best regards !

  • eric bouxirot said:
    is it possible to disable double handling ?

    Consider using the option --float_operations_allowed=32.  It is documented in the MSP430 compiler manual.

    Thanks and regards,

    -George

  • The C standard requires that float arguments to printf be promoted to double before being passed; this is done for you automatically by the compiler.   I suspect --float_operations_allowed=32 will not help you.  Why are you using floating-point at all?  Can you avoid using printf with float values?  Could you use fractional arithmetic?

  • hi,

    hum... you (TI employee) say me.. "i suspect --float ...." ...hummm..  i mean MSP compiler is developed by TI ? In this case why you can't give me a reliable answer ? (without need to test it by myself)

    to answer about your last question.. .yes we use some float to print some debug values. (this is easyer to so this with float vs fixed point which is not supported directly by printf)

    but i agree to avoid float or double in embedded systems ! (except for debuging we do not use float in our app)

    thank a lot for answers.

  • Well, the compiler tools (including the RTS library) is a pretty big package, and we don't all know every detail off the top of our heads.  In this case, when I said "I suspect," I was understating my level of confidence.  I am 95% sure about what I said without digging into the source code, but not absolutely sure.