Skip to content
Open
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
6 changes: 6 additions & 0 deletions locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,7 @@ msgstr ""

#: ports/espressif/common-hal/_bleio/Characteristic.c
#: ports/nordic/common-hal/_bleio/Characteristic.c
#: ports/zephyr-cp/common-hal/_bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""

Expand All @@ -1222,11 +1223,13 @@ msgstr ""

#: ports/espressif/common-hal/_bleio/PacketBuffer.c
#: ports/nordic/common-hal/_bleio/PacketBuffer.c
#: ports/zephyr-cp/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
msgstr ""

#: ports/espressif/common-hal/_bleio/PacketBuffer.c
#: ports/nordic/common-hal/_bleio/PacketBuffer.c
#: ports/zephyr-cp/common-hal/_bleio/PacketBuffer.c
msgid "Total data to write is larger than %q"
msgstr ""

Expand All @@ -1241,6 +1244,9 @@ msgstr ""

#: ports/espressif/common-hal/_bleio/__init__.c
#: ports/nordic/common-hal/_bleio/__init__.c
#: ports/zephyr-cp/common-hal/_bleio/Characteristic.c
#: ports/zephyr-cp/common-hal/_bleio/Connection.c
#: ports/zephyr-cp/common-hal/_bleio/Descriptor.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
msgid "Not connected"
msgstr ""
Expand Down
6 changes: 6 additions & 0 deletions ports/zephyr-cp/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,9 @@ config BT_BUF_ACL_RX_COUNT_EXTRA

config BT_BUF_ACL_RX_SIZE
default 255

config BT_GATT_DYNAMIC_DB
default y

config BT_GATT_CLIENT
default y
1 change: 1 addition & 0 deletions ports/zephyr-cp/boards/board_aliases.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ cp_board_alias(renesas_ek_ra8d1 ek_ra8d1)
cp_board_alias(renesas_da14695_dk_usb da14695_dk_usb)
cp_board_alias(native_native_sim native_sim/native)
cp_board_alias(native_nrf5340bsim nrf5340bsim/nrf5340/cpuapp)
cp_board_alias(native_nrf54lm20bsim nrf54lm20bsim/nrf54lm20a/cpuapp)
cp_board_alias(nordic_nrf54l15dk nrf54l15dk/nrf54l15/cpuapp)
cp_board_alias(nordic_nrf54l15tag nrf54l15tag/nrf54l15/cpuapp)
cp_board_alias(nordic_nrf54lm20dk nrf54lm20dk/nrf54lm20a/cpuapp)
Expand Down
8 changes: 8 additions & 0 deletions ports/zephyr-cp/boards/da14695_dk_usb.overlay
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/* Remove slot1 (OTA), expand slot0 to use the space.
* CircuitPython doesn't use OTA updates. */
&slot0_partition {
reg = <0x00010000 DT_SIZE_K(1024)>;
};

/delete-node/ &slot1_partition;

&flash0 {
partitions{
circuitpy_partition: partition@118000 {
Expand Down
2 changes: 1 addition & 1 deletion ports/zephyr-cp/boards/frdm_rw612.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CONFIG_MBEDTLS_CIPHERSUITE_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256=y
CONFIG_MBEDTLS_ENTROPY_C=y
CONFIG_MBEDTLS_CTR_DRBG_C=y

# Override bt.conf default
# Override Kconfig default (3)
CONFIG_BT_BUF_ACL_TX_COUNT=8

CONFIG_UDC_WORKQUEUE_STACK_SIZE=1024
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CIRCUITPY_BUILD_EXTENSIONS = ["elf", "exe"]
CIRCUITPY_BUILD_EXTENSIONS = ["exe"]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CIRCUITPY_BUILD_EXTENSIONS = ["elf"]
CIRCUITPY_BUILD_EXTENSIONS = ["exe"]
123 changes: 123 additions & 0 deletions ports/zephyr-cp/boards/native/nrf54lm20bsim/autogen_board_info.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# This file is autogenerated when a board is built. Do not edit. Do commit it to git. Other scripts use its info.
name = "POSIX/Native Boards nRF54LM20 simulated boards (BabbleSim)"

[modules]
__future__ = true
_bleio = true # Zephyr board has _bleio
_eve = false
_pew = false
_pixelmap = false
_stage = false
adafruit_bus_device = true
adafruit_pixelbuf = false
aesio = true
alarm = false
analogbufio = false
analogio = false
atexit = false
audiobusio = false
audiocore = false
audiodelays = false
audiofilewriter = false
audiofilters = false
audiofreeverb = false
audioi2sin = false
audioio = false
audiomixer = false
audiomp3 = false
audiopwmio = false
audiospeed = false
aurora_epaper = false
bitbangio = false
bitmapfilter = true # Zephyr board has busio
bitmaptools = true # Zephyr board has busio
bitops = false
board = false
busdisplay = true # Zephyr board has busio
busio = true # Zephyr board has busio
camera = false
canio = false
codeop = false
countio = false
digitalio = true
displayio = true # Zephyr board has busio
dotclockframebuffer = false
dualbank = false
epaperdisplay = true # Zephyr board has busio
floppyio = false
fontio = true # Zephyr board has busio
fourwire = true # Zephyr board has busio
framebufferio = true # Zephyr board has busio
frequencyio = false
getpass = true
gifio = true # Zephyr board has busio
gnss = false
hashlib = true
hostnetwork = false
i2cdisplaybus = true # Zephyr board has busio
i2cioexpander = false
i2ctarget = false
imagecapture = false
ipaddress = false
is31fl3741 = false
jpegio = true # Zephyr board has busio
keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = true
max3421e = false
mcp4822 = false
mdns = false
memorymap = false
memorymonitor = false
microcontroller = true
mipidsi = false
msgpack = true
neopixel_write = false
nvm = false
onewireio = false
os = true
paralleldisplaybus = false
ps2io = false
pulseio = false
pwmio = false
qrio = false
qspibus = false
rainbowio = true
random = true
rclcpy = false
rgbmatrix = false
rotaryio = true # Zephyr board has rotaryio
rtc = false
sdcardio = true # Zephyr board has busio
sdioio = false
sharpdisplay = true # Zephyr board has busio
socketpool = false
spitarget = false
ssl = false
storage = true
struct = true
supervisor = true
synthio = false
terminalio = true # Zephyr board has busio
tilepalettemapper = true # Zephyr board has busio
time = true
touchio = false
traceback = true
uheap = false
usb = false
usb_audio = false
usb_cdc = false
usb_hid = false
usb_host = false
usb_midi = false
usb_video = false
ustack = false
vectorio = true # Zephyr board has busio
warnings = true
watchdog = false
wifi = false
zephyr_display = false
zephyr_kernel = false
zlib = true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CIRCUITPY_BUILD_EXTENSIONS = ["exe"]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "Nordic Semiconductor nRF7002 DK"

[modules]
__future__ = true
_bleio = true # Zephyr board has _bleio
_bleio = false
_eve = false
_pew = false
_pixelmap = false
Expand Down
19 changes: 2 additions & 17 deletions ports/zephyr-cp/boards/nrf5340bsim_nrf5340_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,11 @@
CONFIG_GPIO=y

# Enable Bluetooth stack - bsim is for BT simulation
CONFIG_BT=y
CONFIG_BT_HCI=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_BROADCASTER=y

CONFIG_BT_L2CAP_TX_MTU=253
CONFIG_BT_BUF_CMD_TX_COUNT=2
CONFIG_BT_BUF_CMD_TX_SIZE=255
CONFIG_BT_HCI_VS=y
CONFIG_BT_BUF_EVT_RX_COUNT=16
CONFIG_BT_BUF_EVT_RX_SIZE=255
CONFIG_BT_BUF_ACL_TX_COUNT=3
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_BUF_ACL_RX_COUNT_EXTRA=1
CONFIG_BT_BUF_ACL_RX_SIZE=255

CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=28
# Override Kconfig default
CONFIG_BT_BUF_CMD_TX_COUNT=2

# Ensure the network core image starts when using native simulator
CONFIG_NATIVE_SIMULATOR_AUTOSTART_MCU=y
Expand Down
8 changes: 8 additions & 0 deletions ports/zephyr-cp/boards/nrf5340dk_nrf5340_cpuapp.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,12 @@ i2s_rxtx: &i2s0 {
clock-source = "ACLK";
};

/* Remove slot1 (OTA), expand slot0 to use the space.
* CircuitPython doesn't use OTA updates. */
&slot0_partition {
reg = <0x00010000 0x000E0000>;
};

/delete-node/ &slot1_partition;

#include "../app.overlay"
19 changes: 19 additions & 0 deletions ports/zephyr-cp/boards/nrf54lm20bsim_nrf54lm20a_cpuapp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Configuration for nrf54lm20bsim simulated board

CONFIG_GPIO=y

# Enable Bluetooth stack - bsim is for BT simulation
CONFIG_BT_HCI=y
CONFIG_BT_HCI_VS=y

# Match nrf54lm20dk hardware: support dynamic TX power control
CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y

# Override Kconfig default
CONFIG_BT_BUF_CMD_TX_COUNT=2

CONFIG_TRACING=y
CONFIG_TRACING_PERFETTO=y
CONFIG_TRACING_SYNC=y
CONFIG_TRACING_BACKEND_POSIX=y
CONFIG_TRACING_GPIO=y
30 changes: 30 additions & 0 deletions ports/zephyr-cp/boards/nrf54lm20bsim_nrf54lm20a_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* SPDX-License-Identifier: Apache-2.0 */

/ {
sram0: memory@20000000 {
device_type = "memory";
compatible = "zephyr,memory-region", "mmio-sram";
reg = <0x20000000 DT_SIZE_K(511)>;
zephyr,memory-region = "SRAM";
};

chosen {
zephyr,sram = &sram0;
};
};

&cpuapp_rram {
/delete-node/ partitions;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

circuitpy_partition: partition@0 {
label = "circuitpy";
reg = <0x00000000 DT_SIZE_K(512)>;
};
};
};

/* Note: bsim doesn't have USB, so we don't include app.overlay */
21 changes: 1 addition & 20 deletions ports/zephyr-cp/boards/nrf54lm20dk_nrf54lm20a_cpuapp.conf
Original file line number Diff line number Diff line change
@@ -1,20 +1 @@
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_EXT_ADV=y

CONFIG_BT_DEVICE_APPEARANCE_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=28
CONFIG_BT_L2CAP_TX_MTU=253

# BT Buffers
CONFIG_BT_BUF_CMD_TX_SIZE=255
CONFIG_BT_BUF_EVT_RX_COUNT=16
CONFIG_BT_BUF_EVT_RX_SIZE=255
CONFIG_BT_BUF_ACL_TX_COUNT=3
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_BUF_ACL_RX_COUNT_EXTRA=1
CONFIG_BT_BUF_ACL_RX_SIZE=255
CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
7 changes: 7 additions & 0 deletions ports/zephyr-cp/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
// nRF54LM20 DK has USB. Include the main app overlay for USB CDC ACM console and data.
#include "../app.overlay"

// Link application starting at 0x0 instead of slot0_partition (no mcuboot yet).
/ {
chosen {
zephyr,code-partition = &cpuapp_rram;
};
};

// Enable the external MX25R6435F 8MB QSPI flash (connected via SPIM00).
&mx25r64 {
status = "okay";
Expand Down
1 change: 1 addition & 0 deletions ports/zephyr-cp/boards/nrf7002dk_nrf5340_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
CONFIG_LOG=n
CONFIG_ASSERT=n
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_BT=n
14 changes: 14 additions & 0 deletions ports/zephyr-cp/boards/nrf7002dk_nrf5340_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* Remove slot1 (OTA), expand slot0 to use the space.
* CircuitPython doesn't use OTA updates. */
&slot0_partition {
/* Shrink mcuboot to 48KB, absorb slot1 + gap before storage */
reg = <0x0000C000 0x000EC000>;
};

&boot_partition {
reg = <0x00000000 0x0000C000>;
};

/delete-node/ &slot1_partition;

#include "../app.overlay"
18 changes: 2 additions & 16 deletions ports/zephyr-cp/boards/stm32wba65i_dk1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,6 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000
# CONFIG_BT=y
# CONFIG_BT_PERIPHERAL=y
# CONFIG_BT_CENTRAL=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_STM32WBA_USE_TEMP_BASED_CALIB=n

CONFIG_BT_DEVICE_APPEARANCE_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=28
CONFIG_BT_L2CAP_TX_MTU=253

# BT Buffers
CONFIG_BT_BUF_CMD_TX_SIZE=255
CONFIG_BT_BUF_EVT_RX_COUNT=16
CONFIG_BT_BUF_EVT_RX_SIZE=255
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_BUF_ACL_RX_COUNT_EXTRA=1
CONFIG_BT_BUF_ACL_RX_SIZE=255
# Board-specific BT calibration
CONFIG_BT_STM32WBA_USE_TEMP_BASED_CALIB=n
1 change: 0 additions & 1 deletion ports/zephyr-cp/common-hal/_bleio/Adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ static size_t bleio_parse_adv_data(const uint8_t *raw, size_t raw_len, struct bt
uint8_t data_len = field_len - 1;
if (offset + field_len + 1 > raw_len ||
count >= out_len ||
field_len < 1 ||
storage_offset + data_len > storage_len) {
mp_raise_ValueError(MP_ERROR_TEXT("Invalid advertising data"));
}
Expand Down
Loading
Loading