Skip to content

zephyr: Upgrade to Zephyr v4.0.0. #16207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/library/zephyr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ Functions

Returns the thread id of the current thread, which is used to reference the thread.

.. function:: thread_analyze()
.. function:: thread_analyze(cpu)

Runs the Zephyr debug thread analyzer on the current thread and prints stack size statistics in the format:
Runs the Zephyr debug thread analyzer on the current thread on the given cpu
and prints stack size statistics in the format:

"``thread_name``-20s: STACK: unused ``available_stack_space`` usage ``stack_space_used``
/ ``stack_size`` (``percent_stack_space_used`` %); CPU: ``cpu_utilization`` %"
Expand Down
2 changes: 1 addition & 1 deletion docs/zephyr/tutorial/repl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ With your serial program open (PuTTY, screen, picocom, etc) you may see a
blank screen with a flashing cursor. Press Enter (or reset the board) and
you should be presented with the following text::

*** Booting Zephyr OS build v3.7.0 ***
*** Booting Zephyr OS build v4.0.0 ***
MicroPython v1.24.0-preview.179.g5b85b24bd on 2024-08-05; zephyr-frdm_k64f with mk64f12
Type "help()" for more information.
>>>
Expand Down
6 changes: 3 additions & 3 deletions ports/zephyr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MicroPython port to Zephyr RTOS
This is a work-in-progress port of MicroPython to Zephyr RTOS
(http://zephyrproject.org).

This port requires Zephyr version v3.7.0, and may also work on higher
This port requires Zephyr version v4.0.0, and may also work on higher
versions. All boards supported
by Zephyr (with standard level of features support, like UART console)
should work with MicroPython (but not all were tested).
Expand Down Expand Up @@ -39,13 +39,13 @@ setup is correct.
If you already have Zephyr installed but are having issues building the
MicroPython port then try installing the correct version of Zephyr via:

$ west init zephyrproject -m https://github.com/zephyrproject-rtos/zephyr --mr v3.7.0
$ west init zephyrproject -m https://github.com/zephyrproject-rtos/zephyr --mr v4.0.0

Alternatively, you don't have to redo the Zephyr installation to just
switch from master to a tagged release, you can instead do:

$ cd zephyrproject/zephyr
$ git checkout v3.7.0
$ git checkout v4.0.0
$ west update

With Zephyr installed you may then need to configure your environment,
Expand Down
2 changes: 1 addition & 1 deletion ports/zephyr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static void vfs_init(void) {
int ret = 0;

#ifdef CONFIG_DISK_DRIVER_SDMMC
mp_obj_t args[] = { mp_obj_new_str_from_cstr(CONFIG_SDMMC_VOLUME_NAME) };
mp_obj_t args[] = { mp_obj_new_str_from_cstr("SD") };
bdev = MP_OBJ_TYPE_GET_SLOT(&zephyr_disk_access_type, make_new)(&zephyr_disk_access_type, ARRAY_SIZE(args), 0, args);
mount_point_str = "/sd";
#elif defined(CONFIG_FLASH_MAP) && FIXED_PARTITION_EXISTS(storage_partition)
Expand Down
7 changes: 4 additions & 3 deletions ports/zephyr/modzephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ static mp_obj_t mod_current_tid(void) {
static MP_DEFINE_CONST_FUN_OBJ_0(mod_current_tid_obj, mod_current_tid);

#ifdef CONFIG_THREAD_ANALYZER
static mp_obj_t mod_thread_analyze(void) {
thread_analyzer_print();
static mp_obj_t mod_thread_analyze(mp_obj_t cpu_in) {
unsigned int cpu = mp_obj_get_int(cpu_in);
thread_analyzer_print(cpu);
return mp_const_none;
}
static MP_DEFINE_CONST_FUN_OBJ_0(mod_thread_analyze_obj, mod_thread_analyze);
static MP_DEFINE_CONST_FUN_OBJ_1(mod_thread_analyze_obj, mod_thread_analyze);
#endif

#ifdef CONFIG_SHELL_BACKEND_SERIAL
Expand Down
6 changes: 3 additions & 3 deletions tools/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -747,9 +747,9 @@ function ci_windows_build {
########################################################################################
# ports/zephyr

ZEPHYR_DOCKER_VERSION=v0.26.13
ZEPHYR_SDK_VERSION=0.16.8
ZEPHYR_VERSION=v3.7.0
ZEPHYR_DOCKER_VERSION=v0.27.4
ZEPHYR_SDK_VERSION=0.17.0
ZEPHYR_VERSION=v4.0.0

function ci_zephyr_setup {
docker pull zephyrprojectrtos/ci:${ZEPHYR_DOCKER_VERSION}
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy