diff --git a/docs/library/zephyr.rst b/docs/library/zephyr.rst index 10676d9085289..2452d2fa25b23 100644 --- a/docs/library/zephyr.rst +++ b/docs/library/zephyr.rst @@ -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`` %" diff --git a/docs/zephyr/tutorial/repl.rst b/docs/zephyr/tutorial/repl.rst index db7b7333d2416..199dda2b7aeee 100644 --- a/docs/zephyr/tutorial/repl.rst +++ b/docs/zephyr/tutorial/repl.rst @@ -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. >>> diff --git a/ports/zephyr/README.md b/ports/zephyr/README.md index 4590eb7199c25..5cbeb09bf6ef2 100644 --- a/ports/zephyr/README.md +++ b/ports/zephyr/README.md @@ -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). @@ -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, diff --git a/ports/zephyr/main.c b/ports/zephyr/main.c index 9fae2b3a873e5..969b6c30c91c0 100644 --- a/ports/zephyr/main.c +++ b/ports/zephyr/main.c @@ -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) diff --git a/ports/zephyr/modzephyr.c b/ports/zephyr/modzephyr.c index c059c7e395796..95a8334f87e73 100644 --- a/ports/zephyr/modzephyr.c +++ b/ports/zephyr/modzephyr.c @@ -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 diff --git a/tools/ci.sh b/tools/ci.sh index 4e6f09b0bb853..d42288f9a6eef 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -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}
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: