mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #18210 from maribu/cpu/esp32
cpu/esp32: enforce MAXTHREADS is at least 3
This commit is contained in:
commit
29d21938aa
@ -299,6 +299,8 @@ extern void IRAM_ATTR thread_yield_isr(void* arg);
|
||||
|
||||
static NORETURN void IRAM system_init (void)
|
||||
{
|
||||
static_assert(MAXTHREADS >= 3,
|
||||
"ESP32 requires at least 3 threads, esp_timer, idle, and main");
|
||||
/* enable cached read from flash */
|
||||
Cache_Read_Enable(PRO_CPU_NUM);
|
||||
|
||||
|
@ -44,7 +44,13 @@ CFLAGS += -DPIN_IN_0=$(PIN_IN_0)
|
||||
CFLAGS += -DPIN_IN_1=$(PIN_IN_1)
|
||||
CFLAGS += -DPIN_OUT_0=$(PIN_OUT_0)
|
||||
CFLAGS += -DPIN_OUT_1=$(PIN_OUT_1)
|
||||
# We only need 1 thread (+ the Idle thread on some platforms) and we really want
|
||||
# this app working on all boards.
|
||||
CFLAGS += -DMAXTHREADS=2
|
||||
CFLAGS += -DLOW_ROM=$(LOW_ROM)
|
||||
|
||||
ifneq ($(CPU_FAM),esp32)
|
||||
# We only need 1 thread (+ the Idle thread on some platforms) and we really
|
||||
# want this app working on all boards.
|
||||
CFLAGS += -DMAXTHREADS=2
|
||||
else
|
||||
# ESP32 uses an extra thread for esp_timer
|
||||
CFLAGS += -DMAXTHREADS=3
|
||||
endif
|
||||
|
@ -3,7 +3,12 @@ USEPKG += fff
|
||||
# If periph_i2c is pulled in the real implementation conflicts with the mock
|
||||
FEATURES_BLACKLIST += periph_i2c
|
||||
|
||||
# only two threads used
|
||||
CFLAGS += -DMAXTHREADS=2
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
ifneq ($(CPU_FAM),esp32)
|
||||
# only two threads used
|
||||
CFLAGS += -DMAXTHREADS=2
|
||||
else
|
||||
# ESP32 uses an extra thread for esp_timer
|
||||
CFLAGS += -DMAXTHREADS=3
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user