mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #15011 from benpicco/picolobc_feature
picolibc: model as a feature
This commit is contained in:
commit
8df645cfe9
@ -23,6 +23,7 @@ config CPU_CORE_ARM7TDMI_S
|
||||
## Declaration of specific features
|
||||
config HAS_ARCH_ARM7
|
||||
bool
|
||||
select HAS_PICOLIBC
|
||||
help
|
||||
Indicates that the core is part of the ARM7 group of cores.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# use common ARM7 periph code
|
||||
USEMODULE += arm7_common_periph
|
||||
|
||||
ifeq (1,$(PICOLIBC))
|
||||
ifneq (,$(filter picolibc,$(FEATURES_USED)))
|
||||
# Use Picolibc when explicitly selected
|
||||
USEMODULE += picolibc
|
||||
else
|
||||
|
@ -7,5 +7,6 @@ FEATURES_PROVIDED += arch_arm7
|
||||
FEATURES_PROVIDED += cpp
|
||||
FEATURES_PROVIDED += libstdcpp
|
||||
FEATURES_PROVIDED += periph_pm
|
||||
FEATURES_PROVIDED += picolibc
|
||||
FEATURES_PROVIDED += puf_sram
|
||||
FEATURES_PROVIDED += ssp
|
||||
|
@ -40,6 +40,7 @@ config CPU_CORE_CORTEX_M
|
||||
select HAS_CPU_CORE_CORTEXM
|
||||
select HAS_PERIPH_PM
|
||||
select HAS_PUF_SRAM
|
||||
select HAS_PICOLIBC
|
||||
select HAS_CPP
|
||||
select HAS_LIBSTDCPP
|
||||
select HAS_CPU_CHECK_ADDRESS
|
||||
|
@ -4,7 +4,7 @@ USEMODULE += cortexm_common
|
||||
# include common periph code
|
||||
USEMODULE += cortexm_common_periph
|
||||
|
||||
ifeq (1,$(PICOLIBC))
|
||||
ifneq (,$(filter picolibc,$(FEATURES_USED)))
|
||||
# Use Picolibc when explicitly selected
|
||||
USEMODULE += picolibc
|
||||
else
|
||||
|
@ -7,6 +7,7 @@ FEATURES_PROVIDED += cpu_core_cortexm
|
||||
FEATURES_PROVIDED += libstdcpp
|
||||
FEATURES_PROVIDED += periph_pm
|
||||
FEATURES_PROVIDED += puf_sram
|
||||
FEATURES_PROVIDED += picolibc
|
||||
FEATURES_PROVIDED += ssp
|
||||
|
||||
# cortex-m4f and cortex-m7 provide FPU support
|
||||
|
@ -8,6 +8,7 @@
|
||||
config CPU_ARCH_RISCV
|
||||
bool
|
||||
select HAS_ARCH_RISCV
|
||||
select HAS_PICOLIBC if '$(RIOT_CI_BUILD)' != '1'
|
||||
|
||||
config CPU_CORE_RV32M
|
||||
bool
|
||||
|
@ -1,4 +1,4 @@
|
||||
ifeq (1,$(PICOLIBC))
|
||||
ifneq (,$(filter picolibc,$(FEATURES_USED)))
|
||||
USEMODULE += picolibc
|
||||
else
|
||||
USEMODULE += newlib_nano
|
||||
|
@ -8,3 +8,8 @@ FEATURES_PROVIDED += periph_plic
|
||||
FEATURES_PROVIDED += periph_pm
|
||||
FEATURES_PROVIDED += periph_wdt
|
||||
FEATURES_PROVIDED += ssp
|
||||
|
||||
# RISC-V toolchain on CI does not work properly with picolibc yet
|
||||
ifeq (,$(RIOT_CI_BUILD))
|
||||
FEATURES_PROVIDED += picolibc
|
||||
endif
|
||||
|
@ -26,6 +26,12 @@ USEMODULE += gnrc_icmpv6_echo
|
||||
# Use minimal standard PRNG
|
||||
USEMODULE += prng_minstd
|
||||
|
||||
# llvm compatibility requires yet to be released picolibc 1.4.7
|
||||
ifneq (llvm, $(TOOLCHAIN))
|
||||
# Use picolibc when available
|
||||
FEATURES_OPTIONAL += picolibc
|
||||
endif
|
||||
|
||||
CFLAGS += -DLOG_LEVEL=LOG_NONE # disable log output
|
||||
# Set GNRC_PKTBUF_SIZE via CFLAGS if not being set via Kconfig.
|
||||
ifndef CONFIG_GNRC_PKTBUF_SIZE
|
||||
|
@ -296,6 +296,11 @@ config HAS_PERIPH_WDT_CB
|
||||
help
|
||||
Indicates that the WDT peripheral allows setting a callback.
|
||||
|
||||
config HAS_PICOLIBC
|
||||
bool
|
||||
help
|
||||
Indicates that the picolibc C library is available for the platform.
|
||||
|
||||
config HAS_PUF_SRAM
|
||||
bool
|
||||
help
|
||||
|
Loading…
Reference in New Issue
Block a user