-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mismatched GCC version for STM32Duino #720
Comments
Thanks for pointing it out, updated. |
Could you verify that the debugger works in this toolchain version? The user is just stuck on it here |
Indeed there is a problem, GDB v12 is not able to launch a debug server in pipe mode. I reverted the toolchain update to avoid breaking already working projects. As of now I'd probably recommend switching to GCC v12 directly in [env:nucleo_f401re]
platform = ststm32
framework = arduino
board = nucleo_f401re
debug_tool = custom
platform_packages =
toolchain-gccarmnoneeabi @ ~1.120201.0 and launching OpenOCD in a separate process, for example "C:/Users/YOUR_USER/.platformio/packages/tool-openocd/bin/openocd.exe" -c "tcl_port disabled; telnet_port disabled" -f "C:/Users/YOUR_USER/.platformio/packages/tool-openocd/openocd/scripts/board/st_nucleo_f4.cfg" Although, it seems only Windows is affected. |
Very weird thing. Maybe https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases behaves differently? :/ |
We use that exact packages. |
Signed-off-by: Frederic Pillon <[email protected]>
I assume GCC/GDB 12.3.1 also resolve the "GDB can't start OpenOCD in pipe mode" issue? Does this also resolve platformio/platformio-core#4741 on Linux? |
Yes, it's shipped with GDB v13 with this issue fixed.
Hopefully. |
PlatformIO uses arm-none-eabi-gcc 10.3.1 for all STM32 +https://github.com/stm32duino/Arduino_Core_STM32/ Arduino projects
platform-ststm32/platform.py
Lines 49 to 52 in a6a0cd5
however, the package declaration https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/main/package_stmicroelectronics_index.json declares that since version 2.5.0, the
12.2.1-1.2
version of the toolchain must be used.Not doing so causes failures in e.g. the STM32FreeRTOS library beceause the older toolchain version was compiled with different Newlib library and newlib options (no
_REENT_BACKWARD_BINARY_COMPAT
) which shrinks down the size ofstruct _reent
from over 1000 bytes to only 288 bytes which decreases the FreeRTOSTCB_t
task control block structure accordingly. This basically means that with PlatofrmIO, each created FreeRTOS task has a signifacant higher heap memory usage and out-of-memory occurs ealier or instantly. See https://community.platformio.org/t/stm32duino-freertos-problems/35163.The text was updated successfully, but these errors were encountered: