Compile error on 2.0.50-beta.x but not 1.x


#1

Found an odd issue where my code does not compile with the Web IDE on the new firmware but does on the old firmware. There are no obvious red box errors. There is this fatal error: destination path ‘firmware’ already exists and is not an empty directory.

The full output is too long to be posted so I’ve removed some the driver include lines

Processing /workspace/OneWire.cpp
Skipping .cpp file
Processing /workspace/OneWire.h
Skipping .h file
Processing /workspace/bluz-temp-develop.ino
Processing /workspace/spark-dallas-temperature.cpp
Skipping .cpp file
Processing /workspace/spark-dallas-temperature.h
Skipping .h file
ENOENT: no such file or directory, open '/workspace/project.properties’
fatal: destination path ‘firmware’ already exists and is not an empty directory.
make -C …/modules/bluz/user-part all
make[1]: Entering directory '/firmware/modules/bluz/user-part’
make -C …/…/…/user
make[2]: Entering directory '/firmware/user’
Building file: /workspace/spark-dallas-temperature.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p …/build/target/user/platform-103-m/workspace/
arm-none-eabi-gcc -DSTM32_DEVICE -DNRF51 -DPLATFORM_THREADING=0 -DPLATFORM_ID=103 -DPLATFORM_NAME=bluz -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -g3 -Os -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -mabi=aapcs -DSOFTDEVICE_PRESENT -DBLE_STACK_SUPPORT_REQUIRED -DNRF51 -DNRF51822_QFAA_CA -DBLE_STACK_SUPPORT_REQD -DUSE_CUSTOM_STATIC_ASSERT -DBLUZ -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=103 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=2.0.50 -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/bluz -I…/hal/src/nrf51 -I…/platform/shared/inc -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/device -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/common -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/config -
…removed…
I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain/gcc -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/softdevice/s110/headers -I…/platform/MCU/NRF51/SPARK_Firmware_Driver/inc -I…/dynalib/inc -I/workspace/ -I./libraries -I. -MD -MP -MF …/build/target/user/platform-103-m/workspace/spark-dallas-temperature.o.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 -DSPARK_PLATFORM_NET=NRF51 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x5000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x00037000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=7 -DMODULE_FUNCTION=5 -DMODULE_INDEX=2 -DMODULE_DEPENDENCY=4,1,6 -fno-exceptions -fno-rtti -std=gnu++11 -c -o …/build/target/user/platform-103-m/workspace/spark-dallas-temperature.o /workspace/spark-dallas-temperature.cpp

Building file: /workspace/OneWire.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p …/build/target/user/platform-103-m/workspace/
arm-none-eabi-gcc -DSTM32_DEVICE -DNRF51 -DPLATFORM_THREADING=0 -DPLATFORM_ID=103 -DPLATFORM_NAME=bluz -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -g3 -Os -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -mabi=aapcs -DSOFTDEVICE_PRESENT -DBLE_STACK_SUPPORT_REQUIRED -DNRF51 -DNRF51822_QFAA_CA -DBLE_STACK_SUPPORT_REQD -DUSE_CUSTOM_STATIC_ASSERT -DBLUZ -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=103 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=2.0.50 -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/bluz -I…/hal/src/nrf51 -I…/platform/shared/inc -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/device -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/common -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/config -
…removed…
I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain/gcc -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/softdevice/s110/headers -I…/platform/MCU/NRF51/SPARK_Firmware_Driver/inc -I…/dynalib/inc -I/workspace/ -I./libraries -I. -MD -MP -MF …/build/target/user/platform-103-m/workspace/OneWire.o.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 -DSPARK_PLATFORM_NET=NRF51 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x5000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x00037000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=7 -DMODULE_FUNCTION=5 -DMODULE_INDEX=2 -DMODULE_DEPENDENCY=4,1,6 -fno-exceptions -fno-rtti -std=gnu++11 -c -o …/build/target/user/platform-103-m/workspace/OneWire.o /workspace/OneWire.cpp

