1
0
mirror of https://github.com/bluekitchen/btstack.git synced 2025-03-25 16:43:28 +00:00

port/zephyr: updated to latest zephyr

This commit is contained in:
Dirk Helbig 2025-02-28 12:17:37 +01:00
parent 76f06a045a
commit a189084708
3 changed files with 12 additions and 12 deletions

@ -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
```

@ -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

@ -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);
}