Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@
&flash0 {
partitions {
code_partition: partition@26000 {
compatible = "zephyr,mapped-partition";
label = "Application";
reg = <0x00026000 0x000c4000>;
};

storage_partition: partition@ea000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0x000ea000 0x00008000>;
};

nvm_partition: partition@f2000 {
compatible = "zephyr,mapped-partition";
label = "nvm";
reg = <0x000f2000 0x00002000>;
};
Expand Down
3 changes: 3 additions & 0 deletions ports/zephyr-cp/boards/adafruit_feather_nrf52840_uf2.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@
&flash0 {
partitions {
code_partition: partition@26000 {
compatible = "zephyr,mapped-partition";
label = "Application";
reg = <0x00026000 0x000c4000>;
};

storage_partition: partition@ea000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0x000ea000 0x00008000>;
};

nvm_partition: partition@f2000 {
compatible = "zephyr,mapped-partition";
label = "nvm";
reg = <0x000f2000 0x00002000>;
};
Expand Down
5 changes: 4 additions & 1 deletion ports/zephyr-cp/boards/adafruit_feather_rp2040.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@
/delete-node/ partitions;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

/* Reserved memory for the second stage bootloader */
second_stage_bootloader: partition@0 {
compatible = "zephyr,mapped-partition";
label = "second_stage_bootloader";
reg = <0x00000000 0x100>;
read-only;
};

code_partition: partition@100 {
compatible = "zephyr,mapped-partition";
label = "code-partition";
reg = <0x100 (0x180000 - 0x100)>;
read-only;
};

nvm_partition: partition@180000 {
compatible = "zephyr,mapped-partition";
label = "nvm";
reg = <0x180000 0x1000>;
};

circuitpy_partition: partition@181000 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x181000 (DT_SIZE_M(8) - 0x181000)>;
};
Expand Down
1 change: 1 addition & 0 deletions ports/zephyr-cp/boards/da14695_dk_usb.overlay
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
&flash0 {
partitions{
circuitpy_partition: partition@118000 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x118000 (DT_SIZE_M(4) - DT_SIZE_K(1120))>;
};
Expand Down
1 change: 1 addition & 0 deletions ports/zephyr-cp/boards/frdm_rw612.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_NET_DHCPV4=y
CONFIG_NET_SOCKETS=y

CONFIG_WIFI=y
CONFIG_WIFI_NM_WPA_SUPPLICANT_LEGACY_CRYPTO=n
CONFIG_NET_L2_WIFI_MGMT=y
CONFIG_NET_MGMT_EVENT=y
CONFIG_NET_MGMT_EVENT_INFO=y
Expand Down
1 change: 1 addition & 0 deletions ports/zephyr-cp/boards/frdm_rw612.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
partitions {
/delete-node/ partition@620000;
circuitpy_partition: partition@620000 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x00620000 (DT_SIZE_M(58) - DT_SIZE_K(128))>;
};
Expand Down
1 change: 1 addition & 0 deletions ports/zephyr-cp/boards/frdm_rw612_rw612_cpu0.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
partitions {
/delete-node/ storage_partition;
circuitpy_partition: partition@620000 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x00620000 (DT_SIZE_M(58) - DT_SIZE_K(128))>;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
partitions {
/delete-node/ partition@e20000;
circuitpy_partition: partition@e20000 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x00e20000 (DT_SIZE_M(2) - DT_SIZE_K(128))>;
};
Expand Down
3 changes: 2 additions & 1 deletion ports/zephyr-cp/boards/native_sim.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@
&flash0 {
/delete-node/ partitions;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

circuitpy_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x00000000 DT_SIZE_K(2040)>;
};

nvm_partition: partition@1fe000 {
compatible = "zephyr,mapped-partition";
label = "nvm";
reg = <0x001fe000 0x00002000>;
};
Expand Down
2 changes: 1 addition & 1 deletion ports/zephyr-cp/boards/nrf5340bsim_nrf5340_cpuapp.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
&flash0 {
/delete-node/ partitions;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

circuitpy_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x00000000 DT_SIZE_K(1024)>;
};
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
@@ -1,5 +1,6 @@
CONFIG_NETWORKING=y
CONFIG_WIFI=y
CONFIG_WIFI_NM_WPA_SUPPLICANT_LEGACY_CRYPTO=n

CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y

Expand Down
4 changes: 3 additions & 1 deletion ports/zephyr-cp/boards/rpi_pico2_rp2350a_m33.overlay
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

code_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "code-partition";
reg = <0x0 0x180000>;
read-only;
};

nvm_partition: partition@180000 {
compatible = "zephyr,mapped-partition";
label = "nvm";
reg = <0x180000 0x1000>;
};

circuitpy_partition: partition@181000 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x181000 (DT_SIZE_M(4) - 0x181000)>;
};
Expand Down
1 change: 1 addition & 0 deletions ports/zephyr-cp/boards/rpi_pico2_rp2350a_m33_w.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_NET_DHCPV4=y
CONFIG_NET_SOCKETS=y

CONFIG_WIFI=y
CONFIG_WIFI_NM_WPA_SUPPLICANT_LEGACY_CRYPTO=n
CONFIG_NET_L2_WIFI_MGMT=y
CONFIG_NET_MGMT_EVENT=y
CONFIG_NET_MGMT_EVENT_INFO=y
Expand Down
4 changes: 3 additions & 1 deletion ports/zephyr-cp/boards/rpi_pico2_rp2350a_m33_w.overlay
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

code_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "code-partition";
reg = <0x0 0x180000>;
read-only;
};