Building file: /workspace/bluz-temp-develop.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p …/build/target/user/platform-103-m/workspace/
arm-none-eabi-gcc -DSTM32_DEVICE -DNRF51 -DPLATFORM_THREADING=0 -DPLATFORM_ID=103 -DPLATFORM_NAME=bluz -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -g3 -Os -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -mabi=aapcs -DSOFTDEVICE_PRESENT -DBLE_STACK_SUPPORT_REQUIRED -DNRF51 -DNRF51822_QFAA_CA -DBLE_STACK_SUPPORT_REQD -DUSE_CUSTOM_STATIC_ASSERT -DBLUZ -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=103 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=2.0.50 -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/bluz -I…/hal/src/nrf51 -I…/platform/shared/inc -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/device -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/common -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/config -
…removed…
I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/libraries/timer -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain/gcc -I…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/softdevice/s110/headers -I…/platform/MCU/NRF51/SPARK_Firmware_Driver/inc -I…/dynalib/inc -I/workspace/ -I./libraries -I. -MD -MP -MF …/build/target/user/platform-103-m/workspace/bluz-temp-develop.o.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 -DSPARK_PLATFORM_NET=NRF51 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x5000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x00037000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=7 -DMODULE_FUNCTION=5 -DMODULE_INDEX=2 -DMODULE_DEPENDENCY=4,1,6 -fno-exceptions -fno-rtti -std=gnu++11 -c -o …/build/target/user/platform-103-m/workspace/bluz-temp-develop.o /workspace/bluz-temp-develop.cpp
/workspace/bluz-temp-develop.cpp: In function ‘void getTemp3()’:
/workspace/bluz-temp-develop.cpp:102:9: warning: unused variable ‘numSameToQuitEarly’ [-Wunused-variable]

     ^

Building target: …/build/target/user/platform-103-m/workspace/libuser.a
Invoking: ARM GCC Archiver
mkdir -p …/build/target/user/platform-103-m/workspace/
arm-none-eabi-ar -cr …/build/target/user/platform-103-m/workspace/libuser.a …/build/target/user/platform-103-m/workspace/spark-dallas-temperature.o …/build/target/user/platform-103-m/workspace/OneWire.o …/build/target/user/platform-103-m/workspace/bluz-temp-develop.o

make[2]: Leaving directory '/firmware/user’
make -C …/…/…/hal-dynalib
make[2]: Entering directory '/firmware/hal-dynalib’
make[2]: Nothing to be done for ‘all’.
make[2]: Leaving directory '/firmware/hal-dynalib’
make -C …/…/…/services-dynalib
make[2]: Entering directory '/firmware/services-dynalib’
make[2]: Nothing to be done for ‘all’.
make[2]: Leaving directory '/firmware/services-dynalib’
make -C …/…/…/system-dynalib
make[2]: Entering directory '/firmware/system-dynalib’
make[2]: Nothing to be done for ‘all’.
make[2]: Leaving directory '/firmware/system-dynalib’
make -C …/…/…/rt-dynalib
make[2]: Entering directory '/firmware/rt-dynalib’
make[2]: Nothing to be done for ‘all’.
make[2]: Leaving directory '/firmware/rt-dynalib’
make -C …/…/…/wiring
make[2]: Entering directory '/firmware/wiring’
make[2]: Nothing to be done for ‘all’.
make[2]: Leaving directory '/firmware/wiring’
make -C …/…/…/communication-dynalib
make[2]: Entering directory '/firmware/communication-dynalib’
make[2]: Nothing to be done for ‘all’.
make[2]: Leaving directory '/firmware/communication-dynalib’
make -C …/…/…/platform
make[2]: Entering directory '/firmware/platform’
make[2]: Nothing to be done for ‘all’.
make[2]: Leaving directory '/firmware/platform’
make -C …/…/…/wiring_globals
make[2]: Entering directory '/firmware/wiring_globals’
make[2]: Nothing to be done for ‘all’.
make[2]: Leaving directory '/firmware/wiring_globals’
Building file: src/user_module.c
Invoking: ARM GCC C Compiler
mkdir -p /workspace/target//obj/./src/
arm-none-eabi-gcc -DSTM32_DEVICE -DNRF51 -DPLATFORM_THREADING=0 -DPLATFORM_ID=103 -DPLATFORM_NAME=bluz -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -g3 -Os -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -mabi=aapcs -DSOFTDEVICE_PRESENT -DBLE_STACK_SUPPORT_REQUIRED -DNRF51 -DNRF51822_QFAA_CA -DBLE_STACK_SUPPORT_REQD -DUSE_CUSTOM_STATIC_ASSERT -DBLUZ -DINCLUDE_PLATFORM=1 -fno-builtin -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=2.0.50 -DRELEASE_BUILD -Werror -I./inc -I…/…/…/user/inc -I…/…/…/dynalib/inc -I…/…/…/services/inc -I…/…/…/hal/inc -I…/…/…/hal/shared -I…/…/…/hal/src/bluz -I…/…/…/hal/src/nrf51 -I…/…/…/system/inc -I…/…/…/rt-dynalib/inc -I…/…/…/wiring/inc -I…/…/…/modules/bluz/system-part1/inc -I…/…/…/platform/shared/inc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/device -
…removed…
I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain/gcc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/softdevice/s110/headers -I…/…/…/platform/MCU/NRF51/SPARK_Firmware_Driver/inc -I. -MD -MP -MF /workspace/target//obj/./src/user_module.o.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 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x5000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x00037000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=7 -DMODULE_FUNCTION=5 -DMODULE_INDEX=2 -DMODULE_DEPENDENCY=4,1,6 -std=gnu99 -Wno-pointer-sign -std=gnu99 -c -o /workspace/target//obj/./src/user_module.o src/user_module.c

