1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-20 20:13:50 +01:00
RIOT/cpu/cortexm_common/Makefile.features
Marian Buschsieweke 2623221854
build system: use thread-safe stdio
This makes use of the new bug modeling to declare all platforms that
can use newlib and have no reentrancy hooks as affected by the
non-thread-safe stdio bug. (Which is every platform but ESP* and AVR,
the former because the reentrancy hooks are provided, the latter because
we do not and never will support newlib on them.)

Building on that, the mpaland-printf package is used when newlib is
used and the bug is present. This way we can rely on the stdio being
thread-safe on every platform and not causing random crashes at run
time.

Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
2025-08-21 12:06:10 +02:00

59 lines
1.7 KiB
Makefile

FEATURES_PROVIDED += arch_32bit
FEATURES_PROVIDED += arch_arm
FEATURES_PROVIDED += bug_newlib_broken_stdio
FEATURES_PROVIDED += cortexm_svc
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += cpu_check_address
FEATURES_PROVIDED += cpu_core_cortexm
FEATURES_PROVIDED += dbgpin
FEATURES_PROVIDED += libstdcpp
FEATURES_PROVIDED += newlib
FEATURES_PROVIDED += periph_flashpage_aux
FEATURES_PROVIDED += periph_pm
FEATURES_PROVIDED += picolibc
FEATURES_PROVIDED += puf_sram
FEATURES_PROVIDED += ssp
# cortex-m33, cortex-m4f and cortex-m7 provide FPU support
ifneq (,$(filter $(CPU_CORE),cortex-m33 cortex-m4f cortex-m7))
FEATURES_PROVIDED += cortexm_fpu
endif
# Set CPU_ARCH depending on the CPU_CORE
#
# RUST_TARGET is only used when building Rust code; any users need to require
# the `rust_target` feature to esnure things are checked properly.
ifeq ($(CPU_CORE),cortex-m0)
CPU_ARCH := armv6m
RUST_TARGET = thumbv6m-none-eabi
else ifeq ($(CPU_CORE),cortex-m0plus)
CPU_ARCH := armv6m
RUST_TARGET = thumbv6m-none-eabi
else ifeq ($(CPU_CORE),cortex-m23)
CPU_ARCH := armv8m
#RUST_TARGET = thumbv8m.base-none-eabi
else ifeq ($(CPU_CORE),cortex-m3)
CPU_ARCH := armv7m
RUST_TARGET = thumbv7m-none-eabi
else ifeq ($(CPU_CORE),cortex-m33)
CPU_ARCH := armv8m
FEATURES_PROVIDED += cortexm_stack_limit
#RUST_TARGET = thumbv8m.main-none-eabi
else ifeq ($(CPU_CORE),cortex-m4)
CPU_ARCH := armv7m
RUST_TARGET = thumbv7em-none-eabi
else ifeq ($(CPU_CORE),cortex-m4f)
CPU_ARCH := armv7m
RUST_TARGET = thumbv7em-none-eabihf
else ifeq ($(CPU_CORE),cortex-m7)
CPU_ARCH := armv7m
else
$(error Unknown cortexm core: $(CPU_CORE))
endif
ifneq (,$(RUST_TARGET))
FEATURES_PROVIDED += rust_target
endif
FEATURES_PROVIDED += no_idle_thread