Programmer Shield debugging with Eclipse on 0.6.4 firmware


#1

Hi everyone, I bought a Programmer Shield to debug my application using 0.6.4 firmware but when building throws some errors which are in this topic:

On the 0.6.4 repository, in the dependencies section says that it needs GNU ARM 4.9.3 20150529 which I haven’t found yet.
I’ve tried with:

4.9.3 20150609, 20150306, 20150921, 20141203
5.2 20151219

But none of them works (all available in the official page).

Can it be that I have to use exactly the version that it says in dependencies or it is definitively broken?

Thanks in advance.


#2

Currently, the 5-2016-q1-update is recommended. This is version 5.3.1.

Prior to system firmware 0.6.3 you can also use the 4.9-2015-q3-update.

The 5.4.x and 6.x versions are not recommended at this time.


#3

@rickkas7 thank you for your answer.

I forgot to mention that I tested it with 5.3.1 version. I’m using it for the 0.7.0 firmware too, but with the 0.6.4 I get the very same error message.

Maybe I’m doing something wrong.


#4

What’s the error that you are getting?


#5

The same error in the link that I linked.

Building target: /home/user/Documents/Example/app/target/app.elf
Invoking: ARM GCC C++ Linker
mkdir -p /home/user/Documents/Example/app/target/
arm-none-eabi-g++ -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=10 -DPLATFORM_NAME=electron -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00A -DUSBD_PID_CDC=0xC00A -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=10 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DUSE_SWD_JTAG -DSYSTEM_VERSION_STRING=0.6.4 -DDEBUG_BUILD -Werror -I../user/inc -I../wiring/inc -I../hal/inc -I../hal/shared -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/include -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/portable/GCC/ARM_CM3 -I../hal/src/electron -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../system/inc -I../services/inc -I../communication/src -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -I. -MD -MP -MF /home/user/Documents/Example/app/target/app.elf.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DMODULE_VERSION=0 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE /home/user/Documents/Example/app/target/obj/./src/module_info.o  /home/user/Documents/Example/app/target/obj/startup/startup_stm32f2xx.o --output /home/user/Documents/Example/app/target/app.elf -nostartfiles -Xlinker --gc-sections -L../build/arm/linker/stm32f2xx --specs=nano.specs --specs=../newlib_nano/src/custom-nano.specs -T../hal/src/electron/app_no_bootloader.ld -Wl,--defsym,__STACKSIZE__=1400 -L../hal/src/electron -u _printf_float -Wl,-Map,/home/user/Documents/Example/app/target/app.map -u uxTopUsedPriority  -L../build/target/user/platform-10/app/ -L../build/target/wiring/platform-10/ -L../build/target/system/platform-10/ -L../build/target/services/platform-10/ -L../build/target/communication/platform-10-prod-10/ -L../build/target/hal/platform-10/ -L../build/target/platform/platform-10/ -L../build/target/wiring_globals/platform-10/ -L../build/target/newlib_nano/platform-10 -L../build/arm/linker -Wl,--whole-archive -lnewlib_nano -luser -lwiring -lhal -lsystem -lservices -lcommunication -lplatform -lwiring_globals -Wl,--no-whole-archive
../build/target/system/platform-10//libsystem.a(system_network.o): In function `ManagedNetworkInterface::notify_can_shutdown()':
/home/user/Documents/Example/firmware/v0.6.4/system/src/system_network_internal.h:550: multiple definition of `HAL_NET_notify_can_shutdown'
../build/module.mk:222: recipe for target '/home/user/Documents/Example/app/target/app.elf' failed
../build/target/hal/platform-10//libhal.a(cellular_hal.o):/home/user/Documents/Example/firmware/v0.6.4/hal/src/electron/cellular_hal.cpp:41: first defined here
make[1]: Leaving directory '/home/user/Documents/Example/firmware/v0.6.4/main'
../build/target/system/platform-10//libsystem.a(system_network.o): In function `ManagedNetworkInterface::network_interface()':
Makefile:16: recipe for target 'target/Example.bin' failed
/home/user/Documents/Example/firmware/v0.6.4/system/../wiring/inc/spark_wiring_led.h:145: multiple definition of `HAL_NET_notify_connected'
../build/target/hal/platform-10//libhal.a(cellular_hal.o):/home/user/Documents/Example/firmware/v0.6.4/hal/src/electron/cellular_hal.cpp:20: first defined here
../build/target/system/platform-10//libsystem.a(system_network.o): In function `ManagedNetworkInterface::network_interface()':
/home/user/Documents/Example/firmware/v0.6.4/system/../wiring/inc/spark_wiring_led.h:145: multiple definition of `HAL_NET_notify_dhcp'
../build/target/hal/platform-10//libhal.a(cellular_hal.o):/home/user/Documents/Example/firmware/v0.6.4/hal/src/electron/cellular_hal.cpp:20: first defined here
../build/target/system/platform-10//libsystem.a(system_network.o): In function `ManagedNetworkInterface::network_interface()':
/home/user/Documents/Example/firmware/v0.6.4/system/../wiring/inc/spark_wiring_led.h:145: multiple definition of `HAL_NET_notify_disconnected'
../build/target/hal/platform-10//libhal.a(cellular_hal.o):/home/user/Documents/Example/firmware/v0.6.4/hal/src/electron/cellular_hal.cpp:20: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [/home/user/Documents/Example/app/target/app.elf] Error 1
make: *** [target/Example.bin] Error 2

Thanks for your help @rickkas7 .


#6

I believe there is a bug in the Makefile that prevents building 0.6.4 monolithic Electron.

I get the same error as you do for 0.6.4, but the same make command builds properly with 0.7.0.

cd main
make clean all PLATFORM=electron MODULAR=n DEBUG_BUILD=y USE_SWD_JTAG=y 

#7

Yes, does that mean that it wasn’t fixed ?


#8

It seems to be fixed in 0.7.0, I can build successfully with that.


#9

Yes, it works fine with 0.7.0 but I needed to use 0.6.4. Will change to 0.7.0 then.

Thanks @rickkas7 for your help !