Skip to content

Mismatched GCC version for STM32Duino #720

Closed
@maxgerhardt

Description

@maxgerhardt

PlatformIO uses arm-none-eabi-gcc 10.3.1 for all STM32 +https://github.com/stm32duino/Arduino_Core_STM32/ Arduino projects

else:
self.packages["toolchain-gccarmnoneeabi"]["version"] = "~1.100301.0"
self.packages["framework-cmsis"]["version"] = "~2.50700.0"
self.packages["framework-cmsis"]["optional"] = False

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 of struct _reent from over 1000 bytes to only 288 bytes which decreases the FreeRTOS TCB_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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions