Skip to content

Commit a5c33fd

Browse files
jlbwoodskartben
authored andcommitted
boards: raspberrypi: rpi_pico: Add MCUboot variants
Add MCUboot variants to RPI Pico / Pico W and SysBuild parititions: - rpi_pico/rp2040/mcuboot - rpi_pico/rp2040/w/mcuboot Add MCUboot variants to RPI Pico 2 / Pico 2 W and SysBuild partitions: - rpi_pico2/rp2350a/m33/mcuboot - rpi_pico2/rp2350a/w/m33/mcuboot Signed-off-by: John Lin <[email protected]>
1 parent 36f78b5 commit a5c33fd

16 files changed

+293
-8
lines changed

boards/raspberrypi/rpi_pico/board.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ board:
33
full_name: Raspberry Pi Pico
44
vendor: raspberrypi
55
socs:
6-
- name: rp2040
7-
variants:
8-
- name: w
6+
- name: rp2040
7+
variants:
8+
- name: w
9+
variants:
10+
- name: mcuboot
11+
- name: mcuboot
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include "rpi_pico.dts"
2+
3+
/delete-node/ &code_partition;
4+
#include <raspberrypi/partitions_2M_sysbuild.dtsi>
5+
/ {
6+
chosen {
7+
zephyr,code-partition = &slot0_partition;
8+
};
9+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
identifier: rpi_pico/rp2040/mcuboot
2+
name: Raspberry Pi Pico - MCUboot
3+
type: mcu
4+
arch: arm
5+
flash: 2048
6+
ram: 264
7+
toolchain:
8+
- zephyr
9+
- gnuarmemb
10+
supported:
11+
- uart
12+
- gpio
13+
- adc
14+
- i2c
15+
- spi
16+
- hwinfo
17+
- watchdog
18+
- pwm
19+
- flash
20+
- dma
21+
- counter
22+
- clock
23+
- usbd
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CONFIG_SERIAL=y
2+
CONFIG_CONSOLE=y
3+
CONFIG_UART_CONSOLE=y
4+
CONFIG_GPIO=y
5+
CONFIG_USE_DT_CODE_PARTITION=y
6+
CONFIG_BUILD_OUTPUT_UF2=y
7+
CONFIG_BUILD_OUTPUT_HEX=y
8+
CONFIG_UART_INTERRUPT_DRIVEN=y
9+
CONFIG_RESET=y
10+
CONFIG_CLOCK_CONTROL=y
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include "rpi_pico_rp2040_w.dts"
2+
3+
/delete-node/ &code_partition;
4+
#include <raspberrypi/partitions_2M_sysbuild.dtsi>
5+
/ {
6+
chosen {
7+
zephyr,code-partition = &slot0_partition;
8+
};
9+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
identifier: rpi_pico/rp2040/w/mcuboot
2+
name: Raspberry Pi Pico W - MCUboot
3+
type: mcu
4+
arch: arm
5+
flash: 2048
6+
ram: 264
7+
toolchain:
8+
- zephyr
9+
- gnuarmemb
10+
supported:
11+
- uart
12+
- gpio
13+
- adc
14+
- i2c
15+
- spi
16+
- hwinfo
17+
- watchdog
18+
- pwm
19+
- flash
20+
- dma
21+
- pio
22+
- counter
23+
- clock
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CONFIG_SERIAL=y
2+
CONFIG_CONSOLE=y
3+
CONFIG_UART_CONSOLE=y
4+
CONFIG_GPIO=y
5+
CONFIG_USE_DT_CODE_PARTITION=y
6+
CONFIG_BUILD_OUTPUT_UF2=y
7+
CONFIG_BUILD_OUTPUT_HEX=y
8+
CONFIG_UART_INTERRUPT_DRIVEN=y
9+
CONFIG_RESET=y
10+
CONFIG_CLOCK_CONTROL=y

boards/raspberrypi/rpi_pico2/Kconfig.rpi_pico2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
config BOARD_RPI_PICO2
6-
select SOC_RP2350A_M33 if BOARD_RPI_PICO2_RP2350A_M33 || BOARD_RPI_PICO2_RP2350A_M33_W
6+
select SOC_RP2350A_M33 if BOARD_RPI_PICO2_RP2350A_M33 || BOARD_RPI_PICO2_RP2350A_M33_W || BOARD_RPI_PICO2_RP2350A_M33_MCUBOOT || BOARD_RPI_PICO2_RP2350A_M33_W_MCUBOOT

boards/raspberrypi/rpi_pico2/board.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ board:
33
full_name: Raspberry Pi Pico 2
44
vendor: raspberrypi
55
socs:
6-
- name: rp2350a
7-
variants:
8-
- name: w
9-
cpucluster: m33
6+
- name: rp2350a
7+
variants:
8+
- name: w
9+
cpucluster: m33
10+
variants:
11+
- name: mcuboot
12+
cpucluster: m33
13+
- name: mcuboot
14+
cpucluster: m33
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2024 Andrew Featherstone
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
/* The build system assumes that there's a cpucluster-specific file.
10+
*
11+
* This file provides composition of the device tree:
12+
* 1. The common features of the SoC
13+
* 2. Core-specific configuration.
14+
* 3. Board-specific configuration.
15+
*/
16+
#include <raspberrypi/rpi_pico/rp2350a.dtsi>
17+
#include <raspberrypi/rpi_pico/m33.dtsi>
18+
19+
/* there's nothing specific to the Cortex-M33 cores vs the (not yet
20+
* implemented) Hazard3 cores.
21+
*/
22+
#include "rpi_pico2.dtsi"
23+
24+
/* Partitioning for the RP2350A-M33 board using 4M flash.
25+
*/
26+
#include <raspberrypi/partitions_4M_sysbuild.dtsi>
27+
/ {
28+
chosen {
29+
zephyr,code-partition = &slot0_partition;
30+
};
31+
};

0 commit comments

Comments
 (0)