nvm_partition: partition@180000 {
compatible = "zephyr,mapped-partition";
label = "nvm";
reg = <0x180000 0x1000>;
};

circuitpy_partition: partition@181000 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x181000 (DT_SIZE_M(4) - 0x181000)>;
};
Expand Down
5 changes: 4 additions & 1 deletion ports/zephyr-cp/boards/rpi_pico_rp2040.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@
/delete-node/ partitions;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

/* Reserved memory for the second stage bootloader */
second_stage_bootloader: partition@0 {
compatible = "zephyr,mapped-partition";
label = "second_stage_bootloader";
reg = <0x00000000 0x100>;
read-only;
};

code_partition: partition@100 {
compatible = "zephyr,mapped-partition";
label = "code-partition";
reg = <0x100 (0x180000 - 0x100)>;
read-only;
};

nvm_partition: partition@180000 {
compatible = "zephyr,mapped-partition";
label = "nvm";
reg = <0x180000 0x1000>;
};

circuitpy_partition: partition@181000 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x181000 (DT_SIZE_M(2) - 0x181000)>;
};
Expand Down
1 change: 1 addition & 0 deletions ports/zephyr-cp/boards/rpi_pico_rp2040_w.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_NET_DHCPV4=y
CONFIG_NET_SOCKETS=y

CONFIG_WIFI=y
CONFIG_WIFI_NM_WPA_SUPPLICANT_LEGACY_CRYPTO=n
CONFIG_NET_L2_WIFI_MGMT=y
CONFIG_NET_MGMT_EVENT=y
CONFIG_NET_MGMT_EVENT_INFO=y
Expand Down
5 changes: 4 additions & 1 deletion ports/zephyr-cp/boards/rpi_pico_rp2040_w.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@
/delete-node/ partitions;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

/* Reserved memory for the second stage bootloader */
second_stage_bootloader: partition@0 {
compatible = "zephyr,mapped-partition";
label = "second_stage_bootloader";
reg = <0x00000000 0x100>;
read-only;
};

code_partition: partition@100 {
compatible = "zephyr,mapped-partition";
label = "code-partition";
reg = <0x100 (0x180000 - 0x100)>;
read-only;
};

nvm_partition: partition@180000 {
compatible = "zephyr,mapped-partition";
label = "nvm";
reg = <0x180000 0x1000>;
};

circuitpy_partition: partition@181000 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x181000 (DT_SIZE_M(2) - 0x181000)>;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/delete-node/ partition@7800000;

circuitpy_partition: partition@7800000 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x7800000 DT_SIZE_M(8)>;
};
Expand Down
5 changes: 4 additions & 1 deletion ports/zephyr-cp/boards/stm32wba65i_dk1.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,29 @@
/delete-node/ partitions;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>;
};

slot0_partition: partition@10000 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0x00010000 DT_SIZE_K(928)>;
};

storage_partition: partition@f80000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0x001e0000 DT_SIZE_K(64)>;
};

circuitpy_partition: partition@108000 {
compatible = "zephyr,mapped-partition";
label = "circuitpy";
reg = <0x00108000 DT_SIZE_K(992)>;
};
Expand Down
4 changes: 1 addition & 3 deletions ports/zephyr-cp/common-hal/busio/UART.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ static void serial_cb(const struct device *dev, void *user_data) {

uint8_t c;

if (!uart_irq_update(dev)) {
return;
}
uart_irq_update(dev);

if (!uart_irq_rx_ready(dev)) {
return;
Expand Down
13 changes: 2 additions & 11 deletions ports/zephyr-cp/common-hal/socketpool/Socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static bool _socketpool_socket(socketpool_socketpool_obj_t *self,
}

// Sockets should be nonblocking in most cases.
if (zsock_fcntl(socknum, F_SETFL, O_NONBLOCK) < 0) {
if (zsock_fcntl(socknum, F_SETFL, ZVFS_O_NONBLOCK) < 0) {
// Ignore if non-blocking is unsupported.
}

Expand Down Expand Up @@ -217,15 +217,6 @@ int socketpool_socket_accept(socketpool_socket_obj_t *self, mp_obj_t *peer_out,
timed_out = supervisor_ticks_ms64() - start_ticks >= self->timeout_ms;
}
RUN_BACKGROUND_TASKS;
#if CIRCUITPY_HOSTNETWORK
if (self->timeout_ms == 0) {
struct zsock_timeval tv = {
.tv_sec = 0,
.tv_usec = 1000,
};
zsock_setsockopt(self->num, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
}
#endif
newsoc = zsock_accept(self->num, (struct sockaddr *)&peer_addr, &socklen);
// In non-blocking mode, fail instead of timing out
if (newsoc == -1 && (self->timeout_ms == 0 || mp_hal_is_interrupted())) {
Expand All @@ -245,7 +236,7 @@ int socketpool_socket_accept(socketpool_socket_obj_t *self, mp_obj_t *peer_out,
}

// We got a socket. New client socket will not be non-blocking by default, so make it non-blocking.
if (zsock_fcntl(newsoc, F_SETFL, O_NONBLOCK) < 0) {
if (zsock_fcntl(newsoc, F_SETFL, ZVFS_O_NONBLOCK) < 0) {
// Ignore if non-blocking is unsupported.
}

Expand Down
2 changes: 1 addition & 1 deletion ports/zephyr-cp/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ CONFIG_DYNAMIC_THREAD_PREFER_ALLOC=y

CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_BUILTIN=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
CONFIG_PSA_CRYPTO=y
CONFIG_PSA_WANT_ALG_SHA_1=y
CONFIG_PSA_WANT_ALG_SHA_256=y
4 changes: 2 additions & 2 deletions ports/zephyr-cp/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ if(SB_CONFIG_NET_CORE_IMAGE_HCI_IPC)
BOARD ${SB_CONFIG_NET_CORE_BOARD}
)

set(${NET_APP}_CONF_FILE
${NET_APP_SRC_DIR}/nrf5340_cpunet_iso-bt_ll_sw_split.conf
set(${NET_APP}_OVERLAY_CONFIG
${NET_APP_SRC_DIR}/extra-cis-bt_ll_sw_split.conf
CACHE INTERNAL ""
)

Expand Down
3 changes: 3 additions & 0 deletions ports/zephyr-cp/sysbuild/hci_ipc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enable dynamic TX power control so that BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL
# is supported by the controller.
CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
Loading
Loading