platform-ststm32 icon indicating copy to clipboard operation
platform-ststm32 copied to clipboard

gcc-arm-toolchain 12.2.1 _getpid is not implemented and will always fail

Open Riei-Joaquim opened this issue 2 years ago • 0 comments

Configuration

Operating system: Ubuntu 22.04

PlatformIO Version (platformio --version): PlatformIO Core, version 6.1.9

Description of problem

I'm trying to use C++20 in a plaftomio project and found the following issues:

  • By default the ststm32 platform uses gcc 9.3( https://registry.platformio.org/tools/platformio/toolchain-gccarmnoneeabi?version=1.90301.200702) which does not support C++ newer than version 14.
  • By forcing the update to the latest, gcc 12.2(https://registry.platformio.org/tools/platformio/toolchain-gccarmnoneeabi), the code compiles, ignoring the "-Wno-register", "-Wno-volatile" warnings, but the following compilation warning appears
.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: .platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/softfp/libc.a(libc_a-signalr.o): in function `_getpid_r':
signalr.c:(.text._getpid_r+0x0): warning: _getpid is not implemented and will always fail
.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: .platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/softfp/libc.a(libc_a-signalr.o): in function `_kill_r':
signalr.c:(.text._kill_r+0x12): warning: _kill is not implemented and will always fail

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:nucleo_f767zi]
platform = ststm32@~16.1.0
board = nucleo_f767zi
lib_ldf_mode = deep+

; work arround platform ststm32 not updated to lastest version
platform_packages = platformio/toolchain-gccarmnoneeabi@~1.120201.221222

framework = mbed
monitor_speed = 230400
upload_protocol = mbed
build_flags = -std=gnu++2a -std=gnu11 -O2 -Ilib -Iinclude
build_unflags = -std=gnu++14 -std=gnu++98

Riei-Joaquim avatar Aug 05 '23 22:08 Riei-Joaquim