Skip to content

Commit

Permalink
fixup! cpu/cortexm: implement sched_arch_idle() and disable idle thread
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 committed Jun 8, 2020
1 parent 8f7a320 commit 64a7bbb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions cpu/cortexm_common/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ config CPU_ARCH_ARMV7_M
bool
select HAS_ARCH_ARM
select HAS_ARCH_32BIT
select HAS_NO_IDLE_THREAD

config CPU_ARCH_ARMV8_M
bool
select HAS_ARCH_ARM
select HAS_ARCH_32BIT
select HAS_NO_IDLE_THREAD

config CPU_ARCH
default "armv6_m" if CPU_ARCH_ARMV6_M
Expand Down Expand Up @@ -100,3 +102,8 @@ config HAS_CORTEXM_SVC
bool
help
Indicates that ARM Cortex-M Supervisor Calls are available.

config HAS_NO_IDLE_THREAD
bool
help
Indicates that this MCU doesn't need the idle thread
5 changes: 5 additions & 0 deletions cpu/cortexm_common/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ FEATURES_PROVIDED += ssp
ifneq (,$(filter $(CPU_ARCH),cortex-m4f cortex-m7))
FEATURES_PROVIDED += cortexm_fpu
endif

# cortex-m3 and higher don't need the idle thread
ifneq (,$(filter cortex-m2% cortex-m4% cortex-m3% cortex-m7%,$(CPU_ARCH)))
FEATURES_PROVIDED += no_idle_thread
endif
5 changes: 0 additions & 5 deletions cpu/cortexm_common/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ LINKFLAGS += $(if $(ROM_OFFSET),$(LINKFLAGPREFIX)--defsym=_rom_offset=$(ROM_OFFS
# FW_ROM_LEN: rom length to use for firmware linking. Allows linking only in a section of the rom.
LINKFLAGS += $(if $(FW_ROM_LEN),$(LINKFLAGPREFIX)--defsym=_fw_rom_length=$(FW_ROM_LEN))

# Cortex-M3+ doesn't need the idle thread
ifneq (,$(filter cortex-m2% cortex-m4% cortex-m3% cortex-m7%,$(CPU_ARCH)))
DISABLE_MODULE += core_idle_thread
endif

# Cortex-M0+/1/3/4/7 riotboot settings

# From ARMv7-M (M4, M3, M7) architecture reference manual, section B1.5.3
Expand Down

0 comments on commit 64a7bbb

Please sign in to comment.