Building file: src/module_info.c
Invoking: ARM GCC C Compiler
mkdir -p /workspace/target//obj/./src/
arm-none-eabi-gcc -DSTM32_DEVICE -DNRF51 -DPLATFORM_THREADING=0 -DPLATFORM_ID=103 -DPLATFORM_NAME=bluz -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -g3 -Os -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -mabi=aapcs -DSOFTDEVICE_PRESENT -DBLE_STACK_SUPPORT_REQUIRED -DNRF51 -DNRF51822_QFAA_CA -DBLE_STACK_SUPPORT_REQD -DUSE_CUSTOM_STATIC_ASSERT -DBLUZ -DINCLUDE_PLATFORM=1 -fno-builtin -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=2.0.50 -DRELEASE_BUILD -Werror -I./inc -I…/…/…/user/inc -I…/…/…/dynalib/inc -I…/…/…/services/inc -I…/…/…/hal/inc -I…/…/…/hal/shared -I…/…/…/hal/src/bluz -I…/…/…/hal/src/nrf51 -I…/…/…/system/inc -I…/…/…/rt-dynalib/inc -I…/…/…/wiring/inc -I…/…/…/modules/bluz/system-part1/inc -I…/…/…/platform/shared/inc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/device -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/common -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/config -
…removed…
I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/libraries/trace -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/libraries/util -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/libraries/timer -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain/gcc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/softdevice/s110/headers -I…/…/…/platform/MCU/NRF51/SPARK_Firmware_Driver/inc -I. -MD -MP -MF /workspace/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 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x5000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x00037000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=7 -DMODULE_FUNCTION=5 -DMODULE_INDEX=2 -DMODULE_DEPENDENCY=4,1,6 -std=gnu99 -Wno-pointer-sign -std=gnu99 -c -o /workspace/target//obj/./src/module_info.o src/module_info.c

Building file: src/user_export.c
Invoking: ARM GCC C Compiler
mkdir -p /workspace/target//obj/./src/
arm-none-eabi-gcc -DSTM32_DEVICE -DNRF51 -DPLATFORM_THREADING=0 -DPLATFORM_ID=103 -DPLATFORM_NAME=bluz -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -g3 -Os -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -mabi=aapcs -DSOFTDEVICE_PRESENT -DBLE_STACK_SUPPORT_REQUIRED -DNRF51 -DNRF51822_QFAA_CA -DBLE_STACK_SUPPORT_REQD -DUSE_CUSTOM_STATIC_ASSERT -DBLUZ -DINCLUDE_PLATFORM=1 -fno-builtin -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=2.0.50 -DRELEASE_BUILD -Werror -I./inc -I…/…/…/user/inc -I…/…/…/dynalib/inc -I…/…/…/services/inc -I…/…/…/hal/inc -I…/…/…/hal/shared -I…/…/…/hal/src/bluz -I…/…/…/hal/src/nrf51 -I…/…/…/system/inc -I…/…/…/rt-dynalib/inc -I…/…/…/wiring/inc -I…/…/…/modules/bluz/system-part1/inc -I…/…/…/platform/shared/inc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/device -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/common -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/config -
…removed…
I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/libraries/util -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/libraries/timer -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain/gcc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/softdevice/s110/headers -I…/…/…/platform/MCU/NRF51/SPARK_Firmware_Driver/inc -I. -MD -MP -MF /workspace/target//obj/./src/user_export.o.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 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x5000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x00037000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=7 -DMODULE_FUNCTION=5 -DMODULE_INDEX=2 -DMODULE_DEPENDENCY=4,1,6 -std=gnu99 -Wno-pointer-sign -std=gnu99 -c -o /workspace/target//obj/./src/user_export.o src/user_export.c

Building file: src/newlib_stubs.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p /workspace/target//obj/./src/
arm-none-eabi-gcc -DSTM32_DEVICE -DNRF51 -DPLATFORM_THREADING=0 -DPLATFORM_ID=103 -DPLATFORM_NAME=bluz -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -g3 -Os -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -mabi=aapcs -DSOFTDEVICE_PRESENT -DBLE_STACK_SUPPORT_REQUIRED -DNRF51 -DNRF51822_QFAA_CA -DBLE_STACK_SUPPORT_REQD -DUSE_CUSTOM_STATIC_ASSERT -DBLUZ -DINCLUDE_PLATFORM=1 -fno-builtin -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=2.0.50 -DRELEASE_BUILD -Werror -I./inc -I…/…/…/user/inc -I…/…/…/dynalib/inc -I…/…/…/services/inc -I…/…/…/hal/inc -I…/…/…/hal/shared -I…/…/…/hal/src/bluz -I…/…/…/hal/src/nrf51 -I…/…/…/system/inc -I…/…/…/rt-dynalib/inc -I…/…/…/wiring/inc -I…/…/…/modules/bluz/system-part1/inc -I…/…/…/platform/shared/inc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/device -
…removed…
I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain/gcc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/softdevice/s110/headers -I…/…/…/platform/MCU/NRF51/SPARK_Firmware_Driver/inc -I. -MD -MP -MF /workspace/target//obj/./src/newlib_stubs.o.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 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x5000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x00037000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=7 -DMODULE_FUNCTION=5 -DMODULE_INDEX=2 -DMODULE_DEPENDENCY=4,1,6 -fno-exceptions -fno-rtti -c -o /workspace/target//obj/./src/newlib_stubs.o src/newlib_stubs.cpp

Building target: /workspace/target/workspace.elf
Invoking: ARM GCC C++ Linker
mkdir -p /workspace/target/
arm-none-eabi-g++ -DSTM32_DEVICE -DNRF51 -DPLATFORM_THREADING=0 -DPLATFORM_ID=103 -DPLATFORM_NAME=bluz -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -g3 -Os -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -mabi=aapcs -DSOFTDEVICE_PRESENT -DBLE_STACK_SUPPORT_REQUIRED -DNRF51 -DNRF51822_QFAA_CA -DBLE_STACK_SUPPORT_REQD -DUSE_CUSTOM_STATIC_ASSERT -DBLUZ -DINCLUDE_PLATFORM=1 -fno-builtin -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=2.0.50 -DRELEASE_BUILD -Werror -I./inc -I…/…/…/user/inc -I…/…/…/dynalib/inc -I…/…/…/services/inc -I…/…/…/hal/inc -I…/…/…/hal/shared -I…/…/…/hal/src/bluz -I…/…/…/hal/src/nrf51 -I…/…/…/system/inc -I…/…/…/rt-dynalib/inc -I…/…/…/wiring/inc -I…/…/…/modules/bluz/system-part1/inc -I…/…/…/platform/shared/inc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/device -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/common -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/config -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/drivers_nrf/gpiote -
…removed…
I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/libraries/timer -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/toolchain/gcc -I…/…/…/platform/MCU/NRF51/NRF51_StdPeriph_Driver/inc/softdevice/s110/headers -I…/…/…/platform/MCU/NRF51/SPARK_Firmware_Driver/inc -I. -MD -MP -MF /workspace/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 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x5000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x00037000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=7 -DMODULE_FUNCTION=5 -DMODULE_INDEX=2 -DMODULE_DEPENDENCY=4,1,6 /workspace/target//obj/./src/user_module.o /workspace/target//obj/./src/module_info.o /workspace/target//obj/./src/user_export.o /workspace/target//obj/./src/newlib_stubs.o --output /workspace/target/workspace.elf -Xlinker --gc-sections -lc -lnosys -L…/…/…/build/target/user/platform-103-m/workspace/ -L…/…/…/build/target/services-dynalib/arm-m0/ -L…/…/…/build/target/hal-dynalib/platform-103-m/ -L…/…/…/build/target/system-dynalib/platform-103-m/ -L…/…/…/build/target/rt-dynalib/platform-103-m/ -L…/…/…/build/target/wiring/platform-103-m/ -L…/…/…/build/target/communication-dynalib/platform-103-m/ -L…/…/…/build/target/platform/platform-103-m/ -L…/…/…/build/target/wiring_globals/platform-103-m/ -L…/…/…/build/arm/linker -Wl,–whole-archive -luser -lhal-dynalib -lservices-dynalib -lsystem-dynalib -lrt-dynalib -lwiring -lcommunication-dynalib -lplatform -lwiring_globals -Wl,–no-whole-archive --specs=nano.specs -lnosys -T./linker.ld -L. -Wl,-Map,/workspace/target/workspace.map
/usr/local/gcc-arm-embedded/bin/…/lib/gcc/arm-none-eabi/4.9.3/…/…/…/…/arm-none-eabi/bin/ld: /workspace/target/workspace.elf section .text' will not fit in regionAPP_FLASH’
/usr/local/gcc-arm-embedded/bin/…/lib/gcc/arm-none-eabi/4.9.3/…/…/…/…/arm-none-eabi/bin/ld: region `APP_FLASH’ overflowed by 592 bytes
collect2: error: ld returned 1 exit status
…/…/…/build/module.mk:186: recipe for target ‘/workspace/target/workspace.elf’ failed
make[1]: Leaving directory '/firmware/modules/bluz/user-part’
make[1]: *** [/workspace/target/workspace.elf] Error 1
…/build/recurse.mk:11: recipe for target ‘modules/bluz/user-part’ failed
make: *** [modules/bluz/user-part] Error 2


#2

By the way, I’m close to the max size allowed. Each time I add a new line of code I get a compile error that I’ve overflowed by a few bytes so I have to remove something else to make room.

region `APP_FLASH’ overflowed by 22 bytes


#3

It looks like the flash was overflowed in the long error message as well.

This makes sense that it could compile with the old but can’t fit with the new firmware. When we add new features, there is less space for the user code each build. For example, here is a blank app compiled with 1.1.47:

Output of arm-none-eabi-size:
text data bss dec hex
2828 12 352 3192 NaN

And here is the same blank app compiled with 2.0.50-beta.4:

text data bss dec hex
3484 12 576 4072 NaN

So the additional features added to 2.0.5 took an extra 656 bytes of flash. This is to be expected.

We will be increasing the size of the user area in the next major release, so hopefully that will be available in the near future. In the meantime, it could be possible to reduce the size of your code in places. For example, if you are using floats, it could save space by switching to doubles if possible.

Are you using any libraries/devices off-the-shelf?


#4

I see, was buried in the output, looks like the new firmware build process has more verbose output?

I’m testing the Particle/Core WebIDE versions of OneWire and spark-dallas-temperature libraries. They don’t work directly on Bluz so I’ve copied the code over and have tweaked them to work. Apparently they use up more space than Luke’s version.

By the way awhile ago you had me add the following and said it was temporary until the Web IDE was updated; any idea when that will happen?
> #include “application.h”
> #include “pinmap_impl.h”
> #undef SCK
> #undef MISO
> #undef MOSI
> #undef SS
> #include “nrf_gpio.h”


#5

Oddly what was too big a few minutes ago is now verifying without errors. What is the max size? Here’s what I see when building with 2.0.50:

Output of arm-none-eabi-size:

text data bss dec hex
20204 28 692 20924 51

In a nutshell:
Flash used 20232 / 110592 18.3 %
RAM used 720 / 20480 3.5 %

Also did you mean change double to float previously or do you have some special hack that makes doubles take less space than floats?


#6

The undef lines will probably always be required. The issue is that we use the Nordic SDK and also the Particle firmware. We like to try and keep them both as-is and not change them, only add the necessary pieces to wire them together and fill in all the stuff we need. But, they sometimes have defined things with the same name, like the SPI pins. If, in future versions of the SDK, this changes then we can remove those.

The user app only had about 20k of flash space available, so it looks like you are right at the limit. What are you using that needs so much space?

As for the builds, they are quite different from 1.1 to 2.0. We actually use a different version of gcc (4.8.4 to 4.9.3) with the latest version and that can lead to differences.


#7

The onewire & dallas libraries are taking up about 14k by themselves. Is there I tool I can run on that code and have it point out where it’s all going?


#8

The way I usually try it is to look at the .map file which is an output of the compiler. So locally compiling, yes, you can look. From the Web IDE, I don’t think there is a way to look at that level of detail.