Arduino 33 BLE: __sync_synchronize linker error since yesterday's update

Hi community,

Yesterday, I did an update and seemed to notice that the toolchain got updated. Now, none of my projects compiles anymore. They all end up with this linker error:

Linking .pio\build\debug\firmware.elf
c:/users/xxx/.platformio/packages/toolchain-gccarmnoneeabi@1.80201.181220/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/users/xxx/.platformio/packages/toolchain-gccarmnoneeabi@1.80201.181220/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib\libstdc++_nano.a(locale_init.o): in function `(anonymous namespace)::get_locale_mutex()':
(.text._ZN12_GLOBAL__N_116get_locale_mutexEv+0xc): undefined reference to `__sync_synchronize'
c:/users/xxx/.platformio/packages/toolchain-gccarmnoneeabi@1.80201.181220/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/users/xxx/.platformio/packages/toolchain-gccarmnoneeabi@1.80201.181220/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib\libstdc++_nano.a(locale.o): in function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)':
(.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEj+0x18): undefined reference to `__sync_synchronize'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\debug\firmware.elf] Error 1

I’ve tracked down the issue to this minimal Arduino sketch:

#include <Arduino.h>
#include <iostream>

void setup() {}

void loop() {}

And here is my platformio.ini:

[env:debug]
platform = nordicnrf52
board = nano33ble
framework = arduino

Any advice?

Did you run clean before new build?

I did. I also deleted the .pio folder.

In order to solve this, I needed to explicitly downgrade my toolchain version. The new platformio.ini file looks like this:

[env:debug]
platform = nordicnrf52
board = nano33ble
framework = arduino
platform_packages = toolchain-gccarmnoneeabi@1.70201.0

For those landing here, you can find the toolchain versions here.

Can you file an issue with https://github.com/platformio/platform-nordicnrf52/issues that #include <iostream> does not work anymore?

Done: