Skip to content

Commit 2fbc154

Browse files
authored
Merge pull request #10860 from tannewt/follow_zephyr_main
Start tracking zephyr/main
2 parents 8fb29d9 + 00ce600 commit 2fbc154

15 files changed

+95
-68
lines changed

ports/zephyr-cp/boards/adafruit_feather_nrf52840_uf2.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ CONFIG_BT_OBSERVER=y
66
CONFIG_BT_EXT_ADV=y
77

88
CONFIG_BOARD_SERIAL_BACKEND_CDC_ACM=n
9-
CONFIG_BOARD_REQUIRES_SERIAL_BACKEND_CDC_ACM=n
Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,46 @@
1-
set(pca10056_BOARD_ALIAS nrf52840dk/nrf52840)
2-
set(adafruit_feather_nrf52840_zephyr_BOARD_ALIAS adafruit_feather_nrf52840/nrf52840/uf2)
3-
set(renesas_ek_ra6m5_BOARD_ALIAS ek_ra6m5)
4-
set(renesas_ek_ra8d1_BOARD_ALIAS ek_ra8d1)
5-
set(renesas_da14695_dk_usb_BOARD_ALIAS da14695_dk_usb)
6-
set(native_native_sim_BOARD_ALIAS native_sim)
7-
set(native_nrf5340bsim_BOARD_ALIAS nrf5340bsim/nrf5340/cpuapp)
8-
set(nordic_nrf54l15dk_BOARD_ALIAS nrf54l15dk/nrf54l15/cpuapp)
9-
set(nordic_nrf54h20dk_BOARD_ALIAS nrf54h20dk/nrf54h20/cpuapp)
10-
set(nordic_nrf5340dk_BOARD_ALIAS nrf5340dk/nrf5340/cpuapp)
11-
set(nordic_nrf7002dk_BOARD_ALIAS nrf7002dk/nrf5340/cpuapp)
12-
set(nxp_frdm_mcxn947_BOARD_ALIAS frdm_mcxn947/mcxn947/cpu0)
13-
set(nxp_frdm_rw612_BOARD_ALIAS frdm_rw612)
14-
set(nxp_mimxrt1170_evk_BOARD_ALIAS mimxrt1170_evk@A/mimxrt1176/cm7)
15-
set(st_stm32h7b3i_dk_BOARD_ALIAS stm32h7b3i_dk)
16-
set(st_stm32wba65i_dk1_BOARD_ALIAS stm32wba65i_dk1)
17-
set(st_nucleo_u575zi_q_BOARD_ALIAS nucleo_u575zi_q/stm32u575xx)
18-
set(st_nucleo_n657x0_q_BOARD_ALIAS nucleo_n657x0_q/stm32n657xx)
1+
# Workaround for Zephyr alias handling with BOARD_QUALIFIERS in newer Zephyr.
2+
#
3+
# Instead of using <alias>_BOARD_ALIAS variables, translate BOARD directly so
4+
# we don't end up with a spurious trailing '/' in BOARD_QUALIFIERS.
5+
macro(cp_board_alias alias target)
6+
if(BOARD STREQUAL "${alias}")
7+
if(NOT "${target}" MATCHES "^([^@/]+)(@[^@/]+)?(/([^@]+))?$")
8+
message(FATAL_ERROR "Invalid alias target '${target}'")
9+
endif()
10+
11+
set(BOARD_ALIAS "${alias}" CACHE STRING "Board alias, provided by user")
12+
set(BOARD "${CMAKE_MATCH_1}")
13+
14+
if(CMAKE_MATCH_2)
15+
string(REPLACE "@" "" _rev "${CMAKE_MATCH_2}")
16+
set(BOARD_REVISION "${_rev}")
17+
else()
18+
unset(BOARD_REVISION)
19+
endif()
20+
21+
if(CMAKE_MATCH_4)
22+
set(BOARD_QUALIFIERS "${CMAKE_MATCH_4}")
23+
else()
24+
unset(BOARD_QUALIFIERS)
25+
endif()
26+
endif()
27+
endmacro()
28+
29+
cp_board_alias(pca10056 nrf52840dk/nrf52840)
30+
cp_board_alias(adafruit_feather_nrf52840_zephyr adafruit_feather_nrf52840/nrf52840/uf2)
31+
cp_board_alias(renesas_ek_ra6m5 ek_ra6m5)
32+
cp_board_alias(renesas_ek_ra8d1 ek_ra8d1)
33+
cp_board_alias(renesas_da14695_dk_usb da14695_dk_usb)
34+
cp_board_alias(native_native_sim native_sim/native)
35+
cp_board_alias(native_nrf5340bsim nrf5340bsim/nrf5340/cpuapp)
36+
cp_board_alias(nordic_nrf54l15dk nrf54l15dk/nrf54l15/cpuapp)
37+
cp_board_alias(nordic_nrf54h20dk nrf54h20dk/nrf54h20/cpuapp)
38+
cp_board_alias(nordic_nrf5340dk nrf5340dk/nrf5340/cpuapp)
39+
cp_board_alias(nordic_nrf7002dk nrf7002dk/nrf5340/cpuapp)
40+
cp_board_alias(nxp_frdm_mcxn947 frdm_mcxn947/mcxn947/cpu0)
41+
cp_board_alias(nxp_frdm_rw612 frdm_rw612)
42+
cp_board_alias(nxp_mimxrt1170_evk mimxrt1170_evk@A/mimxrt1176/cm7)
43+
cp_board_alias(st_stm32h7b3i_dk stm32h7b3i_dk)
44+
cp_board_alias(st_stm32wba65i_dk1 stm32wba65i_dk1)
45+
cp_board_alias(st_nucleo_u575zi_q nucleo_u575zi_q/stm32u575xx)
46+
cp_board_alias(st_nucleo_n657x0_q nucleo_n657x0_q/stm32n657xx)

ports/zephyr-cp/boards/frdm_rw612.conf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ CONFIG_NETWORKING=y
22
CONFIG_NET_IPV4=y
33
CONFIG_NET_DHCPV4=y
44
CONFIG_NET_SOCKETS=y
5-
CONFIG_NET_SOCKETS_POSIX_NAMES=y
65

76
CONFIG_WIFI=y
87
CONFIG_NET_L2_WIFI_MGMT=y
@@ -17,9 +16,9 @@ CONFIG_MBEDTLS=y
1716
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
1817
CONFIG_MBEDTLS_RSA_C=y
1918
CONFIG_MBEDTLS_PKCS1_V15=y
20-
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_ENABLED=y
19+
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED=y
2120
CONFIG_MBEDTLS_ENTROPY_C=y
22-
CONFIG_MBEDTLS_CTR_DRBG_ENABLED=y
21+
CONFIG_MBEDTLS_CTR_DRBG_C=y
2322
CONFIG_MBEDTLS_SHA1=y
2423
CONFIG_MBEDTLS_USE_PSA_CRYPTO=n
2524

ports/zephyr-cp/boards/frdm_rw612.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
&w25q512jvfiq {
22
partitions {
3-
/delete-node/ storage_partition;
3+
/delete-node/ partition@620000;
44
circuitpy_partition: partition@620000 {
55
label = "circuitpy";
66
reg = <0x00620000 (DT_SIZE_M(58) - DT_SIZE_K(128))>;

ports/zephyr-cp/boards/mimxrt1170_evk_mimxrt1176_cm7.overlay

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
&is25wp128 {
2-
partitions{
3-
/delete-node/ storage_partition;
4-
circuitpy_partition: partition@E20000 {
5-
label = "circuitpy";
6-
reg = <0x00E20000 (DT_SIZE_M(2) - DT_SIZE_K(128))>;
7-
};
2+
partitions {
3+
/delete-node/ partition@e20000;
4+
circuitpy_partition: partition@e20000 {
5+
label = "circuitpy";
6+
reg = <0x00e20000 (DT_SIZE_M(2) - DT_SIZE_K(128))>;
7+
};
88
};
99
};
1010

ports/zephyr-cp/boards/nrf5340bsim_nrf5340_cpuapp.conf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ CONFIG_GPIO=y
66
# Enable Bluetooth stack - bsim is for BT simulation
77
CONFIG_BT=y
88
CONFIG_BT_HCI=y
9-
CONFIG_BT_HCI_IPC=y
109
CONFIG_BT_OBSERVER=y
1110
CONFIG_BT_BROADCASTER=y
1211

1312
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
1413
CONFIG_BT_DEVICE_NAME_MAX=28
1514

16-
# So we can test safe mode
17-
CONFIG_NATIVE_SIM_REBOOT=y
18-
1915
# Ensure the network core image starts when using native simulator
2016
CONFIG_NATIVE_SIMULATOR_AUTOSTART_MCU=y
2117

ports/zephyr-cp/boards/nxp/frdm_rw612/autogen_board_info.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is autogenerated when a board is built. Do not edit. Do commit it to git. Other scripts use its info.
2-
name = "NXP Semiconductors FRDM_RW612"
2+
name = "NXP Semiconductors FRDM-RW612"
33

44
[modules]
55
__future__ = true

ports/zephyr-cp/boards/nxp/mimxrt1170_evk/autogen_board_info.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is autogenerated when a board is built. Do not edit. Do commit it to git. Other scripts use its info.
2-
name = "NXP Semiconductors MIMXRT1170-EVK/EVKB"
2+
name = "NXP Semiconductors MIMXRT1170-EVK"
33

44
[modules]
55
__future__ = true

ports/zephyr-cp/boards/stm32wba65i_dk1.overlay

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,13 @@
4747
};
4848

4949
zephyr_udc0: &usbotg_hs {
50-
clocks = <&rcc STM32_CLOCK(AHB2, 14)>,
51-
<&rcc STM32_SRC_HSE OTGHS_SEL(0)>;
52-
pinctrl-0 = <&usb_otg_hs_dm_pd7 &usb_otg_hs_dp_pd6>;
53-
pinctrl-names = "default";
5450
status = "okay";
5551
};
5652

5753
&otghs_phy {
5854
/* OTG HS clock source is 32 MHz HSE */
55+
clocks = <&rcc STM32_CLOCK(AHB2, 15)>,
56+
<&rcc STM32_SRC_HSE OTGHS_SEL(0)>;
5957
clock-reference = "SYSCFG_OTG_HS_PHY_CLK_32MHz";
6058
status = "okay";
6159
};

ports/zephyr-cp/cptools/zephyr2cp.py

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,19 @@
9696
"D12",
9797
"D13",
9898
],
99+
"nordic,expansion-board-header": [
100+
"P1_04",
101+
"P1_05",
102+
"P1_06",
103+
"P1_07",
104+
"P1_08",
105+
"P1_09",
106+
"P1_10",
107+
"P1_11",
108+
"P1_12",
109+
"P1_13",
110+
"P1_14",
111+
],
99112
"arducam,dvp-20pin-connector": [
100113
"SCL",
101114
"SDA",
@@ -544,16 +557,26 @@ def zephyr_dts_to_cp_board(board_id, portdir, builddir, zephyrbuilddir): # noqa
544557
all_ioports.append(node.labels[0])
545558
if status == "okay":
546559
ioports[node.labels[0]] = set(range(0, ngpios))
547-
if gpio_map and compatible[0] != "gpio-nexus":
548-
i = 0
549-
for offset, t, label in gpio_map._markers:
550-
if not label:
551-
continue
552-
num = int.from_bytes(gpio_map.value[offset + 4 : offset + 8], "big")
553-
if (label, num) not in board_names:
554-
board_names[(label, num)] = []
555-
board_names[(label, num)].append(CONNECTORS[compatible[0]][i])
556-
i += 1
560+
if gpio_map and compatible and compatible[0] != "gpio-nexus":
561+
connector_pins = CONNECTORS.get(compatible[0], None)
562+
if connector_pins is None:
563+
logger.warning(f"Unsupported connector mapping compatible: {compatible[0]}")
564+
else:
565+
i = 0
566+
for offset, t, label in gpio_map._markers:
567+
if not label:
568+
continue
569+
if i >= len(connector_pins):
570+
logger.warning(
571+
f"Connector mapping for {compatible[0]} has more pins than names; "
572+
f"stopping at {len(connector_pins)}"
573+
)
574+
break
575+
num = int.from_bytes(gpio_map.value[offset + 4 : offset + 8], "big")
576+
if (label, num) not in board_names:
577+
board_names[(label, num)] = []
578+
board_names[(label, num)].append(connector_pins[i])
579+
i += 1
557580
if "gpio-leds" in compatible:
558581
for led in node.nodes:
559582
led = node.nodes[led]

0 commit comments

Comments
 (0)