Reply
Posts: 2
Registered: ‎03-11-2017

EZR32HG example problem

[ Edited ]

Hello,

 

I have a problem with example generated in Simplicity Studio.

I'm using SLWSTK6240A Starter Kit with Radio Board BRD4546A ( EZR32HG 868 MHz).

When I'm trying to build one of examples (sink, sensor...) in GCC Toolchain I'm getting following linker error:

Invoking: GNU ARM C Linker
arm-none-eabi-gcc -g3 -gdwarf-2 -mcpu=cortex-m0plus -mthumb -T "C:/SiliconLabs/SimplicityStudio/v4/developer/stacks/connect/v2.0.1.0//platform/base/hal/micro/cortexm3/efm32/gcc-cfg.ld" -L"C:/SiliconLabs/SimplicityStudio/v4/developer/stacks/connect/v2.0.1.0//platform/base/hal/micro/cortexm3/" -L"c:\libraries" -Xlinker --defsym="SIMEEPROM_SIZE=8K" -Xlinker --gc-sections -Xlinker -Map="sensor_GNU.map" --specs=nano.specs -u _printf_float -o sensor_GNU.axf "./wstk-sensors/em_i2c.o" "./wstk-sensors/i2cspm.o" "./wstk-sensors/si7013.o" "./wstk-sensors/wstk-sensors.o" "./stack/stack-common/ember-configuration.o" "./sim-eeprom1/sim-eeprom.o" "./serial/EZR32/ember-printf.o" "./serial/EZR32/serial.o" "./poll/poll.o" "./phy/EZR32/phy-config-connect.o" "./main/EZR32/main.o" "./heartbeat/heartbeat.o" "./hal/EZR32_HG320/faults-v6m.o" "./hal/EZR32_HG320/system_ezr32hg.o" "./hal/EZR32/em_acmp.o" "./hal/EZR32/em_aes.o" "./hal/EZR32/em_burtc.o" "./hal/EZR32/em_dac.o" "./hal/EZR32/em_dbg.o" "./hal/EZR32/em_dma.o" "./hal/EZR32/em_ebi.o" "./hal/EZR32/em_idac.o" "./hal/EZR32/em_lesense.o" "./hal/EZR32/em_letimer.o" "./hal/EZR32/em_opamp.o" "./hal/EZR32/em_pcnt.o" "./hal/EZR32/em_rtc.o" "./hal/EZR32/em_vcmp.o" "./hal/EZR32/spidrv.o" "./hal/bsp_stk_leds.o" "./hal/button.o" "./hal/buzzer.o" "./hal/com.o" "./hal/crc.o" "./hal/cstartup-common.o" "./hal/dmactrl.o" "./hal/dmadrv.o" "./hal/em_adc.o" "./hal/em_cmu.o" "./hal/em_emu.o" "./hal/em_gpio.o" "./hal/em_int.o" "./hal/em_leuart.o" "./hal/em_mpu.o" "./hal/em_msc.o" "./hal/em_prs.o" "./hal/em_rmu.o" "./hal/em_system.o" "./hal/em_timer.o" "./hal/em_usart.o" "./hal/em_wdog.o" "./hal/endian.o" "./hal/ext-device.o" "./hal/gpiointerrupt.o" "./hal/isr-stubs.o" "./hal/led.o" "./hal/leuartdrv.o" "./hal/mem-util.o" "./hal/mfg-token.o" "./hal/micro-common.o" "./hal/micro.o" "./hal/random.o" "./hal/rtcdriver.o" "./hal/sleep-efm32.o" "./hal/sleep.o" "./hal/symbol-timer.o" "./hal/token-def.o" "./hal/token.o" "./hal/uartdrv.o" "./hal/udelay.o" "./hal/ustimer.o" "./diagnostic/assert-crash-handlers.o" "./diagnostic/diagnostic.o" "./debug-print/debug-print.o" "./command-interpreter/command-interpreter2-binary.o" "./command-interpreter/command-interpreter2-error.o" "./command-interpreter/command-interpreter2-util.o" "./command-interpreter/command-interpreter2.o" "./connect-bookkeeping.o" "./connect-callback-stubs.o" "./connect-callbacks.o" "./connect-cli.o" "./connect-events.o" -l"C:\libraries\packet-queue-library-iar-m0.a" -l"C:\libraries\stack-counters-stub-library-iar-m0.a" -l"C:\libraries\parent-support-library-iar-m0.a" -l"C:\libraries\sim-eeprom1-library-iar-m0.a" -l"C:\libraries\stack-counters-library-iar-m0.a" -l"C:\libraries\phy-pro2plus-brd4546a-library-iar-m0.a" -l"C:/libraries/form-and-join-library-iar-m0.a" -l"C:/libraries/stack-common-library-iar-m0.a" -l"C:/libraries/hal-ezr32-library-iar-m0.a" -l"C:/libraries/aes-security-library-iar-m0.a" -Wl,--start-group -lgcc -lc -lnosys -Wl,--end-group
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lC:\libraries\packet-queue-library-iar-m0.a
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lC:\libraries\stack-counters-stub-library-iar-m0.a
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lC:\libraries\parent-support-library-iar-m0.a
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lC:\libraries\sim-eeprom1-library-iar-m0.a
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lC:\libraries\stack-counters-library-iar-m0.a
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lC:\libraries\phy-pro2plus-brd4546a-library-iar-m0.a
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lC:/libraries/form-and-join-library-iar-m0.a
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lC:/libraries/stack-common-library-iar-m0.a
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lC:/libraries/hal-ezr32-library-iar-m0.a
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lC:/libraries/aes-security-library-iar-m0.a
collect2.exe: error: ld returned 1 exit status
make: *** [sensor_GNU.axf] Error 1

 

I've checked if Toolchain and libraries are in right folders. Everything looks OK, but error still occur.

The problem doesn't exist when I'm building  IAR trial version.

 

Posts: 333
Registered: ‎12-05-2016

Re: EZR32HG example problem

Hi @rewdog,

 

I'm not sure if something was changed in the .isc file with the project paths before running the generate function or not, but there is an error in the project settings so that it can't find the libraries needed to create the binary.

Please open [Project] > [Properties] and under "C/C++ Build in the Settings section highlight the GNU ARM C Linker in the main dialog window.  In the "All options" window modify the path that says "c:\libraries" to "C:/SiliconLabs/SimplicityStudio/v4/developer/stacks/connect/v2.0.1.0//protocol/connect_2.0/connect/plugins/libraries/"

Then try and build the project again.

 

If the generate function is run again, then I think the above setting in the project properties will have to be edited again unless a correction is made in the .isc file.  I can transfer this post to the Wireless Proprietary group if you prefer, as that is the team that creates the Connect stack that is being used to build the project.

Thank you,

jpitt

Posts: 2
Registered: ‎03-11-2017

Re: EZR32HG example problem

Hi,

I'm sorry but I've pasted Console Output from project after modifications ( I was trying to move libraries to solve the problem). Below output form clean project:

Invoking: GNU ARM C Linker
arm-none-eabi-gcc -g3 -gdwarf-2 -mcpu=cortex-m0plus -mthumb -T "C:/SiliconLabs/SimplicityStudio/v4/developer/stacks/connect/v2.0.1.0//platform/base/hal/micro/cortexm3/efm32/gcc-cfg.ld" -L"C:/SiliconLabs/SimplicityStudio/v4/developer/stacks/connect/v2.0.1.0//protocol/connect_2.0/connect/plugins/libraries/" -L"C:/SiliconLabs/SimplicityStudio/v4/developer/stacks/connect/v2.0.1.0//platform/base/hal/micro/cortexm3/" -Xlinker --defsym="SIMEEPROM_SIZE=8K" -Xlinker --gc-sections -Xlinker -Map="sensor_GNU.map" --specs=nano.specs -u _printf_float -o sensor_GNU.axf -Wl,--start-group "./command-interpreter/command-interpreter2-binary.o" "./command-interpreter/command-interpreter2-error.o" "./command-interpreter/command-interpreter2-util.o" "./command-interpreter/command-interpreter2.o" "./connect-bookkeeping.o" "./connect-callback-stubs.o" "./connect-callbacks.o" "./connect-cli.o" "./connect-events.o" "./debug-print/debug-print.o" "./diagnostic/assert-crash-handlers.o" "./diagnostic/diagnostic.o" "./hal/EZR32/em_acmp.o" "./hal/EZR32/em_aes.o" "./hal/EZR32/em_burtc.o" "./hal/EZR32/em_dac.o" "./hal/EZR32/em_dbg.o" "./hal/EZR32/em_dma.o" "./hal/EZR32/em_ebi.o" "./hal/EZR32/em_idac.o" "./hal/EZR32/em_lesense.o" "./hal/EZR32/em_letimer.o" "./hal/EZR32/em_opamp.o" "./hal/EZR32/em_pcnt.o" "./hal/EZR32/em_rtc.o" "./hal/EZR32/em_vcmp.o" "./hal/EZR32/spidrv.o" "./hal/EZR32_HG320/faults-v6m.o" "./hal/EZR32_HG320/system_ezr32hg.o" "./hal/bsp_stk_leds.o" "./hal/button.o" "./hal/buzzer.o" "./hal/com.o" "./hal/crc.o" "./hal/cstartup-common.o" "./hal/dmactrl.o" "./hal/dmadrv.o" "./hal/em_adc.o" "./hal/em_cmu.o" "./hal/em_emu.o" "./hal/em_gpio.o" "./hal/em_int.o" "./hal/em_leuart.o" "./hal/em_mpu.o" "./hal/em_msc.o" "./hal/em_prs.o" "./hal/em_rmu.o" "./hal/em_system.o" "./hal/em_timer.o" "./hal/em_usart.o" "./hal/em_wdog.o" "./hal/endian.o" "./hal/ext-device.o" "./hal/gpiointerrupt.o" "./hal/isr-stubs.o" "./hal/led.o" "./hal/leuartdrv.o" "./hal/mem-util.o" "./hal/mfg-token.o" "./hal/micro-common.o" "./hal/micro.o" "./hal/random.o" "./hal/rtcdriver.o" "./hal/sleep-efm32.o" "./hal/sleep.o" "./hal/symbol-timer.o" "./hal/token-def.o" "./hal/token.o" "./hal/uartdrv.o" "./hal/udelay.o" "./hal/ustimer.o" "./heartbeat/heartbeat.o" "./main/EZR32/main.o" "./phy/EZR32/phy-config-connect.o" "./poll/poll.o" "./serial/EZR32/ember-printf.o" "./serial/EZR32/serial.o" "./sim-eeprom1/sim-eeprom.o" "./stack/stack-common/ember-configuration.o" "./wstk-sensors/em_i2c.o" "./wstk-sensors/i2cspm.o" "./wstk-sensors/si7013.o" "./wstk-sensors/wstk-sensors.o" -lpacket-queue-library-iar-m0 -lform-and-join-library-iar-m0 -lstack-common-library-iar-m0 -lhal-ezr32-library-iar-m0 -laes-security-library-iar-m0 -lxxtea-security-stub-library-iar-m0 -lparent-support-library-iar-m0 -lsim-eeprom1-library-iar-m0 -lstack-counters-library-iar-m0 -lphy-pro2plus-brd4546a-library-iar-m0 -Wl,--end-group -Wl,--start-group -lgcc -lc -lnosys -Wl,--end-group
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lpacket-queue-library-iar-m0
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lform-and-join-library-iar-m0
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lstack-common-library-iar-m0
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lhal-ezr32-library-iar-m0
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -laes-security-library-iar-m0
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lxxtea-security-stub-library-iar-m0
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lparent-support-library-iar-m0
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lsim-eeprom1-library-iar-m0
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lstack-counters-library-iar-m0
c:/siliconlabs/simplicitystudio/v4/developer/toolchains/gnu_arm/4.9_2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lphy-pro2plus-brd4546a-library-iar-m0
collect2.exe: error: ld returned 1 exit status
make: *** [sensor_GNU.axf] Error 1

 

Thank you for assistance,

rewdog

 

Posts: 7
Registered: ‎01-12-2016

Re: EZR32HG example problem

Hi,

 

In the Connect stack, GCC is only supported for the EFR parts. IAR can be used for both EZR and EFR.

 

In order to use Connect on the EZR32HG, you should change your compiler to IAR. If you want to use GCC, you would have to change your hardware to EFR.

 

As a side note, the code size optimization you will get from IAR is more important when working with the EZR32HG, since that part caps at 64K of flash. It can be hard to fit Connect apps on the HG. In fact, the Connect 2.0.1 stack you're using is the last one to support building the sensor and sink scenario on HG. Starting with Flex 1.0.0, the sensor and sink apps are no longer able to fit in 64K, even with IAR.