This commit implements the `_thread` module on the zephyr port.
Due to the fact that we are still using a rather old version of Zephyr,
`CONFIG_DYNAMIC_THREAD` is not available and therefore the stack for
threads cannot be allocated dynamically, only at compile time. So for the
time being and for the purpose of this commit, a maximum of 4 Zephyr
threads (besides the main thread) can be created. Once we manage to update
to the latest version of Zephyr this won't be a problem anymore.
Configuration for the nrf52840dk is added as part of this change, because
this board was used to test the threading support.
The Zephyr option `CONFIG_THREAD_CUSTOM_DATA` is used to enable threading
on a per board basis. The `thread.conf` file is added as a convenient way
to enable threading.
Signed-off-by: danicampora <danicampora@gmail.com>
CONFIG_USB was removed in Zephyr v2.7.0 after some Kconfig rework that
made it sufficient to use CONFIG_USB_DEVICE_STACK only.
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
Adds support for hardware SPI to the zephyr port. Consistent with other
ports, such as rp2 and stm32, we only implement the SPI protocol functions
(init and transfer). Explicit sck/mosi/miso selection is not supported
and new SPI instances are initialized with default values.
Zephyr's Kconfig symbols and defaults for SDHC/SDMMC disk drivers and
the disk access subsystem were reworked between Zephyr v2.5.0 and
v2.6.0. Update MicroPython accordingly.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This board does not work with CONFIG_NETWORKING enabled. And
CONFIG_CONSOLE_SUBSYS is enabled so that ctrl-C works.
Signed-off-by: Damien George <damien@micropython.org>
The zephyr build system supports merging application-level board
configurations, so there is no need to reproduce this functionality in
MicroPython.
If CONF_FILE is not explicitly set, then the zephyr build system looks for
prj.conf in the application directory. Therefore we rename the MicroPython
prj_base.conf to prj.conf.
Furthermore, if the zephyr build system finds boards/$(BOARD).conf in the
application directory, it merges that configuration with prj.conf.
Therefore we rename all the MicroPython board .conf files and move them
into a boards/ directory.
The minimal configuration, prj_minimal.conf, is left in the application
directory because it is used as an explicitly set CONF_FILE in
make-minimal.