[ISSUE] Freshly broken boron compile against LTS Device OS 2.3.0

Hi all,

I’ve been working really well with the Boron for the last few months, and we have a product built and deployed on the 2.3 LTS device OS. In the last few days, since the 4.0/5.0 OS releases landed, my Workbench updated with the new toolchains, and now will just straight-up refuse to build against 2.3. I’m not even sure what the error means - c:/users/david/.particle/toolchains/gcc-arm/9.2.1/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: module info static details not linked

I’m not in a position to update the OS on my deployed Borons (long story), so I need to get the build working again, and kinda sharpish, since I need to push a firmware update to these devices ASAP.

Things I’ve tried so-far:

  1. Re-installed all the plugins
  2. Trashed everything in the %USERPROFILE%\.particle folder, triggering all the toolchain re-installs
  3. Updated my CLI
  4. Clean Device OS build (errors out)
  5. Fresh git clone (errors out)
  6. Build a blank test project (works fine)
  7. Cut-and-paste the code from my previously working repo into the new blank test project, and re-installed my libs (errors out)

I’ve had a look at the Audit report - don’t have the time to dig through the whole thing and sanitize it, happy to include specific sections if people think it will help.

Here’s the logs from my latest attempt - not sure if it’s informative at all to anyone, but worth a shot:

cd "C:/Users/David/.particle/toolchains/deviceOS/2.3.0/main" && make all
make[1]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/main'
make -C ../modules/boron/user-part all
make[2]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/modules/boron/user-part'

mkdir -p e:/Code/Test/BuildSysTest/target/2.3.0/boron/
make -f ../../../modules/shared/nRF52840/build_linker_script.mk PREBUILD=1
make[3]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/modules/boron/user-part'
Creating e:/Code/Test/BuildSysTest/target/2.3.0/boron/platform_user_ram.ld ...
make[3]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/modules/boron/user-part'

make -C ../../../user 
make[3]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/user'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/user'
make -C ../../../hal-dynalib 
make[3]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/hal-dynalib'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/hal-dynalib'
make -C ../../../services-dynalib 
make[3]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/services-dynalib'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/services-dynalib'
make -C ../../../system-dynalib
make[3]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/system-dynalib'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/system-dynalib'
make -C ../../../rt-dynalib
make[3]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/rt-dynalib'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/rt-dynalib'
make -C ../../../wiring 
make[3]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/wiring'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/wiring'
make -C ../../../communication-dynalib
make[3]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/communication-dynalib'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/communication-dynalib'
make -C ../../../platform 
make[3]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/platform'
make -C ../third_party/nrf5_sdk 
make[4]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/third_party/nrf5_sdk'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/third_party/nrf5_sdk'
make -C ../third_party/littlefs
make[4]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/third_party/littlefs'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/third_party/littlefs'
make -C ../third_party/miniz 
make[4]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/third_party/miniz'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/third_party/miniz'
make[3]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/platform'
make -C ../../../wiring_globals
make[3]: Entering directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/wiring_globals'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/wiring_globals'
Building target: e:/Code/Test/BuildSysTest/target/2.3.0/boron/BuildSysTest.elf
Invoking: ARM GCC C++ Linker
mkdir -p e:/Code/Test/BuildSysTest/target/2.3.0/boron/
C:/Users/David/.particle/toolchains/gcc-arm/9.2.1/bin/arm-none-eabi-g++ -DSTM32_DEVICE -DnRF52840 -DNRF52840_XXAA -DPLATFORM_THREADING=1 -DPLATFORM_ID=13 -DPLATFORM_NAME=boron -DPLATFORM_GEN=3 -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00D -DUSBD_PID_CDC=0xC00D -g3 -gdwarf-2 -Os 
-mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -DSOFTDEVICE_PRESENT=1 -DS140 -DINCLUDE_PLATFORM=1 -D_WIZCHIP_=W5500 -fno-builtin -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DLFS_CONFIG=lfs_config.h -DSYSTEM_VERSION_STRING=2.3.0 -DRELEASE_BUILD -Werror -I../../../user/inc -I../../../dynalib/inc -I../../../services/inc -I../../../third_party/nanopb/nanopb -I../../../hal/inc -I../../../hal/shared -I../../../hal/src/boron -I../../../hal/network/lwip/cellular -I../../../hal/src/nRF52840 -I../../../hal/src/armv7 -I../../../hal/src/nRF52840 -I../../../hal/src/nRF52840/lwip -I../../../hal/src/nRF52840/freertos -I../../../hal/src/nRF52840/mbedtls -I../../../hal/src/nRF52840/littlefs -I../../../hal -I../../../hal/src/nRF52840/posix -I../../../hal/network -I../../../hal/network/api -I../../../hal/network/lwip -I../../../hal/network/lwip/posix -I../../../hal/network/lwip/wiznet -I../../../hal/network/ncp -I../../../hal/network/ncp/at_parser -I../../../hal/network/util -I../../../third_party/lwip/lwip/src/include -I../../../third_party/freertos/freertos/FreeRTOS/Source/include -I../../../third_party/nrf5_sdk/nrf5_sdk/external/freertos/portable/GCC/nrf52 -I../../../third_party/nrf5_sdk/nrf5_sdk/external/freertos/portable/CMSIS/nrf52 -I../../../third_party/wiznet_driver/wiznet_driver/Ethernet -I../../../gsm0710muxer/gsm0710muxer/include -I../../../system/inc -I../../../rt-dynalib/inc -I../../../wiring/inc -I../../../modules/shared/nRF52840/inc -I../../../platform/shared/inc -I../../../third_party/nrf5_sdk -I../../../third_party/nrf5_sdk/nrf5_sdk/components/toolchain/cmsis/include -I../../../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx -I../../../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/drivers -I../../../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/drivers/include -I../../../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/hal -I../../../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/mdk -I../../../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/hal -I../../../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/drivers/src/prs -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/util -I../../../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/s140/headers -I../../../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/s140/headers/nrf52 -I../../../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/common -I../../../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/mbr/nrf52840/headers -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/fstorage -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/experimental_section_vars -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/atomic -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/crc32 -I../../../third_party/nrf5_sdk/nrf5_sdk/integration/nrfx/legacy -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/delay -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/log -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/log -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/log/src -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/experimental_section_vars -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/atomic -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/delay -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/queue -I../../../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/common -I../../../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/s140 -I../../../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/s140/headers -I../../../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/s140/headers/nrf52 -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/fifo -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/atomic_fifo -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/strerror -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/fstorage -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/atomic_flags -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/usbd -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/usbd/class/cdc -I../../../third_party/nrf5_sdk/nrf5_sdk/components/libraries/usbd/class/cdc/acm -I../../../third_party/nrf5_sdk/nrf5_sdk/components/ble/common -I../../../third_party/nrf5_sdk/nrf5_sdk/components/ble/nrf_ble_gatt -I../../../third_party/nrf5_sdk/nrf5_sdk/components/ble/ble_advertising -I../../../third_party/nrf5_sdk/nrf5_sdk/components/nfc/t2t_lib -I../../../third_party/nrf5_sdk/nrf5_sdk/components/nfc/platform -I../../../third_party/nrf5_sdk/nrf5_sdk/components/nfc/ndef/generic/message -I../../../third_party/nrf5_sdk/nrf5_sdk/components/nfc/ndef/generic/record -I../../../third_party/nrf5_sdk/nrf5_sdk/components/nfc/ndef/lauchapp -I../../../third_party/nrf5_sdk/nrf5_sdk/components/nfc/ndef/text -I../../../third_party/nrf5_sdk/nrf5_sdk/components/nfc/ndef/uri -I../../../third_party/nrf5_sdk/nrf5_sdk/external/nrf_cc310/include -I../../../third_party/nrf5_sdk/nrf5_sdk/external/utf_converter -I../../../third_party/littlefs/littlefs -I../../../third_party/miniz/miniz -I../../../platform/MCU/nRF52840/inc -I../../../modules/shared/nRF52840/inc/user-part -I. -MD -MP -MF e:/Code/Test/BuildSysTest/target/2.3.0/boron/BuildSysTest.elf.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Werror=return-type -Wundef -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=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0xD4000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=6 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,1,2301 -DMODULE_DEPENDENCY2=0,0,0 -D_GNU_SOURCE  e:/Code/Test/BuildSysTest/target/2.3.0/boron//obj/./src/user_export.o e:/Code/Test/BuildSysTest/target/2.3.0/boron//obj/./src/module_info.o e:/Code/Test/BuildSysTest/target/2.3.0/boron//obj/./src/user_module.o e:/Code/Test/BuildSysTest/target/2.3.0/boron//obj/./src/newlib_stubs.o --output e:/Code/Test/BuildSysTest/target/2.3.0/boron/BuildSysTest.elf -nostartfiles -Xlinker --gc-sections -fno-use-cxa-atexit -fno-lto -L../../../build/arm/linker/nrf52840  -L../../../build/target/user/platform-13-m/BuildSysTest/ -L../../../build/target/services-dynalib/platform-13-m/ -L../../../build/target/hal-dynalib/platform-13-m/ -L../../../build/target/system-dynalib/platform-13-m/ -L../../../build/target/rt-dynalib/platform-13-m/ -L../../../build/target/wiring/platform-13-m/ -L../../../build/target/communication-dynalib/platform-13-m/ -L../../../build/target/platform/platform-13-m/ -L../../../build/target/nrf5_sdk/platform-13-m/ -L../../../build/target/littlefs/platform-13-m/ -L../../../build/target/miniz/platform-13-m/ -L../../../build/target/wiring_globals/platform-13-m/ -L../../../build/target/nrf5_sdk/platform-13-m -L../../../build/target/littlefs/platform-13-m -L../../../build/target/miniz/platform-13-m -L../../../build/arm/linker -Wl,--whole-archive -luser -lhal-dynalib -lservices-dynalib -lsystem-dynalib -lrt-dynalib -lwiring -lcommunication-dynalib -lplatform -lwiring_globals -lnrf5_sdk -llittlefs -lminiz -Wl,--no-whole-archive  -lnosys -L../../../modules/boron/system-part1 -L. -Le:/Code/Test/BuildSysTest/target/2.3.0/boron/ -T./linker.ld -Wl,--defsym,USER_FIRMWARE_IMAGE_SIZE=0x20000 -Wl,--defsym,USER_FIRMWARE_IMAGE_LOCATION=0xD4000 -Wl,-Map,e:/Code/Test/BuildSysTest/target/2.3.0/boron/BuildSysTest.map -Wl,--defsym,__STACKSIZE__=2048 -Wl,--defsym,__STACK_SIZE=2048
c:/users/david/.particle/toolchains/gcc-arm/9.2.1/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: module info static details not linked
collect2.exe: error: ld returned 1 exit status
make[2]: *** [../../../build/module.mk:232: e:/Code/Test/BuildSysTest/target/2.3.0/boron/BuildSysTest.elf] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/modules/boron/user-part'
make[1]: *** [../build/recurse.mk:12: modules/boron/user-part] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/main'
make: *** [C:/Users/David/.particle/toolchains/buildscripts/1.10.0/Makefile:68: compile-user] Error 2
bash-4.4$

Here’s a slightly more detailed log from a different build run, it shows that my project is actually getting compiled:

:::: COMPILING APPLICATION & DEVICE OS

  /cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/modules/boron/system-part1/makefile /cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/modules/boron/user-part/makefile
   text    data     bss     dec     hex filename
 498840    2620   61800  563260   8983c ../../../build/target/system-part1/platform-13-m/system-part1.elf
Creating e:/Code/Test/BuildSysTest/target/2.3.0/boron/platform_user_ram.ld ...
e:/Code/Test/BuildSysTest//src/SensorAggregator/SensorAggregator.cpp: In member function 'bool SensorAggregator_c::doPublish()':
e:/Code/Test/BuildSysTest//src/SensorAggregator/SensorAggregator.cpp:97:9: warning: unused variable 'encodedLen' [-Wunused-variable]
   97 |     int encodedLen = base64_encode(m_tx_buffer, m_data_buffer[0], sizeof(m_data_buffer));
      |         ^~~~~~~~~~
e:/Code/Test/BuildSysTest//src/my_bme_680/Adafruit_BME680.cpp:20:29: warning: missing terminating " character
   20 | #include "Adafruit_BME680.h""
      |                             ^
e:/Code/Test/BuildSysTest//src/my_bme_680/Adafruit_BME680.cpp:20:29: warning: extra tokens at end of #include directive
In file included from e:/Code/Test/BuildSysTest//src/my_bme_680/Adafruit_BME680.cpp:20:
e:/Code/Test/BuildSysTest//src/my_bme_680/Adafruit_BME680.cpp: In function 'int8_t spi_read(uint8_t, uint8_t, uint8_t*, uint16_t)':
e:\code\test\buildsystest\src\my_bme_680\Adafruit_BME680.h:33:47: warning: unsigned conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '1000000' to '64' [-Woverflow]
   33 | #define BME680_DEFAULT_SPIFREQ               (1000000)
      |                                              ~^~~~~~~~
e:/Code/Test/BuildSysTest//src/my_bme_680/Adafruit_BME680.cpp:632:25: note: in expansion of macro 'BME680_DEFAULT_SPIFREQ'
  632 |     SPI.setClockDivider(BME680_DEFAULT_SPIFREQ);
      |                         ^~~~~~~~~~~~~~~~~~~~~~
e:/Code/Test/BuildSysTest//src/my_bme_680/Adafruit_BME680.cpp: In function 'int8_t spi_write(uint8_t, uint8_t, uint8_t*, uint16_t)':
e:\code\test\buildsystest\src\my_bme_680\Adafruit_BME680.h:33:47: warning: unsigned conversion from 'int' to 'uint8_t' {aka 'unsigned char'} changes value from '1000000' to '64' [-Woverflow]
   33 | #define BME680_DEFAULT_SPIFREQ               (1000000)
      |                                              ~^~~~~~~~
e:/Code/Test/BuildSysTest//src/my_bme_680/Adafruit_BME680.cpp:675:25: note: in expansion of macro 'BME680_DEFAULT_SPIFREQ'
  675 |     SPI.setClockDivider(BME680_DEFAULT_SPIFREQ);
      |                         ^~~~~~~~~~~~~~~~~~~~~~
c:/users/david/.particle/toolchains/gcc-arm/9.2.1/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: module info static details not linked
collect2.exe: error: ld returned 1 exit status
make[2]: *** [../../../build/module.mk:232: e:/Code/Test/BuildSysTest/target/2.3.0/boron/BuildSysTest.elf] Error 1
make[1]: *** [makefile:86: /cygdrive/c/Users/David/.particle/toolchains/deviceOS/2.3.0/modules/boron/user-part/makefile] Error 2
make: *** [C:\Users\David\.particle\toolchains\buildscripts\1.10.0\Makefile:74: compile-all] Error 2

 *  The terminal process "C:\Users\David\.particle\toolchains\buildtools\1.1.1\bin\bash.exe '-c', 'make -f 'C:\Users\David\.particle\toolchains\buildscripts\1.10.0\Makefile' compile-all -s'" terminated with exit code: 2. 
 *  Press any key to close the terminal. 

@DKWood take a look at this line. It’s a warning but it may be the cause of the issue.

:::: COMPILING APPLICATION & DEVICE OS

e:/Code/Test/BuildSysTest//src/my_bme_680/Adafruit_BME680.cpp:20:29: warning: missing terminating " character
   20 | #include "Adafruit_BME680.h""
      |                             ^
e:/Code/Test/BuildSysTest//src/my_bme_680/Adafruit_BME680.cpp:20:29: warning: extra tokens at end of #include directive
In file included from e:/Code/Test/BuildSysTest//src/my_bme_680/Adafruit_BME680.cpp:20:

There is an extra double quote.

1 Like

Alas not the problem, but a nice catch nonetheless @peekay123.

Must’ve slipped in as I was frigging around pulling libraries in and out. :sweat_smile:

1 Like

Hi, were you able to fix this issue?
Thanks

SOLUTION FOUND!

This is the error message that you will get when you try and build a product firmware against OS 2.3 where you have included the PRODUCT_VERSION macro, but have commented out or not included the PRODUCT_ID macro.

I haven’t had a chance to dig into the why, but the what is that you get a GCC error message that returns 0 google results.

1 Like