forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
1 parent
aefd48b
commit 6833f3d
Showing
9 changed files
with
419 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CONFIG_NETWORKING=n | ||
CONFIG_BT=y | ||
CONFIG_BT_DEVICE_NAME_DYNAMIC=y | ||
CONFIG_BT_PERIPHERAL=y | ||
CONFIG_BT_CENTRAL=y | ||
|
||
CONFIG_MICROPY_HEAP_SIZE=98304 | ||
CONFIG_MAIN_STACK_SIZE=8192 | ||
|
||
# CONFIG_DYNAMIC_THREAD=y | ||
CONFIG_THREAD_CUSTOM_DATA=y | ||
CONFIG_THREAD_MONITOR=y | ||
CONFIG_THREAD_STACK_INFO=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.