As the comment above cpu_switch_context_exit notes:
sched_active_thread is not valid when cpu_switch_context_exit() is called.
Unfortunately, thread_yield(), which is called directly by
cpu_switch_context_exit(), uses sched_active_thread possibly resulting
in a null pointer dereference.
Solution: Trigger a software interrupt to perform a context switch and
let sched_run() determine the next valid thread from there.
Rational: the periph_common module is required by (most) other periph drivers
and also during startup of the CPU/MCU to run periph_init. The latter is only
required if other periph drivers are used, hence periph_common should be a
depency of periph_* modules and *not* of the CPU/MCU. This PR fixes that
by making periph_common a depency of periph_* and removing the explicit
include in the CPU/MCU implementation.
It is the role of boards based on 'cpu/fe310' to give the configuration
for the rtc/rtt.
The fe310/periph/rtc implementation depends on having periph/rtt configured
by the board so depends on the board 'providing' the periph_rtt feature
and declaring the required macros.
It should not simply depend of the 'periph_rtt' module as this does not
enforce having a configuration for the module in the board.
In practice, when compiling, it would result in undefined 'RTT' symbols,
instead of the build system detecting it.
Added HiFive1 to BOARD_INSUFFICIENT_MEMORY list for examples and tests that are too big to fit
build: fixed missing syscall and cpuid failures
Added missing syscall stubs for nanostubs and fixed compile error with cpuid periph
build: fixed whitespace error
build: add hifive1 to more BOARD_INSUFFICIENT_MEMORY
doc: fixed doxygen warnings
Addressed Doxygen warnings in source file comments
doc: more doxygen fixes
doc: even more doxygen fixes
doc: more changes
build: fix pedantic and rdci_simple build failures
make: exclude lua