Electron Asset Example Won't Compile

I’m trying to flash my Electron with the example GPS tracker code and I’m getting the following compile errors:

Processing  1_gps_features.ino
Checking library AssetTracker...
Installing library AssetTracker 0.0.10 to lib/AssetTracker ...
Library AssetTracker 0.0.10 installed.
Checking library Adafruit_GPS...
Checking library Adafruit_LIS3DH...
Installing library Adafruit_LIS3DH 1.0.3 to lib/Adafruit_LIS3DH ...
Installing library Adafruit_GPS 1.0.3 to lib/Adafruit_GPS ...
Library Adafruit_LIS3DH 1.0.3 installed.
Checking library Adafruit_Sensor...
Installing library Adafruit_Sensor 1.0.2 to lib/Adafruit_Sensor ...
Library Adafruit_GPS 1.0.3 installed.
Library Adafruit_Sensor 1.0.2 installed.
make -C ../newlib_nano 
make[1]: Entering directory '/firmware/newlib_nano'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/newlib_nano'
make -C ../user 
make[1]: Entering directory '/firmware/user'
Building cpp file: src/1_gps_features.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-0-ltosrc/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -DFLASHEE_EEPROM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.7.0 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -Isrc -I./libraries -Ilib/Adafruit_Sensor/src -Ilib/Adafruit_LIS3DH/src -Ilib/AssetTracker/src -Ilib/Adafruit_GPS/src -I. -MD -MP -MF ../build/target/user/platform-0-ltosrc/1_gps_features.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=CC3000 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DMODULE_VERSION=207 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-0-ltosrc/1_gps_features.o src/1_gps_features.cpp
1_gps_features.ino: In function 'void loop()':
1_gps_features.ino:49:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Building cpp file: lib/Adafruit_Sensor/src/Adafruit_Sensor.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-0-ltoAdafruit_Sensor/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -DFLASHEE_EEPROM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.7.0 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -Isrc -I./libraries -Ilib/Adafruit_Sensor/src -Ilib/Adafruit_LIS3DH/src -Ilib/AssetTracker/src -Ilib/Adafruit_GPS/src -I. -MD -MP -MF ../build/target/user/platform-0-ltoAdafruit_Sensor/src/Adafruit_Sensor.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=CC3000 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DMODULE_VERSION=207 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-0-ltoAdafruit_Sensor/src/Adafruit_Sensor.o lib/Adafruit_Sensor/src/Adafruit_Sensor.cpp

Building cpp file: lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-0-ltoAdafruit_LIS3DH/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -DFLASHEE_EEPROM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.7.0 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -Isrc -I./libraries -Ilib/Adafruit_Sensor/src -Ilib/Adafruit_LIS3DH/src -Ilib/AssetTracker/src -Ilib/Adafruit_GPS/src -I. -MD -MP -MF ../build/target/user/platform-0-ltoAdafruit_LIS3DH/src/Adafruit_LIS3DH.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=CC3000 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DMODULE_VERSION=207 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-0-ltoAdafruit_LIS3DH/src/Adafruit_LIS3DH.o lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.cpp
In file included from lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.cpp:31:0:
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.h: In constructor 'Adafruit_LIS3DH::Adafruit_LIS3DH()':
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.h:233:29: warning: 'Adafruit_LIS3DH::_sck' will be initialized after [-Wreorder]
   int8_t _cs, _mosi, _miso, _sck;
                             ^
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.h:229:11: warning:   'int32_t Adafruit_LIS3DH::_sensorID' [-Wreorder]
   int32_t _sensorID;
           ^
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.cpp:40:1: warning:   when initialized here [-Wreorder]
 Adafruit_LIS3DH::Adafruit_LIS3DH()
 ^
In file included from lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.cpp:31:0:
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.h: In constructor 'Adafruit_LIS3DH::Adafruit_LIS3DH(int8_t)':
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.h:233:29: warning: 'Adafruit_LIS3DH::_sck' will be initialized after [-Wreorder]
   int8_t _cs, _mosi, _miso, _sck;
                             ^
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.h:229:11: warning:   'int32_t Adafruit_LIS3DH::_sensorID' [-Wreorder]
   int32_t _sensorID;
           ^
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.cpp:45:1: warning:   when initialized here [-Wreorder]
 Adafruit_LIS3DH::Adafruit_LIS3DH(int8_t cspin)
 ^
In file included from lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.cpp:31:0:
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.h: In constructor 'Adafruit_LIS3DH::Adafruit_LIS3DH(int8_t, int8_t, int8_t, int8_t)':
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.h:233:29: warning: 'Adafruit_LIS3DH::_sck' will be initialized after [-Wreorder]
   int8_t _cs, _mosi, _miso, _sck;
                             ^
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.h:229:11: warning:   'int32_t Adafruit_LIS3DH::_sensorID' [-Wreorder]
   int32_t _sensorID;
           ^
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.cpp:49:1: warning:   when initialized here [-Wreorder]
 Adafruit_LIS3DH::Adafruit_LIS3DH(int8_t cspin, int8_t mosipin, int8_t misopin, int8_t sckpin)
 ^
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.cpp: In member function 'virtual bool Adafruit_LIS3DH::getEvent(sensors_event_t*)':
lib/Adafruit_LIS3DH/src/Adafruit_LIS3DH.cpp:320:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^

Building cpp file: lib/AssetTracker/src/AssetTracker.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-0-ltoAssetTracker/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -DFLASHEE_EEPROM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.7.0 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -Isrc -I./libraries -Ilib/Adafruit_Sensor/src -Ilib/Adafruit_LIS3DH/src -Ilib/AssetTracker/src -Ilib/Adafruit_GPS/src -I. -MD -MP -MF ../build/target/user/platform-0-ltoAssetTracker/src/AssetTracker.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=CC3000 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DMODULE_VERSION=207 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-0-ltoAssetTracker/src/AssetTracker.o lib/AssetTracker/src/AssetTracker.cpp
lib/AssetTracker/src/AssetTracker.cpp: In member function 'void AssetTracker::updateGPS()':
lib/AssetTracker/src/AssetTracker.cpp:193:14: warning: unused variable 'c' [-Wunused-variable]
         char c = gps.read();
              ^

Building cpp file: lib/Adafruit_GPS/src/Adafruit_GPS.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-0-ltoAdafruit_GPS/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -DFLASHEE_EEPROM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.7.0 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -Isrc -I./libraries -Ilib/Adafruit_Sensor/src -Ilib/Adafruit_LIS3DH/src -Ilib/AssetTracker/src -Ilib/Adafruit_GPS/src -I. -MD -MP -MF ../build/target/user/platform-0-ltoAdafruit_GPS/src/Adafruit_GPS.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=CC3000 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DMODULE_VERSION=207 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-0-ltoAdafruit_GPS/src/Adafruit_GPS.o lib/Adafruit_GPS/src/Adafruit_GPS.cpp

Building target: ../build/target/user/platform-0-ltolibuser.a
Invoking: ARM GCC Archiver
mkdir -p ../build/target/user/platform-0-lto
arm-none-eabi-gcc-ar -cr ../build/target/user/platform-0-ltolibuser.a ../build/target/user/platform-0-ltosrc/1_gps_features.o ../build/target/user/platform-0-ltoAdafruit_Sensor/src/Adafruit_Sensor.o ../build/target/user/platform-0-ltoAdafruit_LIS3DH/src/Adafruit_LIS3DH.o ../build/target/user/platform-0-ltoAssetTracker/src/AssetTracker.o ../build/target/user/platform-0-ltoAdafruit_GPS/src/Adafruit_GPS.o

make[1]: Leaving directory '/firmware/user'
make -C ../wiring 
make[1]: Entering directory '/firmware/wiring'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/wiring'
make -C ../hal 
make[1]: Entering directory '/firmware/hal'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/hal'
make -C ../system 
make[1]: Entering directory '/firmware/system'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/system'
make -C ../services 
make[1]: Entering directory '/firmware/services'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/services'
make -C ../communication 
make[1]: Entering directory '/firmware/communication'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/communication'
make -C ../platform 
make[1]: Entering directory '/firmware/platform'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/platform'
make -C ../wiring_globals 
make[1]: Entering directory '/firmware/wiring_globals'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/wiring_globals'
make -C ../crypto 
make[1]: Entering directory '/firmware/crypto'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/crypto'
Building c file: src/module_info.c
Invoking: ARM GCC C Compiler
mkdir -p target/obj/./src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DMBEDTLS_CONFIG_FILE="<mbedtls_config.h>" -DSYSTEM_VERSION_STRING=0.7.0 -DRELEASE_BUILD -Werror -I../user/inc -I../wiring/inc -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../system/inc -I../services/inc -I../communication/src -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../crypto/mbedtls/include -I../crypto/inc -I../dynalib/inc -I. -MD -MP -MF target/obj/./src/module_info.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DMODULE_VERSION=207 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE  -Wno-pointer-sign -std=gnu99 -c -o target/obj/./src/module_info.o src/module_info.c

Building file: ../build/arm/startup/startup_stm32f10x_md.S
Invoking: ARM GCC Assembler
mkdir -p target/obj/startup/
arm-none-eabi-gcc -g3 -gdwarf-2 -mcpu=cortex-m3 -mthumb -I../build/arm/startup -Wa,--defsym -Wa,SPARK_INIT_STARTUP=1 -x assembler-with-cpp -fmessage-length=0 -c -o target/obj/startup/startup_stm32f10x_md.o ../build/arm/startup/startup_stm32f10x_md.S

Building target: target/workspace.elf
Invoking: ARM GCC C++ Linker
mkdir -p target/
arm-none-eabi-g++ -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DMBEDTLS_CONFIG_FILE="<mbedtls_config.h>" -DSYSTEM_VERSION_STRING=0.7.0 -DRELEASE_BUILD -Werror -I../user/inc -I../wiring/inc -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../system/inc -I../services/inc -I../communication/src -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../crypto/mbedtls/include -I../crypto/inc -I../dynalib/inc -I. -MD -MP -MF target/workspace.elf.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DMODULE_VERSION=207 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE target/obj/./src/module_info.o  target/obj/startup/startup_stm32f10x_md.o --output target/workspace.elf -nostartfiles -Xlinker --gc-sections -flto -Os -fuse-linker-plugin -Tlinker_stm32f10x_md_dfu.ld -L../build/arm/linker --specs=nano.specs -lc -lnosys -u _printf_float -Wl,-Map,target/workspace.map  -L../build/target/user/platform-0-lto -L../build/target/wiring/platform-0-lto/ -L../build/target/system/platform-0-lto/ -L../build/target/services/platform-0-lto/ -L../build/target/communication/platform-0-lto-prod-0/ -L../build/target/hal/platform-0-lto/ -L../build/target/platform/platform-0-lto/ -L../build/target/wiring_globals/platform-0-lto/ -L../build/target/crypto/platform-0-lto/ -L../build/target/newlib_nano/platform-0-lto -L../build/arm/linker -Wl,--whole-archive -lnewlib_nano -luser -lwiring -lhal -lsystem -lservices -lcommunication -lplatform -lwiring_globals -lcrypto -Wl,--no-whole-archive
/usr/local/gcc-arm-embedded/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/bin/ld: target/workspace.elf section `.data' will not fit in region `APP_FLASH'
/usr/local/gcc-arm-embedded/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/bin/ld: region `APP_FLASH' overflowed by 440 bytes
collect2: error: ld returned 1 exit status
../build/module.mk:222: recipe for target 'target/workspace.elf' failed
make: *** [target/workspace.elf] Error 1

This suggests you are building for a Spark Core and not for Electron.
If you tell us how you build we might be able to advise you how to actually target an Electron

You’r right, I had the core selected. I’m on the web IDE. Changing to electron sorted it out but the error message didn’t really hint towards that.

It might not have been obvious, but since I only had to see that one -DSTM32F10X_MD switch to actually see the reason, all the hints were there.
After all, this was a link error and not a compile error there isn’t much more to hint since the code itself did compile just fine (only ignorable warnings) but the actual reason for the failure was that the Core has too little flash memory to hold the resulting binary.

If the result would have been that fraction smaller, the build would probably have succeeded giving you a valid Spark Core binary. How would the IDE know that’s not what you want if you didn’t tell it the same by actually selecting the correct target.

If you look at the status bar at the bottom of Web IDE you’d see what Web IDE knows about your intended target
For Electron
image
For Photon
image

1 Like

Yep good point. I didn’t notice the little yellow or red icons so much.