Good tip! Here's the mbed compiled with gcc:
arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -c -g -fno-common -fmessage-length=0 -Wall -Wextra -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-p ointer -MMD -MP -DNDEBUG -Os -DEFM32GG990F1024 -DTOOLCHAIN_GCC_ARM -DTOOLCHAIN_G CC -DTARGET_CORTEX_M -DTARGET_Silicon_Labs -DARM_MATH_CM3 -DMBED_BUILD_TIMESTAMP =1450779582.39 -DTARGET_EFM32 -D__CORTEX_M3 -DTARGET_M3 -DTARGET_EFM32GG_STK3700 -D__MBED__=1 -std=gnu++98 -fno-rtti -I. -I./mbed -I./mbed/TARGET_EFM32GG_STK37 00 -I./mbed/TARGET_EFM32GG_STK3700/TARGET_Silicon_Labs -I./mbed/TARGET_EFM32GG_S TK3700/TARGET_Silicon_Labs/TARGET_EFM32 -I./mbed/TARGET_EFM32GG_STK3700/TARGET_S ilicon_Labs/TARGET_EFM32/TARGET_EFM32GG_STK3700 -I./mbed/TARGET_EFM32GG_STK3700/ TARGET_Silicon_Labs/TARGET_EFM32/emlib -I./mbed/TARGET_EFM32GG_STK3700/TARGET_Si licon_Labs/TARGET_EFM32/emlib/inc -I./mbed/TARGET_EFM32GG_STK3700/TOOLCHAIN_GCC_ ARM -o main.o main.cpp arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -Wl,-Map=bin/mbed_blinky_low_po wer.map,--cref -T./mbed/TARGET_EFM32GG_STK3700/TOOLCHAIN_GCC_ARM/efm32gg.ld -L./ mbed/TARGET_EFM32GG_STK3700/TOOLCHAIN_GCC_ARM -o bin/mbed_blinky_low_power.axf main.o mbed/TARGET_EFM32GG_STK3700/TOOLCHAIN_GCC_ARM/board.o mbed/TARGET_EFM32GG _STK3700/TOOLCHAIN_GCC_ARM/cmsis_nvic.o mbed/TARGET_EFM32GG_STK3700/TOOLCHAIN_GC C_ARM/mbed_overrides.o mbed/TARGET_EFM32GG_STK3700/TOOLCHAIN_GCC_ARM/retarget.o mbed/TARGET_EFM32GG_STK3700/TOOLCHAIN_GCC_ARM/startup_efm32gg.o mbed/TARGET_EFM3 2GG_STK3700/TOOLCHAIN_GCC_ARM/system_efm32gg.o -lmbed -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -lmbed -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
Here's the standard compilation using Simplicity Studio:
Building file: C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/Device/SiliconLabs/EFM32GG/Source/system_efm32gg.c Invoking: GNU ARM C Compiler arm-none-eabi-gcc -g -gdwarf-2 -mcpu=cortex-m3 -mthumb '-DDEBUG_EFM_USER=1' '-DEFM32GG990F1024=1' '-DDEBUG=1' -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/kits/EFM32GG_STK3700/examples/usbdhidkbd" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/kits/EFM32GG_STK3700/config" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/CMSIS/Include" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/emlib/inc" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/kits/common/bsp" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/kits/common/drivers" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/Device/SiliconLabs/EFM32GG/Include" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/usb/inc" -O0 -Wall -c -fmessage-length=0 -mno-sched-prolog -fno-builtin -ffunction-sections -fdata-sections -std=c99 -MMD -MP -MF"CMSIS/efm32gg/system_efm32gg.d" -MT"CMSIS/efm32gg/system_efm32gg.o" -o "CMSIS/efm32gg/system_efm32gg.o" "C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/Device/SiliconLabs/EFM32GG/Source/system_efm32gg.c" Finished building: C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/Device/SiliconLabs/EFM32GG/Source/GCC/startup_efm32gg.S Finished building: C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/kits/common/drivers/segmentlcd.c Building file: C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/kits/common/bsp/bsp_trace.c Invoking: GNU ARM C Compiler arm-none-eabi-gcc -g -gdwarf-2 -mcpu=cortex-m3 -mthumb '-DDEBUG_EFM_USER=1' '-DEFM32GG990F1024=1' '-DDEBUG=1' -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/kits/EFM32GG_STK3700/examples/usbdhidkbd" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/kits/EFM32GG_STK3700/config" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/CMSIS/Include" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/emlib/inc" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/kits/common/bsp" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/kits/common/drivers" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/Device/SiliconLabs/EFM32GG/Include" -I"C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/usb/inc" -O0 -Wall -c -fmessage-length=0 -mno-sched-prolog -fno-builtin -ffunction-sections -fdata-sections -std=c99 -MMD -MP -MF"BSP/bsp_trace.d" -MT"BSP/bsp_trace.o" -o "BSP/bsp_trace.o" "C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/kits/common/bsp/bsp_trace.c" Finished building: C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/Device/SiliconLabs/EFM32GG/Source/system_efm32gg.c Finished building: C:/SiliconLabs/SimplicityStudio/v3/developer/sdks/efm32/v2/kits/common/bsp/bsp_trace.c Building target: STK3700_usbdhidkbd.axf Invoking: GNU ARM C Linker arm-none-eabi-gcc -g -gdwarf-2 -mcpu=cortex-m3 -mthumb -T "STK3700_usbdhidkbd.ld" -Xlinker --gc-sections -Xlinker -Map="STK3700_usbdhidkbd.map" --specs=nano.specs -o STK3700_usbdhidkbd.axf "./src/descriptors.o" "./src/main.o" "./emusb/em_usbd.o" "./emusb/em_usbdch9.o" "./emusb/em_usbdep.o" "./emusb/em_usbdint.o" "./emusb/em_usbhal.o" "./emusb/em_usbtimer.o" "./emlib/em_assert.o" "./emlib/em_cmu.o" "./emlib/em_ebi.o" "./emlib/em_emu.o" "./emlib/em_gpio.o" "./emlib/em_int.o" "./emlib/em_lcd.o" "./emlib/em_system.o" "./emlib/em_timer.o" "./emlib/em_usart.o" "./Drivers/hidkbd.o" "./Drivers/segmentlcd.o" "./CMSIS/efm32gg/startup_efm32gg.o" "./CMSIS/efm32gg/system_efm32gg.o" "./BSP/bsp_trace.o" -Wl,--start-group -lgcc -lc -lnosys -Wl,--end-group Finished building target: STK3700_usbdhidkbd.axf Building hex file: STK3700_usbdhidkbd.hex arm-none-eabi-objcopy -O ihex "STK3700_usbdhidkbd.axf" "STK3700_usbdhidkbd.hex" Building bin file: STK3700_usbdhidkbd.bin arm-none-eabi-objcopy -O binary "STK3700_usbdhidkbd.axf" "STK3700_usbdhidkbd.bin"
And here's the output from the Espruino building at the moment:
arm-none-eabi-gcc -Wall -Wextra -Wconversion -Werror=implicit-function-declaration -fno-strict-aliasing -Wno-sign-conversion -Wno-conversion -Wno-unused-parameter -std=c99 -Os -fno-common -fno-exceptions -fdata-sections -ffunction-sections -flto -fno-fat-lto-objects -Wl,--allow-multiple-definition --param inline-unit-growth=6 -c -mcpu=cortex-m3 -mthumb -g -gdwarf-2 -DGIT_COMMIT=bdfda3e6cc2fb0083a77aa1fdebe77887fcf4821 -DBUILDNUMBER="52" -DEFM32GG990F1024 -DUSE_DEBUGGER -DUSE_MATH -DARM -DLINK_TIME_OPTIMISATION -DEMBEDDED -I/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino -I/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targets -I/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/src -I/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/gen -I/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/libs/math -I/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/cmsis/Include -I/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targets/efm32 -I/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/Device/SiliconLabs/EFM32GG/Include -I/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emdrv/nvm/inc -I/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emdrv/rtcdrv/inc -I/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emdrv/common/inc -I/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emlib/inc gen/jswrapper.c -o gen/jswrapper.o arm-none-eabi-gcc -Winline -Os -fno-common -fno-exceptions -fdata-sections -ffunction-sections -flto -fno-fat-lto-objects -Wl,--allow-multiple-definition --param inline-unit-growth=6 -mcpu=cortex-m3 -mthumb -g -gdwarf-2 -Wl,--gc-sections -T/c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/Device/SiliconLabs/EFM32GG/Source/GCC/efm32gg.ld -o espruino_1v84.52_efm32ggstk.elf src/jslex.o src/jsvar.o src/jsvariterator.o src/jsutils.o src/jsnative.o src/jsparse.o src/jspin.o src/jsinteractive.o src/jsdevices.o src/jstimer.o src/jsspi.o gen/jswrapper.o libs/math/acosh.o libs/math/asin.o libs/math/asinh.o libs/math/atan.o libs/math/atanh.o libs/math/cbrt.o libs/math/chbevl.o libs/math/clog.o libs/math/cmplx.o libs/math/const.o libs/math/cosh.o libs/math/drand.o libs/math/exp10.o libs/math/exp2.o libs/math/exp.o libs/math/fabs.o libs/math/floor.o libs/math/isnan.o libs/math/log10.o libs/math/log2.o libs/math/log.o libs/math/mtherr.o libs/math/polevl.o libs/math/pow.o libs/math/powi.o libs/math/round.o libs/math/setprec.o libs/math/sin.o libs/math/sincos.o libs/math/sindg.o libs/math/sinh.o libs/math/sqrt.o libs/math/tan.o libs/math/tandg.o libs/math/tanh.o libs/math/unity.o targets/efm32/main.o targets/efm32/jshardware.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/Device/SiliconLabs/EFM32GG/Source/GCC/startup_efm32gg.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/Device/SiliconLabs/EFM32GG/Source/system_efm32gg.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emdrv/rtcdrv/src/rtcdriver.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emlib/src/em_assert.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emlib/src/em_cmu.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emlib/src/em_emu.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emlib/src/em_gpio.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emlib/src/em_msc.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emlib/src/em_rtc.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emlib/src/em_system.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emlib/src/em_timer.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/emlib/src/em_usart.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/gen/jspininfo.o src/jswrap_array.o src/jswrap_arraybuffer.o src/jswrap_date.o src/jswrap_error.o src/jswrap_espruino.o src/jswrap_flash.o src/jswrap_functions.o src/jswrap_interactive.o src/jswrap_io.o src/jswrap_json.o src/jswrap_modules.o src/jswrap_pin.o src/jswrap_number.o src/jswrap_object.o src/jswrap_onewire.o src/jswrap_pipe.o src/jswrap_process.o src/jswrap_serial.o src/jswrap_spi_i2c.o src/jswrap_stream.o src/jswrap_string.o src/jswrap_waveform.o libs/math/jswrap_math.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/Device/SiliconLabs/EFM32GG/Source/GCC/startup_efm32gg.o /c/Users/apsyvert/Documents/work/github/Espruino_SL/Espruino/targetlibs/Gecko_SDK/Device/SiliconLabs/EFM32GG/Source/system_efm32gg.o arm-none-eabi-objcopy -O binary espruino_1v84.52_efm32ggstk.elf espruino_1v84.52_efm32ggstk.bin bash scripts/check_size.sh espruino_1v84.52_efm32ggstk.bin PASS - size of 0 is under 1016957 bytes arm-none-eabi-objcopy -O ihex espruino_1v84.52_efm32ggstk.elf espruino_1v84.52_efm32ggstk.hex
I'm totally lost in terms of GCC at the moment. Posting this in a desparate hope that someone might be able to spot the errors...
@LaplaceG started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Good tip!
Here's the mbed compiled with gcc:
Here's the standard compilation using Simplicity Studio:
And here's the output from the Espruino building at the moment:
I'm totally lost in terms of GCC at the moment. Posting this in a desparate hope that someone might be able to spot the errors...