Skip to content

Revert nRF52 toolchain to gcc 9.3.1 to avoid build errors - #3369

Open
YoshiWalsh wants to merge 1 commit into
meshcore-dev:devfrom
YoshiWalsh:fix/gcc-micronmea
Open

Revert nRF52 toolchain to gcc 9.3.1 to avoid build errors#3369
YoshiWalsh wants to merge 1 commit into
meshcore-dev:devfrom
YoshiWalsh:fix/gcc-micronmea

Conversation

@YoshiWalsh

@YoshiWalsh YoshiWalsh commented Sep 6, 2026

Copy link
Copy Markdown

This fixes build errors introduced by #3246. The stevemarple/MicroNMEA dependency does not currently support newer versions of gcc, and neither does our MicroNMEALocationProvider class.

I have tested, and of the gcc versions made available by toolchain-gccarmnoneeabi, 9.3.1 is the newest that allows us to build successfully. This is still an upgrade over the version we were previously using, 7.2.1. 10.3.1 and newer results in the following error:

Linking .pio/build/RAK_4631_repeater/firmware.elf
/home/yoshi/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/14.2.1/../../../../arm-none-eabi/bin/ld: .pio/build/RAK_4631_repeater/variants/rak4631/target.cpp.o: in function `MicroNMEALocationProvider::MicroNMEALocationProvider(Stream&, mesh::RTCClock*, int, int, RefCountedDigitalPin*)':
/mnt/d/git/MeshCore/src/helpers/sensors/MicroNMEALocationProvider.h:63:(.text._ZN25MicroNMEALocationProviderC2ER6StreamPN4mesh8RTCClockEiiP20RefCountedDigitalPin[_ZN25MicroNMEALocationProviderC5ER6StreamPN4mesh8RTCClockEiiP20RefCountedDigitalPin]+0x88): undefined reference to `vtable for LocationProvider'
/home/yoshi/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/14.2.1/../../../../arm-none-eabi/bin/ld: .pio/build/RAK_4631_repeater/libFrameworkArduino.a(Uart.cpp.o): in function `Uart::Uart(NRF_UARTE_Type*, IRQn_Type, unsigned char, unsigned char)':
/home/yoshi/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/Uart.cpp:48:(.text._ZN4UartC2EP14NRF_UARTE_Type9IRQn_Typehh+0x64): undefined reference to `vtable for HardwareSerial'
collect2: error: ld returned 1 exit status
*** [.pio/build/RAK_4631_repeater/firmware.elf] Error 1

Newer versions of gcc cause build failures for variants that include use of MicroNMEA.
@YoshiWalsh
YoshiWalsh changed the base branch from main to dev September 6, 2026 21:15
@YoshiWalsh

Copy link
Copy Markdown
Author

CC: @liamcottle

@liamcottle

liamcottle commented Sep 6, 2026

Copy link
Copy Markdown
Member

CC: @liamcottle

Hey there! I've just checked, and dev branch is compiling fine with the existing 1.140201.0 toolchain.

Can you try cleaning your dev environment (remove .pio), checking out the latest dev commit and rebuilding?

I've tested latest dev commit in our GitHub Actions environment and my MacBook and the RAK_4631_repeater target is building fine.

Your compilation error is complaining about undefined reference to vtable for HardwareSerial'. Which is strange.

GitHub Actions Build: https://github.com/liamcottle/MeshCore/actions/runs/34067454922/job/101578665668

MacBook Pro Build:

platformio run --environment RAK_4631_repeater 
Processing RAK_4631_repeater (board: rak4631; platform: nordicnrf52; framework: arduino)
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/rak4631.html
PLATFORM: Nordic nRF52 (10.9.0) > WisCore RAK4631 Board
HARDWARE: NRF52840 64MHz, 230KB RAM, 796KB Flash
DEBUG: Current (jlink) External (jlink, stlink)
PACKAGES: 
 - framework-arduinoadafruitnrf52 @ 1.10701.0+sha.d5413016 
 - framework-cmsis @ 2.50700.210515 (5.7.0) 
 - tool-adafruit-nrfutil @ 1.503.0 (5.3) 
 - tool-sreccat @ 1.164.0 (1.64) 
 - toolchain-gccarmnoneeabi @ 1.140201.0 (14.2.1)
 ...
 Environment        Status    Duration
-----------------  --------  ------------
RAK_4631_repeater  SUCCESS   00:00:48.588

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants