From a189084708df1c5cea085d0f0191952b0aec137d Mon Sep 17 00:00:00 2001 From: Dirk Helbig <42479019+hegdi@users.noreply.github.com> Date: Fri, 28 Feb 2025 12:17:37 +0100 Subject: [PATCH] port/zephyr: updated to latest zephyr --- port/zephyr/README.md | 16 ++++++++-------- port/zephyr/prj.conf | 4 ++-- port/zephyr/src/main.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/port/zephyr/README.md b/port/zephyr/README.md index f2f4f821b..9206470ae 100644 --- a/port/zephyr/README.md +++ b/port/zephyr/README.md @@ -34,20 +34,20 @@ source env.sh You can build an example using: ```sh -west build -b nrf52840dk_nrf52840 +west build -b nrf52840dk/nrf52840 ``` -`nrf52840dk_nrf52840` selected the Nordic nRF52840 DK. For the older nRF52 DK with nRF52832, you can specify nrf52dk_nrf52832. +`nrf52840dk/nrf52840` selected the Nordic nRF52840 DK. For the older nRF52 DK with nRF52832, you can specify nrf52dk/nrf52832. To get a list of all supported Zephyr targets, run `west boards` To change zephyr platform settings use: ```sh -west build -b nrf52840dk_nrf52840 -t menuconfig +west build -b nrf52840dk/nrf52840 -t menuconfig ``` To build a different example, e.g. the `gatt_streamer_server`, set the EXAMPLE environment variable: ```sh -EXAMPLE=gatt_streamer_server west build -b nrf52840dk_nrf52840 +EXAMPLE=gatt_streamer_server west build -b nrf52840dk/nrf52840 ``` ### 2. Flash Example @@ -68,11 +68,11 @@ With 2a and 2b two options are given. ### 1. Building the application build using: ```sh -west build -b nrf5340dk_nrf5340_cpuapp +west build -b nrf5340dk/nrf5340/cpuapp ``` with debug: ```sh -west build -b nrf5340dk_nrf5340_cpuapp -- -DOVERLAY_CONFIG=debug_overlay.conf +west build -b nrf5340dk/nrf5340/cpuapp -- -DOVERLAY_CONFIG=debug_overlay.conf ``` ### 2a. Using zephyr network core image @@ -88,12 +88,12 @@ CONFIG_MAIN_STACK_SIZE=4096 ``` then the network core image can be compiled and flashed ```sh -west build -b nrf5340dk_nrf5340_cpunet -- -DCONF_FILE=nrf5340_cpunet_iso-bt_ll_sw_split.conf +west build -b nrf5340dk/nrf5340/cpunet -- -DCONF_FILE=nrf5340_cpunet_iso-bt_ll_sw_split.conf west flash ``` or with debugging ```sh -west build -b nrf5340dk_nrf5340_cpunet -- -DCONF_FILE=nrf5340_cpunet_iso-bt_ll_sw_split.conf -DOVERLAY_CONFIG=debug_overlay.conf +west build -b nrf5340dk/nrf5340/cpunet -- -DCONF_FILE=nrf5340_cpunet_iso-bt_ll_sw_split.conf -DOVERLAY_CONFIG=debug_overlay.conf west flash ``` diff --git a/port/zephyr/prj.conf b/port/zephyr/prj.conf index dba43b835..a5156a65b 100644 --- a/port/zephyr/prj.conf +++ b/port/zephyr/prj.conf @@ -33,7 +33,7 @@ CONFIG_BT_BUF_CMD_TX_SIZE=255 CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=255 CONFIG_BT_CTLR_ASSERT_HANDLER=y CONFIG_BT_MAX_CONN=16 -CONFIG_BT_TINYCRYPT_ECC=n +#CONFIG_BT_TINYCRYPT_ECC=n #CONFIG_BT_CTLR_DTM_HCI=y CONFIG_BT_CTLR_PRIVACY=n @@ -56,4 +56,4 @@ CONFIG_ISR_STACK_SIZE=1024 # Workaround: Unable to allocate command buffer when using K_NO_WAIT since # Host number of completed commands does not follow normal flow control. -CONFIG_BT_BUF_CMD_TX_COUNT=10 +#CONFIG_BT_BUF_CMD_TX_COUNT=10 diff --git a/port/zephyr/src/main.c b/port/zephyr/src/main.c index 6905849a4..220a528a1 100644 --- a/port/zephyr/src/main.c +++ b/port/zephyr/src/main.c @@ -191,11 +191,11 @@ static void btstack_run_loop_zephyr_execute(void) { k_timeout_t timeout; timeout.ticks = btstack_run_loop_base_get_time_until_timeout(now); if (timeout.ticks < 0){ - timeout.ticks = K_TICKS_FOREVER; + timeout = K_FOREVER; } // process RX fifo only - struct net_buf *buf = net_buf_get(&rx_queue, timeout); + struct net_buf *buf = k_fifo_get(&rx_queue, timeout); if (buf){ transport_deliver_controller_packet(buf); }