Skip to content
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

SparkFun updates for the PSRAM draft/work #3

Open
wants to merge 88 commits into
base: feature/psram
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
5a032da
lib/pico-sdk: Update to new rp2350 version.
dpgeorge Aug 8, 2024
9a9ceeb
lib/tinyusb: Update to support RP2350.
dpgeorge Aug 8, 2024
72d47a7
shared/tinyusb: Use new persistent-tx-fifo configure interface.
dpgeorge Aug 7, 2024
eb9e471
rp2/boards: Add RPI_PICO2 board.
peterharperuk May 22, 2024
d259bed
rp2/mpconfigport: Set MCU name for RP2350.
peterharperuk May 22, 2024
c29c969
rp2: Update custom linker scripts for new pico-sdk.
peterharperuk May 22, 2024
c3a2bd2
rp2/modmachine: Implement lightsleep for RP2350.
peterharperuk May 22, 2024
e5c098e
rp2/rp2_dma: Generalise DMA for RP2350.
peterharperuk Jun 3, 2024
2931e13
rp2: Integrate RP2350.
peterharperuk May 23, 2024
8d73218
rp2/CMakeLists.txt: Add float_conv_m33 for __aeabi_ul2f.
Gadgetoid Jun 28, 2024
49f9458
py/usermod.cmake: Check target exists.
Gadgetoid Jun 28, 2024
968086d
rp2: Add support for 48-pin RP2350 variant.
Gadgetoid Jul 1, 2024
7d90cf4
rp2/rp2_pio: Support RP2350A/B in rp2_pio.
Gadgetoid Jul 2, 2024
9d1045c
rp2: Pass gpio-num into make-pins.
peterharperuk Jul 8, 2024
9de998a
rp2: Fix RP2040 build issues.
peterharperuk Jul 9, 2024
b223805
rp2/machine_pin: Allow gpios >=32 to work.
peterharperuk Jul 10, 2024
3d84f06
rp2/rp2_pio: Raise error if pio_set_gpio_base fails.
peterharperuk Jul 10, 2024
1ebf9ec
rp2/machine_pin: Fix pin irq for pins > 32.
Gadgetoid Jul 8, 2024
e952692
rp2/clocks_extra: Update runtime_clocks_init.
peterharperuk Jul 10, 2024
c7e7106
rp2/machine_adc: Add ADC support for RP2350B.
Gadgetoid Aug 5, 2024
cef1b3c
rp2: Update to support RP2350-RISCV.
dpgeorge Aug 8, 2024
dec2561
rp2/mpconfigport: Enable RV32I native emitter on RISCV variants.
dpgeorge Aug 8, 2024
b42ad62
rp2/Makefile: Allow CMAKE_ARGS to be set by user.
dpgeorge Aug 8, 2024
1d5f792
rp2/machine_bitstream: Set SysTick reset value.
sfe-SparkFro Aug 5, 2024
19251f7
rp2/machine_uart: Allow new TX/RX pins on RP2350.
sfe-SparkFro Aug 6, 2024
6b4054c
rp2/mphalport: Implement mp_hal_ticks_cpu for RISCV using mcycle.
dpgeorge Aug 8, 2024
d99bd34
rp2/machine_bitstream: Implement bitstream for RISC-V using mcycle.
dpgeorge Aug 8, 2024
b10eec3
tests/ports/rp2: Update DMA test for higher freq CPU.
dpgeorge Aug 7, 2024
8e42463
tests/ports/rp2: Add simple UART test.
dpgeorge Aug 9, 2024
d06bf71
tools/ci.sh: Add RPI_PICO2 to CI.
dpgeorge Aug 9, 2024
cedb004
ports/rp2: PSRAM support.
Gadgetoid Aug 6, 2024
fd867f8
ports/rp2: PSRAM: Fix RP2040/Pico build.
Gadgetoid Aug 9, 2024
c945805
ports/rp2: Re-init PSRAM on CPU freq change.
Gadgetoid Aug 9, 2024
2a10aa6
ports/rp2: Make split-heap optional.
Gadgetoid Aug 9, 2024
4cb9a1c
ports/rp2: Compute QMI timing based on system clock.
MichaelBell Aug 11, 2024
2f05b87
ports/rp2: Fix garbage collection with large heap.
MichaelBell Aug 11, 2024
2be1fdf
ports/rp2: Remove flash timing control from PSRAM.
MichaelBell Aug 11, 2024
40ee10e
ports/rp2: Set flash divisor appropriately.
MichaelBell Aug 11, 2024
4b7b1af
ports/rp2: Reset flash timing before PSRAM timing.
MichaelBell Aug 15, 2024
870d858
ports/rp2: Add RP2350 slices to machine_pwm.
Gadgetoid Aug 15, 2024
684cb18
adding board def files for the SparkFun ProMicro RP2350
gigapod Aug 28, 2024
4e814d1
added freq for psram, and a few comments
gigapod Aug 28, 2024
b60484a
updated PSRAM logic based on work at SparkFun; cleaned up *magic numb…
gigapod Aug 28, 2024
9969d3f
lib/pico-sdk: Update to new rp2350 version.
dpgeorge Aug 8, 2024
1f2d23c
lib/tinyusb: Update to support RP2350.
dpgeorge Aug 8, 2024
e1fa6c2
shared/tinyusb: Use new persistent-tx-fifo configure interface.
dpgeorge Aug 7, 2024
8805abb
rp2/boards: Add RPI_PICO2 board.
peterharperuk May 22, 2024
fb2f955
rp2/mpconfigport: Set MCU name for RP2350.
peterharperuk May 22, 2024
8231d6e
rp2: Update custom linker scripts for new pico-sdk.
peterharperuk May 22, 2024
e10d3b2
rp2/modmachine: Implement lightsleep for RP2350.
peterharperuk May 22, 2024
5d7c56d
rp2/rp2_dma: Generalise DMA for RP2350.
peterharperuk Jun 3, 2024
ee6805e
rp2: Integrate RP2350.
peterharperuk May 23, 2024
e14d9ca
rp2/CMakeLists.txt: Add float_conv_m33 for __aeabi_ul2f.
Gadgetoid Jun 28, 2024
cef3691
py/usermod.cmake: Check target exists.
Gadgetoid Jun 28, 2024
5f99e4c
rp2: Add support for 48-pin RP2350 variant.
Gadgetoid Jul 1, 2024
0486a4c
rp2/rp2_pio: Add support for RP2350A/B in rp2_pio.
Gadgetoid Jul 2, 2024
f168c09
rp2: Pass gpio-num into make-pins.
peterharperuk Jul 8, 2024
805af30
rp2: Fix RP2040 build issues.
peterharperuk Jul 9, 2024
e856e80
rp2/machine_pin: Allow gpios >=32 to work.
peterharperuk Jul 10, 2024
a7f92d4
rp2/machine_pin: Fix pin irq for pins > 32.
Gadgetoid Jul 8, 2024
606e8c2
rp2/clocks_extra: Update runtime_clocks_init.
peterharperuk Jul 10, 2024
141a7c1
rp2/machine_adc: Add ADC support for RP2350B.
Gadgetoid Aug 5, 2024
cc214b1
rp2: Update to support RP2350-RISCV.
dpgeorge Aug 8, 2024
c056e80
rp2/mpconfigport: Enable RV32I native emitter on RISCV variants.
dpgeorge Aug 8, 2024
1275812
rp2/Makefile: Allow CMAKE_ARGS to be set by user.
dpgeorge Aug 8, 2024
9322e27
rp2/machine_bitstream: Set SysTick reset value.
sfe-SparkFro Aug 5, 2024
00f3223
rp2/machine_uart: Allow new TX/RX pins on RP2350.
sfe-SparkFro Aug 6, 2024
2393213
rp2/mphalport: Implement mp_hal_ticks_cpu for RISCV using mcycle.
dpgeorge Aug 8, 2024
6d027de
rp2/machine_bitstream: Implement bitstream for RISC-V using mcycle.
dpgeorge Aug 8, 2024
e008dbb
tests/ports/rp2: Update DMA test for higher freq CPU.
dpgeorge Aug 7, 2024
22b2f73
tests/ports/rp2: Add simple rp2-specific UART test.
dpgeorge Aug 9, 2024
df545f4
tools/ci.sh: Add RPI_PICO2 to CI.
dpgeorge Aug 9, 2024
89b17d1
rp2: Workaround pico_aon_timer timezone binary size increase.
projectgus Aug 13, 2024
a81963c
ports/rp2: PSRAM support.
Gadgetoid Aug 6, 2024
360e6ed
ports/rp2: PSRAM: Fix RP2040/Pico build.
Gadgetoid Aug 9, 2024
3cad8bb
ports/rp2: Re-init PSRAM on CPU freq change.
Gadgetoid Aug 9, 2024
562b929
ports/rp2: Make split-heap optional.
Gadgetoid Aug 9, 2024
aee2331
ports/rp2: Compute QMI timing based on system clock.
MichaelBell Aug 11, 2024
03c5d9f
ports/rp2: Fix garbage collection with large heap.
MichaelBell Aug 11, 2024
50dee90
ports/rp2: Remove flash timing control from PSRAM.
MichaelBell Aug 11, 2024
8070c71
ports/rp2: Set flash divisor appropriately.
MichaelBell Aug 11, 2024
291ca79
ports/rp2: Reset flash timing before PSRAM timing.
MichaelBell Aug 15, 2024
51cd340
ports/rp2: Add RP2350 slices to machine_pwm.
Gadgetoid Aug 15, 2024
4010a9f
ports/rp2: Fix rp2_pio for 48-pin RP2350B.
Gadgetoid Aug 30, 2024
ed4c0d2
comment tweak
gigapod Aug 30, 2024
c399dd2
updates/results from merge with the latest on the pimoroni-feature/ps…
gigapod Aug 30, 2024
e77a787
results of merge
gigapod Aug 30, 2024
16da9bd
enable split heap - include sram with psram in heap
gigapod Sep 8, 2024
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
11 changes: 11 additions & 0 deletions docs/library/rp2.PIO.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ Constructors
Methods
-------

.. method:: PIO.gpio_base([base])

Query and optionally set the current GPIO base for this PIO instance.

If an argument is given then it must be a pin (or integer corresponding to a pin
number), restricted to either GPIO0 or GPIO16. The GPIO base will then be set to
that pin. Setting the GPIO base must be done before any programs are added or state
machines created.

Returns the current GPIO base pin.

.. method:: PIO.add_program(program)

Add the *program* to the instruction memory of this PIO instance.
Expand Down
2 changes: 1 addition & 1 deletion lib/pico-sdk
Submodule pico-sdk updated 977 files
2 changes: 1 addition & 1 deletion lib/tinyusb
Submodule tinyusb updated 170 files
110 changes: 98 additions & 12 deletions ports/rp2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ include(${MICROPY_DIR}/py/usermod.cmake)

add_executable(${MICROPY_TARGET})

# Provide a C-level definitions of PICO_ARM.
# (The pico-sdk already defines PICO_RISCV when it's enabled.)
if(PICO_ARM)
target_compile_definitions(pico_platform_headers INTERFACE
PICO_ARM=1
)
endif()

set(MICROPY_QSTRDEFS_PORT
${MICROPY_PORT_DIR}/qstrdefsport.h
)
Expand All @@ -108,7 +116,6 @@ set(MICROPY_SOURCE_LIB
${MICROPY_DIR}/shared/netutils/netutils.c
${MICROPY_DIR}/shared/netutils/trace.c
${MICROPY_DIR}/shared/readline/readline.c
${MICROPY_DIR}/shared/runtime/gchelper_thumb1.s
${MICROPY_DIR}/shared/runtime/gchelper_native.c
${MICROPY_DIR}/shared/runtime/interrupt_char.c
${MICROPY_DIR}/shared/runtime/mpirq.c
Expand All @@ -123,13 +130,24 @@ set(MICROPY_SOURCE_LIB
${MICROPY_DIR}/shared/tinyusb/mp_usbd_runtime.c
)

if(PICO_ARM)
list(APPEND MICROPY_SOURCE_LIB
${MICROPY_DIR}/shared/runtime/gchelper_thumb1.s
)
elseif(PICO_RISCV)
list(APPEND MICROPY_SOURCE_LIB
${MICROPY_DIR}/shared/runtime/gchelper_rv32i.s
)
endif()

set(MICROPY_SOURCE_DRIVERS
${MICROPY_DIR}/drivers/bus/softspi.c
${MICROPY_DIR}/drivers/dht/dht.c
)

set(MICROPY_SOURCE_PORT
clocks_extra.c
datetime_patch.c
fatfs_port.c
help.c
machine_bitstream.c
Expand All @@ -155,6 +173,12 @@ set(MICROPY_SOURCE_PORT
${CMAKE_BINARY_DIR}/pins_${MICROPY_BOARD}.c
)

if(PICO_RP2350)
list(APPEND MICROPY_SOURCE_PORT
rp2_psram.c
)
endif()

set(MICROPY_SOURCE_QSTR
${MICROPY_SOURCE_PY}
${MICROPY_DIR}/shared/readline/readline.c
Expand All @@ -178,9 +202,9 @@ set(MICROPY_SOURCE_QSTR
)

set(PICO_SDK_COMPONENTS
cmsis_core
hardware_adc
hardware_base
hardware_boot_lock
hardware_clocks
hardware_dma
hardware_flash
Expand All @@ -191,19 +215,26 @@ set(PICO_SDK_COMPONENTS
hardware_pll
hardware_pwm
hardware_regs
hardware_rtc
hardware_resets
hardware_spi
hardware_structs
hardware_sync
hardware_sync_spin_lock
hardware_timer
hardware_uart
hardware_watchdog
hardware_xosc
pico_aon_timer
pico_base_headers
pico_binary_info
pico_bootrom
pico_multicore
pico_platform
pico_platform_compiler
pico_platform_sections
pico_platform_panic
pico_runtime
pico_runtime_init
pico_stdio
pico_stdlib
pico_sync
Expand All @@ -214,6 +245,17 @@ set(PICO_SDK_COMPONENTS
tinyusb_device
)

if(PICO_ARM)
list(APPEND PICO_SDK_COMPONENTS
cmsis_core
)
elseif(PICO_RISCV)
list(APPEND PICO_SDK_COMPONENTS
hardware_hazard3
hardware_riscv
)
endif()

# Use our custom pico_float_micropython float implementation. This is needed for two reasons:
# - to fix inf handling in pico-sdk's __wrap___aeabi_fadd();
# - so we can use our own libm functions, to fix inaccuracies in the pico-sdk versions.
Expand All @@ -224,14 +266,24 @@ pico_add_library(pico_float_micropython)

# pico_float_micropython: add pico-sdk float and our libm source files.
target_sources(pico_float_micropython INTERFACE
${PICO_SDK_PATH}/src/rp2_common/pico_float/float_aeabi.S
${PICO_SDK_PATH}/src/rp2_common/pico_float/float_init_rom.c
${PICO_SDK_PATH}/src/rp2_common/pico_float/float_v1_rom_shim.S
${MICROPY_SOURCE_LIB_LIBM}
${MICROPY_SOURCE_LIB_LIBM_SQRT_SW}
${MICROPY_PORT_DIR}/libm_extra.c
)

if(PICO_RP2040)
target_sources(pico_float_micropython INTERFACE
${PICO_SDK_PATH}/src/rp2_common/pico_float/float_v1_rom_shim_rp2040.S
${PICO_SDK_PATH}/src/rp2_common/pico_float/float_aeabi_rp2040.S
${PICO_SDK_PATH}/src/rp2_common/pico_float/float_init_rom_rp2040.c
)
elseif(PICO_RP2350 AND PICO_ARM)
target_sources(pico_float_micropython INTERFACE
${PICO_SDK_PATH}/src/rp2_common/pico_float/float_aeabi_dcp.S
${PICO_SDK_PATH}/src/rp2_common/pico_float/float_conv_m33.S
)
endif()

# pico_float_micropython: wrap low-level floating-point ops, to call the pico-sdk versions.
pico_wrap_function(pico_float_micropython __aeabi_fdiv)
pico_wrap_function(pico_float_micropython __aeabi_fmul)
Expand All @@ -253,7 +305,9 @@ pico_wrap_function(pico_float_micropython __aeabi_ul2f)
pico_wrap_function(pico_float_micropython __aeabi_f2iz)
pico_wrap_function(pico_float_micropython __aeabi_f2lz)
pico_wrap_function(pico_float_micropython __aeabi_f2uiz)
pico_wrap_function(pico_float_micropython __aeabi_f2ulz)
if (PICO_RP2040)
pico_wrap_function(pico_float_micropython __aeabi_f2ulz)
endif()
pico_wrap_function(pico_float_micropython __aeabi_f2d)

if (MICROPY_PY_LWIP)
Expand Down Expand Up @@ -466,9 +520,15 @@ target_compile_options(${MICROPY_TARGET} PRIVATE
target_link_options(${MICROPY_TARGET} PRIVATE
-Wl,--defsym=__micropy_c_heap_size__=${MICROPY_C_HEAP_SIZE}
-Wl,--wrap=dcd_event_handler
-Wl,--wrap=clocks_init
-Wl,--wrap=runtime_init_clocks
)

if(PICO_RP2350)
target_link_options(${MICROPY_TARGET} PRIVATE
-Wl,--defsym=__micropy_extra_stack__=4096
)
endif()

# Apply optimisations to performance-critical source code.
set_source_files_properties(
${MICROPY_PY_DIR}/map.c
Expand All @@ -478,6 +538,12 @@ set_source_files_properties(
COMPILE_OPTIONS "-O2"
)

set_source_files_properties(
rp2_pio.c
PROPERTIES
COMPILE_OPTIONS "-Wno-error=discarded-qualifiers"
)

set_source_files_properties(
${PICO_SDK_PATH}/src/rp2_common/pico_double/double_math.c
${PICO_SDK_PATH}/src/rp2_common/pico_float/float_math.c
Expand Down Expand Up @@ -505,9 +571,14 @@ target_compile_definitions(${MICROPY_TARGET} PRIVATE
PICO_NO_PROGRAM_VERSION_STRING=1 # do it ourselves in main.c
MICROPY_BUILD_TYPE="${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION} ${CMAKE_BUILD_TYPE}"
PICO_NO_BI_STDIO_UART=1 # we call it UART REPL
PICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1
)

if (PICO_RP2040)
target_compile_definitions(${MICROPY_TARGET} PRIVATE
PICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1
)
endif()

target_link_libraries(${MICROPY_TARGET}
${PICO_SDK_COMPONENTS}
)
Expand All @@ -523,12 +594,16 @@ endif()
# a linker script modification) until we explicitly add macro calls around the function
# defs to move them into RAM.
if (PICO_ON_DEVICE AND NOT PICO_NO_FLASH AND NOT PICO_COPY_TO_RAM)
pico_set_linker_script(${MICROPY_TARGET} ${CMAKE_CURRENT_LIST_DIR}/memmap_mp.ld)
if(PICO_RP2040)
pico_set_linker_script(${MICROPY_TARGET} ${CMAKE_CURRENT_LIST_DIR}/memmap_mp_rp2040.ld)
elseif(PICO_RP2350)
pico_set_linker_script(${MICROPY_TARGET} ${CMAKE_CURRENT_LIST_DIR}/memmap_mp_rp2350.ld)
endif()
endif()

pico_add_extra_outputs(${MICROPY_TARGET})

pico_find_compiler(PICO_COMPILER_SIZE ${PICO_GCC_TRIPLE}-size)
pico_find_compiler_with_triples(PICO_COMPILER_SIZE "${PICO_GCC_TRIPLE}" size)

add_custom_command(TARGET ${MICROPY_TARGET}
POST_BUILD
Expand All @@ -542,6 +617,9 @@ foreach(comp ${PICO_SDK_COMPONENTS})
micropy_gather_target_properties(${comp}_headers)
endforeach()

set(MICROPY_CPP_FLAGS_EXTRA ${PICO_COMMON_LANG_FLAGS})
separate_arguments(MICROPY_CPP_FLAGS_EXTRA)

# Include the main MicroPython cmake rules.
include(${MICROPY_DIR}/py/mkrules.cmake)

Expand All @@ -551,6 +629,14 @@ set(GEN_PINS_MKPINS "${MICROPY_PORT_DIR}/boards/make-pins.py")
set(GEN_PINS_SRC "${CMAKE_BINARY_DIR}/pins_${MICROPY_BOARD}.c")
set(GEN_PINS_HDR "${MICROPY_GENHDR_DIR}/pins.h")

if(NOT PICO_NUM_GPIOS)
set(PICO_NUM_GPIOS 30)
endif()

if(NOT PICO_NUM_EXT_GPIOS)
set(PICO_NUM_EXT_GPIOS 10)
endif()

if(EXISTS "${MICROPY_BOARD_DIR}/pins.csv")
set(GEN_PINS_BOARD_CSV "${MICROPY_BOARD_DIR}/pins.csv")
set(GEN_PINS_CSV_ARG --board-csv "${GEN_PINS_BOARD_CSV}")
Expand All @@ -563,7 +649,7 @@ target_sources(${MICROPY_TARGET} PRIVATE
# Generate pins
add_custom_command(
OUTPUT ${GEN_PINS_HDR} ${GEN_PINS_SRC}
COMMAND ${Python3_EXECUTABLE} ${GEN_PINS_MKPINS} ${GEN_PINS_CSV_ARG} --af-csv ${GEN_PINS_AF_CSV} --prefix ${GEN_PINS_PREFIX} --output-source ${GEN_PINS_SRC} --output-header ${GEN_PINS_HDR}
COMMAND ${Python3_EXECUTABLE} ${GEN_PINS_MKPINS} ${GEN_PINS_CSV_ARG} --af-csv ${GEN_PINS_AF_CSV} --prefix ${GEN_PINS_PREFIX} --output-source ${GEN_PINS_SRC} --num-gpios ${PICO_NUM_GPIOS} --num-ext-gpios ${PICO_NUM_EXT_GPIOS} --output-header ${GEN_PINS_HDR}
DEPENDS
${GEN_PINS_AF_CSV}
${GEN_PINS_BOARD_CSV}
Expand Down
2 changes: 1 addition & 1 deletion ports/rp2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ endif

$(VERBOSE)MAKESILENT = -s

CMAKE_ARGS = -DMICROPY_BOARD=$(BOARD) -DMICROPY_BOARD_DIR="$(abspath $(BOARD_DIR))"
CMAKE_ARGS += -DMICROPY_BOARD=$(BOARD) -DMICROPY_BOARD_DIR="$(abspath $(BOARD_DIR))"

ifdef USER_C_MODULES
CMAKE_ARGS += -DUSER_C_MODULES=${USER_C_MODULES}
Expand Down
1 change: 1 addition & 0 deletions ports/rp2/boards/RPI_PICO/mpconfigboard.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# cmake file for Raspberry Pi Pico
set(PICO_BOARD "pico")
set(PICO_PLATFORM "rp2040")
22 changes: 22 additions & 0 deletions ports/rp2/boards/RPI_PICO2/board.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"deploy": [
"../deploy.md"
],
"docs": "",
"features": [
"Dual-core",
"External Flash",
"USB"
],
"images": [
"rp2-pico2.jpg"
],
"mcu": "rp2350",
"product": "Pico 2",
"thumbnail": "",
"url": "https://www.raspberrypi.com/products/raspberry-pi-pico-2/",
"variants": {
"RISCV": "RISC-V CPU mode"
},
"vendor": "Raspberry Pi"
}
5 changes: 5 additions & 0 deletions ports/rp2/boards/RPI_PICO2/mpconfigboard.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# cmake file for Raspberry Pi Pico2
set(PICO_BOARD "pico2")

# To change the gpio count for QFN-80
# set(PICO_NUM_GPIOS 48)
3 changes: 3 additions & 0 deletions ports/rp2/boards/RPI_PICO2/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Board and hardware specific configuration
#define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico2"
#define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - 1024 * 1024)
1 change: 1 addition & 0 deletions ports/rp2/boards/RPI_PICO2/mpconfigvariant.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set(PICO_PLATFORM "rp2350")
1 change: 1 addition & 0 deletions ports/rp2/boards/RPI_PICO2/mpconfigvariant_RISCV.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set(PICO_PLATFORM "rp2350-riscv")
28 changes: 28 additions & 0 deletions ports/rp2/boards/RPI_PICO2/pins.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
GP0,GPIO0
GP1,GPIO1
GP2,GPIO2
GP3,GPIO3
GP4,GPIO4
GP5,GPIO5
GP6,GPIO6
GP7,GPIO7
GP8,GPIO8
GP9,GPIO9
GP10,GPIO10
GP11,GPIO11
GP12,GPIO12
GP13,GPIO13
GP14,GPIO14
GP15,GPIO15
GP16,GPIO16
GP17,GPIO17
GP18,GPIO18
GP19,GPIO19
GP20,GPIO20
GP21,GPIO21
GP22,GPIO22
GP25,GPIO25
GP26,GPIO26
GP27,GPIO27
GP28,GPIO28
LED,GPIO25
21 changes: 21 additions & 0 deletions ports/rp2/boards/SPARKFUN_PROMICRO_RP2350/board.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"deploy": [
"../deploy.md"
],
"docs": "",
"features": [
"Dual-core",
"External Flash",
"JST-SH",
"RGB LED",
"USB-C"
],
"images": [
"17745-SparkFun_Thing_Plus_-_RP2040-01a.jpg"
],
"mcu": "rp2350",
"product": "Pro Micro RP2350",
"thumbnail": "",
"url": "https://www.sparkfun.com/products/24870",
"vendor": "Sparkfun"
}
5 changes: 5 additions & 0 deletions ports/rp2/boards/SPARKFUN_PROMICRO_RP2350/mpconfigboard.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# cmake file for SparkFun Pro Micro RP2350
set(PICO_BOARD "sparkfun_promicro_rp2350")

# To change the gpio count for QFN-80
# set(PICO_NUM_GPIOS 48)
Loading