-
Notifications
You must be signed in to change notification settings - Fork 2.1k
RP2350: Add RISCV, Unify RP2350, Update UART, Add XH3IRQ Interrupt Controller #21753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AnnsAnns
wants to merge
18
commits into
RIOT-OS:master
Choose a base branch
from
AnnsAnns:rp2350_common_the_third_and_final
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1c64ce1
boards/rpi-pico-2-riscv: add riscv based rp2350 board
AnnsAnns 5c953d9
cpu/rp2350_riscv: add initial support
AnnsAnns 4e3fc7e
cpu/riscv_common: Add periph xh3irq support
AnnsAnns 9a1fce2
cpu/rp2350_riscv: add xh3irq support
AnnsAnns c5dd279
cpu/rp2350: move to new uart
AnnsAnns 58a46cb
cpu/rp2350_common: create shared folder for RISCV & ARM
AnnsAnns e475534
cpu/rp2350_riscv: move to shared rp2350_common
AnnsAnns b048fd7
boards/rpi-pico-2: adjust to new rp2350_arm name
AnnsAnns b6da093
boards/rpi-pico-2: rename arm pico 2 version to rpi-pico-2-arm
AnnsAnns ad79ea5
cpu/rp2350_common: change register calculation functions to pointers
AnnsAnns 9830fc7
boards/rpi-pico-2: unify doc.md into one singular doc.md
AnnsAnns b00cf0a
pkg/picosdk: Add patch for bit overlap
AnnsAnns f63178f
boards/rpi-pico-2-*: create common board folder
AnnsAnns 9447293
cpu/rp2350: increase stack size
AnnsAnns 5286de1
cpu/rp2350: provide pmp
AnnsAnns 7faffd3
DELETEME
AnnsAnns 19da065
fixup! cpu/rp2350_common: create shared folder for RISCV & ARM
AnnsAnns 0994658
fixup! cpu/rp2350_riscv: add initial support
AnnsAnns File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
# SORT THIS ALPHABETICALLY BY COMMON BOARD NAME! | ||
ifneq (,$(filter boards_common_rpi_pico_2,$(USEMODULE))) | ||
include $(RIOTBOARD)/common/rpi-pico-2/Makefile.features | ||
endif | ||
ifneq (,$(filter boards_common_seeedstudio-xiao-nrf52840,$(USEMODULE))) | ||
include $(RIOTBOARD)/common/seeedstudio-xiao-nrf52840/Makefile.features | ||
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
MODULE = boards_common_rpi_pico_2 | ||
|
||
include $(RIOTBASE)/Makefile.base |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# add the common header files to the include path | ||
INCLUDES += -I$(RIOTBOARD)/common/rpi-pico-2/include |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
#pragma once | ||
|
||
/** | ||
* @ingroup boards_rpi_pico_2 | ||
* @ingroup boards_rpi_pico_2_arm | ||
* @{ | ||
* | ||
* @file | ||
|
@@ -16,11 +16,10 @@ | |
* @author Tom Hert <[email protected]> | ||
*/ | ||
|
||
#include "RP2350.h" | ||
#include "cpu.h" | ||
#include "cpu_conf.h" | ||
#include "periph_conf.h" | ||
#include "periph_cpu.h" | ||
|
||
#include "periph/gpio.h" | ||
|
||
/** GPIO Pin ID for the onboard LED */ | ||
#define LED0_PIN_ID 25u | ||
|
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2025 Tom Hert <[email protected]> | ||
* SPDX-FileCopyrightText: 2025 HAW Hamburg | ||
* SPDX-License-Identifier: LGPL-2.1-only | ||
*/ | ||
|
||
#pragma once | ||
|
||
/** | ||
* @ingroup boards_rpi_pico_2_arm | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board periph definitions for the Raspberry Pi Pico 2 | ||
* | ||
* @author Tom Hert <[email protected]> | ||
*/ | ||
|
||
#include <stdint.h> | ||
|
||
#include "RP2350.h" | ||
#include "periph_cpu.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Configuration details for an UART interface | ||
*/ | ||
typedef struct { | ||
UART0_Type *dev; /**< Base address of the I/O registers of the device */ | ||
gpio_t rx_pin; /**< GPIO pin to use for RX */ | ||
gpio_t tx_pin; /**< GPIO pin to use for TX */ | ||
IRQn_Type irqn; /**< IRQ number of the UART interface */ | ||
} uart_conf_t; | ||
|
||
static const uart_conf_t uart_config[] = { | ||
{ | ||
.dev = UART0, | ||
.rx_pin = GPIO_PIN(0, 1), | ||
.tx_pin = GPIO_PIN(0, 0), | ||
.irqn = UART0_IRQ_IRQn | ||
}, | ||
{ | ||
.dev = UART1, | ||
.rx_pin = GPIO_PIN(0, 9), | ||
.tx_pin = GPIO_PIN(0, 8), | ||
.irqn = UART1_IRQ_IRQn | ||
} | ||
}; | ||
|
||
#define UART_0_ISR (isr_uart0) | ||
#define UART_1_ISR (isr_uart1) | ||
|
||
#define UART_NUMOF ARRAY_SIZE(uart_config) | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
/** @} */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
USEMODULE += boards_common_rpi_pico_2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CPU := rp2350_arm |
2 changes: 1 addition & 1 deletion
2
boards/rpi-pico-2/Makefile.include → boards/rpi-pico-2-arm/Makefile.include
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CPU_MODEL := RP2350 | ||
CPU_MODEL := RP2350_ARM | ||
PORT_LINUX ?= /dev/ttyACM0 | ||
|
||
# JLink isnt tested yet on RP2350 | ||
|
5 changes: 4 additions & 1 deletion
5
boards/rpi-pico-2/dist/openocd.cfg → boards/rpi-pico-2-arm/dist/openocd.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
echo "Make sure to use the Raspberry Pi OpenOCD version!" | ||
echo "For further details see Appendix A Building OpenOCD:" | ||
echo "https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf" | ||
source [find target/rp2350.cfg] | ||
set USE_CORE 0 | ||
set USE_CORE SMP | ||
set RESCUE 1 | ||
$_TARGETNAME_0 configure -rtos auto | ||
adapter speed 5000 | ||
rp2350.dap.core1 cortex_m reset_config sysresetreq | ||
rp2350.dap.core0 cortex_m reset_config sysresetreq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@defgroup boards_rpi_pico_2_arm Raspberry Pi Pico 2 | ||
@ingroup boards | ||
@brief Support for the RP2350 based Raspberry Pi Pico board | ||
|
||
See @ref boards_rpi_pico_2_riscv for further information. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# SPDX-FileCopyrightText: 2025 Tom Hert <[email protected]> | ||
# SPDX-FileCopyrightText: 2025 HAW Hamburg | ||
# SPDX-License-Identifier: LGPL-2.1-only | ||
|
||
config BOARD | ||
default "rpi-pico-2-riscv" if BOARD_RPI_PICO_2_RISCV | ||
|
||
config BOARD_RPI_PICO_2_RISV | ||
bool | ||
default y | ||
select CPU_MODEL_RP2350_RISCV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
MODULE = board | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
USEMODULE += boards_common_rpi_pico_2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CPU := rp2350_riscv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CPU_MODEL := RP2350_RISCV | ||
PORT_LINUX ?= /dev/ttyACM0 | ||
|
||
# JLink isnt tested yet on RP2350 | ||
# ifeq ($(PROGRAMMER),jlink) | ||
# JLINK_DEVICE = RP2350_M33_0 | ||
# endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
echo "Make sure to use the Raspberry Pi OpenOCD version!" | ||
AnnsAnns marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo "For further details see Appendix A Building OpenOCD:" | ||
echo "https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf" | ||
source [find target/rp2350-riscv.cfg] | ||
set USE_CORE SMP | ||
set RESCUE 1 | ||
$_TARGETNAME_0 configure -rtos auto | ||
adapter speed 5000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
DIRS = periph | ||
DIRS += periph | ||
crasbe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
include $(RIOTBASE)/Makefile.base |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.