Update to SDK 2.1.0, add Pico 2W (#2629)
Update to Pico SDK 2.1.0, remove XIP and PSRAM workarounds. Add Pico2W board.
This commit is contained in:
parent
9cea4708c8
commit
4068601b01
41 changed files with 396 additions and 109 deletions
|
|
@ -16,6 +16,7 @@ Read the [Contributing Guide](https://github.com/earlephilhower/arduino-pico/blo
|
|||
* Raspberry Pi Pico
|
||||
* Raspberry Pi Pico W
|
||||
* Raspberry Pi Pico 2
|
||||
* Raspberry Pi Pico 2W
|
||||
* 0xCB Helios
|
||||
* Adafruit Feather RP2040
|
||||
* Adafruit Feather RP2040 SCORPIO
|
||||
|
|
|
|||
228
boards.txt
228
boards.txt
|
|
@ -813,6 +813,234 @@ rpipico2.menu.uploadmethod.picoprobe_cmsis_dap.upload.maximum_data_size=524288
|
|||
rpipico2.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool=picoprobe_cmsis_dap
|
||||
rpipico2.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool.default=picoprobe_cmsis_dap
|
||||
|
||||
# -----------------------------------
|
||||
# Raspberry Pi Pico 2W
|
||||
# -----------------------------------
|
||||
rpipico2w.name=Raspberry Pi Pico 2W
|
||||
rpipico2w.vid.0=0x2e8a
|
||||
rpipico2w.pid.0=0xf00f
|
||||
rpipico2w.vid.1=0x2e8a
|
||||
rpipico2w.pid.1=0xf10f
|
||||
rpipico2w.upload_port.0.vid=0x2e8a
|
||||
rpipico2w.upload_port.0.pid=0xf00f
|
||||
rpipico2w.upload_port.1.vid=0x2e8a
|
||||
rpipico2w.upload_port.1.pid=0xf10f
|
||||
rpipico2w.build.usbvid=-DUSBD_VID=0x2e8a
|
||||
rpipico2w.build.usbpid=-DUSBD_PID=0xf00f
|
||||
rpipico2w.build.usbpwr=-DUSBD_MAX_POWER_MA=250
|
||||
rpipico2w.build.board=RASPBERRY_PI_PICO_2W
|
||||
rpipico2w.build.variant=rpipico2w
|
||||
rpipico2w.upload.maximum_size=4194304
|
||||
rpipico2w.upload.wait_for_upload_port=true
|
||||
rpipico2w.upload.erase_cmd=
|
||||
rpipico2w.serial.disableDTR=false
|
||||
rpipico2w.serial.disableRTS=false
|
||||
rpipico2w.build.f_cpu=125000000
|
||||
rpipico2w.build.led=
|
||||
rpipico2w.build.core=rp2040
|
||||
rpipico2w.build.ldscript=memmap_default.ld
|
||||
rpipico2w.build.boot2=none
|
||||
rpipico2w.build.usb_manufacturer="Raspberry Pi"
|
||||
rpipico2w.build.usb_product="Pico 2W"
|
||||
rpipico2w.build.psram_length=0x000000
|
||||
rpipico2w.build.extra_flags=-DPICO_CYW43_SUPPORTED=1 -DCYW43_PIN_WL_DYNAMIC=1
|
||||
rpipico2w.menu.flash.4194304_0=4MB (no FS)
|
||||
rpipico2w.menu.flash.4194304_0.upload.maximum_size=4186112
|
||||
rpipico2w.menu.flash.4194304_0.build.flash_total=4194304
|
||||
rpipico2w.menu.flash.4194304_0.build.flash_length=4186112
|
||||
rpipico2w.menu.flash.4194304_0.build.eeprom_start=272621568
|
||||
rpipico2w.menu.flash.4194304_0.build.fs_start=272621568
|
||||
rpipico2w.menu.flash.4194304_0.build.fs_end=272621568
|
||||
rpipico2w.menu.flash.4194304_65536=4MB (Sketch: 4032KB, FS: 64KB)
|
||||
rpipico2w.menu.flash.4194304_65536.upload.maximum_size=4120576
|
||||
rpipico2w.menu.flash.4194304_65536.build.flash_total=4194304
|
||||
rpipico2w.menu.flash.4194304_65536.build.flash_length=4120576
|
||||
rpipico2w.menu.flash.4194304_65536.build.eeprom_start=272621568
|
||||
rpipico2w.menu.flash.4194304_65536.build.fs_start=272556032
|
||||
rpipico2w.menu.flash.4194304_65536.build.fs_end=272621568
|
||||
rpipico2w.menu.flash.4194304_131072=4MB (Sketch: 3968KB, FS: 128KB)
|
||||
rpipico2w.menu.flash.4194304_131072.upload.maximum_size=4055040
|
||||
rpipico2w.menu.flash.4194304_131072.build.flash_total=4194304
|
||||
rpipico2w.menu.flash.4194304_131072.build.flash_length=4055040
|
||||
rpipico2w.menu.flash.4194304_131072.build.eeprom_start=272621568
|
||||
rpipico2w.menu.flash.4194304_131072.build.fs_start=272490496
|
||||
rpipico2w.menu.flash.4194304_131072.build.fs_end=272621568
|
||||
rpipico2w.menu.flash.4194304_262144=4MB (Sketch: 3840KB, FS: 256KB)
|
||||
rpipico2w.menu.flash.4194304_262144.upload.maximum_size=3923968
|
||||
rpipico2w.menu.flash.4194304_262144.build.flash_total=4194304
|
||||
rpipico2w.menu.flash.4194304_262144.build.flash_length=3923968
|
||||
rpipico2w.menu.flash.4194304_262144.build.eeprom_start=272621568
|
||||
rpipico2w.menu.flash.4194304_262144.build.fs_start=272359424
|
||||
rpipico2w.menu.flash.4194304_262144.build.fs_end=272621568
|
||||
rpipico2w.menu.flash.4194304_524288=4MB (Sketch: 3584KB, FS: 512KB)
|
||||
rpipico2w.menu.flash.4194304_524288.upload.maximum_size=3661824
|
||||
rpipico2w.menu.flash.4194304_524288.build.flash_total=4194304
|
||||
rpipico2w.menu.flash.4194304_524288.build.flash_length=3661824
|
||||
rpipico2w.menu.flash.4194304_524288.build.eeprom_start=272621568
|
||||
rpipico2w.menu.flash.4194304_524288.build.fs_start=272097280
|
||||
rpipico2w.menu.flash.4194304_524288.build.fs_end=272621568
|
||||
rpipico2w.menu.flash.4194304_1048576=4MB (Sketch: 3MB, FS: 1MB)
|
||||
rpipico2w.menu.flash.4194304_1048576.upload.maximum_size=3137536
|
||||
rpipico2w.menu.flash.4194304_1048576.build.flash_total=4194304
|
||||
rpipico2w.menu.flash.4194304_1048576.build.flash_length=3137536
|
||||
rpipico2w.menu.flash.4194304_1048576.build.eeprom_start=272621568
|
||||
rpipico2w.menu.flash.4194304_1048576.build.fs_start=271572992
|
||||
rpipico2w.menu.flash.4194304_1048576.build.fs_end=272621568
|
||||
rpipico2w.menu.flash.4194304_2097152=4MB (Sketch: 2MB, FS: 2MB)
|
||||
rpipico2w.menu.flash.4194304_2097152.upload.maximum_size=2088960
|
||||
rpipico2w.menu.flash.4194304_2097152.build.flash_total=4194304
|
||||
rpipico2w.menu.flash.4194304_2097152.build.flash_length=2088960
|
||||
rpipico2w.menu.flash.4194304_2097152.build.eeprom_start=272621568
|
||||
rpipico2w.menu.flash.4194304_2097152.build.fs_start=270524416
|
||||
rpipico2w.menu.flash.4194304_2097152.build.fs_end=272621568
|
||||
rpipico2w.menu.flash.4194304_3145728=4MB (Sketch: 1MB, FS: 3MB)
|
||||
rpipico2w.menu.flash.4194304_3145728.upload.maximum_size=1040384
|
||||
rpipico2w.menu.flash.4194304_3145728.build.flash_total=4194304
|
||||
rpipico2w.menu.flash.4194304_3145728.build.flash_length=1040384
|
||||
rpipico2w.menu.flash.4194304_3145728.build.eeprom_start=272621568
|
||||
rpipico2w.menu.flash.4194304_3145728.build.fs_start=269475840
|
||||
rpipico2w.menu.flash.4194304_3145728.build.fs_end=272621568
|
||||
rpipico2w.menu.arch.arm=ARM
|
||||
rpipico2w.menu.arch.arm.build.chip=rp2350
|
||||
rpipico2w.menu.arch.arm.build.toolchain=arm-none-eabi
|
||||
rpipico2w.menu.arch.arm.build.toolchainpkg=pqt-gcc
|
||||
rpipico2w.menu.arch.arm.build.toolchainopts=-mcpu=cortex-m33 -mthumb -march=armv8-m.main+fp+dsp -mfloat-abi=softfp -mcmse
|
||||
rpipico2w.menu.arch.arm.build.uf2family=--family rp2350-arm-s --abs-block
|
||||
rpipico2w.menu.arch.riscv=RISC-V
|
||||
rpipico2w.menu.arch.riscv.build.chip=rp2350-riscv
|
||||
rpipico2w.menu.arch.riscv.build.toolchain=riscv32-unknown-elf
|
||||
rpipico2w.menu.arch.riscv.build.toolchainpkg=pqt-gcc-riscv
|
||||
rpipico2w.menu.arch.riscv.build.toolchainopts=-march=rv32imac_zicsr_zifencei_zba_zbb_zbs_zbkb -mabi=ilp32
|
||||
rpipico2w.menu.arch.riscv.build.uf2family=--family rp2350-riscv --abs-block
|
||||
rpipico2w.menu.freq.150=150 MHz
|
||||
rpipico2w.menu.freq.150.build.f_cpu=150000000L
|
||||
rpipico2w.menu.freq.50=50 MHz
|
||||
rpipico2w.menu.freq.50.build.f_cpu=50000000L
|
||||
rpipico2w.menu.freq.100=100 MHz
|
||||
rpipico2w.menu.freq.100.build.f_cpu=100000000L
|
||||
rpipico2w.menu.freq.120=120 MHz
|
||||
rpipico2w.menu.freq.120.build.f_cpu=120000000L
|
||||
rpipico2w.menu.freq.125=125 MHz
|
||||
rpipico2w.menu.freq.125.build.f_cpu=125000000L
|
||||
rpipico2w.menu.freq.128=128 MHz
|
||||
rpipico2w.menu.freq.128.build.f_cpu=128000000L
|
||||
rpipico2w.menu.freq.133=133 MHz
|
||||
rpipico2w.menu.freq.133.build.f_cpu=133000000L
|
||||
rpipico2w.menu.freq.175=175 MHz (Overclock)
|
||||
rpipico2w.menu.freq.175.build.f_cpu=175000000L
|
||||
rpipico2w.menu.freq.200=200 MHz (Overclock)
|
||||
rpipico2w.menu.freq.200.build.f_cpu=200000000L
|
||||
rpipico2w.menu.freq.225=225 MHz (Overclock)
|
||||
rpipico2w.menu.freq.225.build.f_cpu=225000000L
|
||||
rpipico2w.menu.freq.240=240 MHz (Overclock)
|
||||
rpipico2w.menu.freq.240.build.f_cpu=240000000L
|
||||
rpipico2w.menu.freq.250=250 MHz (Overclock)
|
||||
rpipico2w.menu.freq.250.build.f_cpu=250000000L
|
||||
rpipico2w.menu.freq.275=275 MHz (Overclock)
|
||||
rpipico2w.menu.freq.275.build.f_cpu=275000000L
|
||||
rpipico2w.menu.freq.300=300 MHz (Overclock)
|
||||
rpipico2w.menu.freq.300.build.f_cpu=300000000L
|
||||
rpipico2w.menu.opt.Small=Small (-Os) (standard)
|
||||
rpipico2w.menu.opt.Small.build.flags.optimize=-Os
|
||||
rpipico2w.menu.opt.Optimize=Optimize (-O)
|
||||
rpipico2w.menu.opt.Optimize.build.flags.optimize=-O
|
||||
rpipico2w.menu.opt.Optimize2=Optimize More (-O2)
|
||||
rpipico2w.menu.opt.Optimize2.build.flags.optimize=-O2
|
||||
rpipico2w.menu.opt.Optimize3=Optimize Even More (-O3)
|
||||
rpipico2w.menu.opt.Optimize3.build.flags.optimize=-O3
|
||||
rpipico2w.menu.opt.Fast=Fast (-Ofast) (maybe slower)
|
||||
rpipico2w.menu.opt.Fast.build.flags.optimize=-Ofast
|
||||
rpipico2w.menu.opt.Debug=Debug (-Og)
|
||||
rpipico2w.menu.opt.Debug.build.flags.optimize=-Og
|
||||
rpipico2w.menu.rtti.Disabled=Disabled
|
||||
rpipico2w.menu.rtti.Disabled.build.flags.rtti=-fno-rtti
|
||||
rpipico2w.menu.rtti.Enabled=Enabled
|
||||
rpipico2w.menu.rtti.Enabled.build.flags.rtti=
|
||||
rpipico2w.menu.stackprotect.Disabled=Disabled
|
||||
rpipico2w.menu.stackprotect.Disabled.build.flags.stackprotect=
|
||||
rpipico2w.menu.stackprotect.Enabled=Enabled
|
||||
rpipico2w.menu.stackprotect.Enabled.build.flags.stackprotect=-fstack-protector
|
||||
rpipico2w.menu.exceptions.Disabled=Disabled
|
||||
rpipico2w.menu.exceptions.Disabled.build.flags.exceptions=-fno-exceptions
|
||||
rpipico2w.menu.exceptions.Disabled.build.flags.libstdcpp=-lstdc++
|
||||
rpipico2w.menu.exceptions.Enabled=Enabled
|
||||
rpipico2w.menu.exceptions.Enabled.build.flags.exceptions=-fexceptions
|
||||
rpipico2w.menu.exceptions.Enabled.build.flags.libstdcpp=-lstdc++-exc
|
||||
rpipico2w.menu.dbgport.Disabled=Disabled
|
||||
rpipico2w.menu.dbgport.Disabled.build.debug_port=
|
||||
rpipico2w.menu.dbgport.Serial=Serial
|
||||
rpipico2w.menu.dbgport.Serial.build.debug_port=-DDEBUG_RP2040_PORT=Serial
|
||||
rpipico2w.menu.dbgport.Serial1=Serial1
|
||||
rpipico2w.menu.dbgport.Serial1.build.debug_port=-DDEBUG_RP2040_PORT=Serial1
|
||||
rpipico2w.menu.dbgport.Serial2=Serial2
|
||||
rpipico2w.menu.dbgport.Serial2.build.debug_port=-DDEBUG_RP2040_PORT=Serial2
|
||||
rpipico2w.menu.dbglvl.None=None
|
||||
rpipico2w.menu.dbglvl.None.build.debug_level=
|
||||
rpipico2w.menu.dbglvl.Core=Core
|
||||
rpipico2w.menu.dbglvl.Core.build.debug_level=-DDEBUG_RP2040_CORE
|
||||
rpipico2w.menu.dbglvl.SPI=SPI
|
||||
rpipico2w.menu.dbglvl.SPI.build.debug_level=-DDEBUG_RP2040_SPI
|
||||
rpipico2w.menu.dbglvl.Wire=Wire
|
||||
rpipico2w.menu.dbglvl.Wire.build.debug_level=-DDEBUG_RP2040_WIRE
|
||||
rpipico2w.menu.dbglvl.Bluetooth=Bluetooth
|
||||
rpipico2w.menu.dbglvl.Bluetooth.build.debug_level=-DDEBUG_RP2040_BLUETOOTH
|
||||
rpipico2w.menu.dbglvl.All=All
|
||||
rpipico2w.menu.dbglvl.All.build.debug_level=-DDEBUG_RP2040_WIRE -DDEBUG_RP2040_SPI -DDEBUG_RP2040_CORE -DDEBUG_RP2040_BLUETOOTH
|
||||
rpipico2w.menu.dbglvl.NDEBUG=NDEBUG
|
||||
rpipico2w.menu.dbglvl.NDEBUG.build.debug_level=-DNDEBUG
|
||||
rpipico2w.menu.usbstack.picosdk=Pico SDK
|
||||
rpipico2w.menu.usbstack.picosdk.build.usbstack_flags=
|
||||
rpipico2w.menu.usbstack.tinyusb=Adafruit TinyUSB
|
||||
rpipico2w.menu.usbstack.tinyusb.build.usbstack_flags=-DUSE_TINYUSB "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
rpipico2w.menu.usbstack.tinyusb_host=Adafruit TinyUSB Host (native)
|
||||
rpipico2w.menu.usbstack.tinyusb_host.build.usbstack_flags=-DUSE_TINYUSB -DUSE_TINYUSB_HOST "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
rpipico2w.menu.usbstack.nousb=No USB
|
||||
rpipico2w.menu.usbstack.nousb.build.usbstack_flags="-DNO_USB -DDISABLE_USB_SERIAL -I{runtime.platform.path}/tools/libpico"
|
||||
rpipico2w.menu.ipbtstack.ipv4only=IPv4 Only
|
||||
rpipico2w.menu.ipbtstack.ipv4only.build.libpicow=libipv4.a
|
||||
rpipico2w.menu.ipbtstack.ipv4only.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1
|
||||
rpipico2w.menu.ipbtstack.ipv4ipv6=IPv4 + IPv6
|
||||
rpipico2w.menu.ipbtstack.ipv4ipv6.build.libpicow=libipv4-ipv6.a
|
||||
rpipico2w.menu.ipbtstack.ipv4ipv6.build.libpicowdefs=-DLWIP_IPV6=1 -DLWIP_IPV4=1
|
||||
rpipico2w.menu.ipbtstack.ipv4btcble=IPv4 + Bluetooth
|
||||
rpipico2w.menu.ipbtstack.ipv4btcble.build.libpicow=libipv4-bt.a
|
||||
rpipico2w.menu.ipbtstack.ipv4btcble.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1 -DENABLE_CLASSIC=1 -DENABLE_BLE=1
|
||||
rpipico2w.menu.ipbtstack.ipv4ipv6btcble=IPv4 + IPv6 + Bluetooth
|
||||
rpipico2w.menu.ipbtstack.ipv4ipv6btcble.build.libpicow=libipv4-ipv6-bt.a
|
||||
rpipico2w.menu.ipbtstack.ipv4ipv6btcble.build.libpicowdefs=-DLWIP_IPV6=1 -DLWIP_IPV4=1 -DENABLE_CLASSIC=1 -DENABLE_BLE=1
|
||||
rpipico2w.menu.ipbtstack.ipv4onlybig=IPv4 Only - 32K
|
||||
rpipico2w.menu.ipbtstack.ipv4onlybig.build.libpicow=libipv4-big.a
|
||||
rpipico2w.menu.ipbtstack.ipv4onlybig.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1 -D__LWIP_MEMMULT=2
|
||||
rpipico2w.menu.ipbtstack.ipv4ipv6big=IPv4 + IPv6 - 32K
|
||||
rpipico2w.menu.ipbtstack.ipv4ipv6big.build.libpicow=libipv4-ipv6-big.a
|
||||
rpipico2w.menu.ipbtstack.ipv4ipv6big.build.libpicowdefs=-DLWIP_IPV6=1 -DLWIP_IPV4=1 -D__LWIP_MEMMULT=2
|
||||
rpipico2w.menu.ipbtstack.ipv4btcblebig=IPv4 + Bluetooth - 32K
|
||||
rpipico2w.menu.ipbtstack.ipv4btcblebig.build.libpicow=libipv4-bt-big.a
|
||||
rpipico2w.menu.ipbtstack.ipv4btcblebig.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1 -DENABLE_CLASSIC=1 -DENABLE_BLE=1 -D__LWIP_MEMMULT=2
|
||||
rpipico2w.menu.ipbtstack.ipv4ipv6btcblebig=IPv4 + IPv6 + Bluetooth - 32K
|
||||
rpipico2w.menu.ipbtstack.ipv4ipv6btcblebig.build.libpicow=libipv4-ipv6-bt-big.a
|
||||
rpipico2w.menu.ipbtstack.ipv4ipv6btcblebig.build.libpicowdefs=-DLWIP_IPV6=1 -DLWIP_IPV4=1 -DENABLE_CLASSIC=1 -DENABLE_BLE=1 -D__LWIP_MEMMULT=2
|
||||
rpipico2w.menu.uploadmethod.default=Default (UF2)
|
||||
rpipico2w.menu.uploadmethod.default.build.ram_length=512k
|
||||
rpipico2w.menu.uploadmethod.default.build.debugscript=picoprobe_cmsis_dap.tcl
|
||||
rpipico2w.menu.uploadmethod.default.upload.maximum_data_size=524288
|
||||
rpipico2w.menu.uploadmethod.default.upload.tool=uf2conv
|
||||
rpipico2w.menu.uploadmethod.default.upload.tool.default=uf2conv
|
||||
rpipico2w.menu.uploadmethod.default.upload.tool.network=uf2conv-network
|
||||
rpipico2w.menu.uploadmethod.picotool=Picotool
|
||||
rpipico2w.menu.uploadmethod.picotool.build.ram_length=512k
|
||||
rpipico2w.menu.uploadmethod.picotool.build.debugscript=picoprobe.tcl
|
||||
rpipico2w.menu.uploadmethod.picotool.build.picodebugflags=-DENABLE_PICOTOOL_USB
|
||||
rpipico2w.menu.uploadmethod.picotool.upload.maximum_data_size=524288
|
||||
rpipico2w.menu.uploadmethod.picotool.upload.tool=picotool
|
||||
rpipico2w.menu.uploadmethod.picotool.upload.tool.default=picotool
|
||||
rpipico2w.menu.uploadmethod.picoprobe_cmsis_dap=Picoprobe/Debugprobe (CMSIS-DAP)
|
||||
rpipico2w.menu.uploadmethod.picoprobe_cmsis_dap.build.ram_length=512k
|
||||
rpipico2w.menu.uploadmethod.picoprobe_cmsis_dap.build.debugscript=picoprobe_cmsis_dap.tcl
|
||||
rpipico2w.menu.uploadmethod.picoprobe_cmsis_dap.upload.maximum_data_size=524288
|
||||
rpipico2w.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool=picoprobe_cmsis_dap
|
||||
rpipico2w.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool.default=picoprobe_cmsis_dap
|
||||
|
||||
# -----------------------------------
|
||||
# 0xCB Helios
|
||||
# -----------------------------------
|
||||
|
|
|
|||
|
|
@ -1,95 +0,0 @@
|
|||
/*
|
||||
Flash wrappers to protect PSRAM access on the RP2350
|
||||
|
||||
Copyright (c) 2024 Earle F. Philhower, III <earlephilhower@yahoo.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#include <Arduino.h>
|
||||
#include <hardware/flash.h>
|
||||
|
||||
#ifdef PICO_RP2350
|
||||
#include <hardware/structs/qmi.h>
|
||||
#endif
|
||||
|
||||
#if defined(PICO_RP2350) && defined(RP2350_PSRAM_CS)
|
||||
static void __no_inline_not_in_flash_func(flushcache)() {
|
||||
// From https://forums.raspberrypi.com/viewtopic.php?t=378249#p2263677
|
||||
// Perform clean-by-set/way on all lines
|
||||
for (uint32_t i = 0; i < 2048; ++i) {
|
||||
// Use the upper 16k of the maintenance space (0x1bffc000 through 0x1bffffff):
|
||||
*(volatile uint8_t*)(XIP_SRAM_BASE + (XIP_MAINTENANCE_BASE - XIP_BASE) + i * 8u + 0x1u) = 0;
|
||||
}
|
||||
}
|
||||
#elif defined(PICO_RP2350)
|
||||
static void __no_inline_not_in_flash_func(flushcache)() {
|
||||
// Null
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
extern "C" {
|
||||
extern void __real_flash_range_erase(uint32_t flash_offs, size_t count);
|
||||
void __wrap_flash_range_erase(uint32_t flash_offs, size_t count) {
|
||||
#ifdef PICO_RP2350
|
||||
auto s = qmi_hw->m[1];
|
||||
flushcache();
|
||||
#endif
|
||||
__real_flash_range_erase(flash_offs, count);
|
||||
#ifdef PICO_RP2350
|
||||
qmi_hw->m[1] = s;
|
||||
__compiler_memory_barrier();
|
||||
#endif
|
||||
}
|
||||
|
||||
extern void __real_flash_range_program(uint32_t flash_offs, const uint8_t *data, size_t count);
|
||||
void __wrap_flash_range_program(uint32_t flash_offs, const uint8_t *data, size_t count) {
|
||||
#ifdef PICO_RP2350
|
||||
auto s = qmi_hw->m[1];
|
||||
flushcache();
|
||||
#endif
|
||||
__real_flash_range_program(flash_offs, data, count);
|
||||
#ifdef PICO_RP2350
|
||||
qmi_hw->m[1] = s;
|
||||
__compiler_memory_barrier();
|
||||
#endif
|
||||
}
|
||||
|
||||
extern void __real_flash_get_unique_id(uint8_t *id_out);
|
||||
void __wrap_flash_get_unique_id(uint8_t *id_out) {
|
||||
#ifdef PICO_RP2350
|
||||
auto s = qmi_hw->m[1];
|
||||
flushcache();
|
||||
#endif
|
||||
__real_flash_get_unique_id(id_out);
|
||||
#ifdef PICO_RP2350
|
||||
qmi_hw->m[1] = s;
|
||||
__compiler_memory_barrier();
|
||||
#endif
|
||||
}
|
||||
|
||||
extern void __real_flash_do_cmd(const uint8_t *txbuf, uint8_t *rxbuf, size_t count);
|
||||
void __wrap_flash_do_cmd(const uint8_t *txbuf, uint8_t *rxbuf, size_t count) {
|
||||
#ifdef PICO_RP2350
|
||||
auto s = qmi_hw->m[1];
|
||||
flushcache();
|
||||
#endif
|
||||
__real_flash_do_cmd(txbuf, rxbuf, count);
|
||||
#ifdef PICO_RP2350
|
||||
qmi_hw->m[1] = s;
|
||||
__compiler_memory_barrier();
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
|
@ -12,8 +12,8 @@
|
|||
#define _PICO_VERSION_H
|
||||
|
||||
#define PICO_SDK_VERSION_MAJOR 2
|
||||
#define PICO_SDK_VERSION_MINOR 0
|
||||
#define PICO_SDK_VERSION_REVISION 1
|
||||
#define PICO_SDK_VERSION_STRING "2.0.1-develop"
|
||||
#define PICO_SDK_VERSION_MINOR 1
|
||||
#define PICO_SDK_VERSION_REVISION 0
|
||||
#define PICO_SDK_VERSION_STRING "2.1.0"
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
#define _PICO_VERSION_H
|
||||
|
||||
#define PICO_SDK_VERSION_MAJOR 2
|
||||
#define PICO_SDK_VERSION_MINOR 0
|
||||
#define PICO_SDK_VERSION_REVISION 1
|
||||
#define PICO_SDK_VERSION_STRING "2.0.1-develop"
|
||||
#define PICO_SDK_VERSION_MINOR 1
|
||||
#define PICO_SDK_VERSION_REVISION 0
|
||||
#define PICO_SDK_VERSION_STRING "2.1.0"
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -67,8 +67,3 @@
|
|||
-Wl,--wrap=cyw43_tcpip_link_status
|
||||
-Wl,--wrap=cyw43_cb_tcpip_init
|
||||
-Wl,--wrap=cyw43_cb_tcpip_deinit
|
||||
|
||||
-Wl,--wrap=flash_range_erase
|
||||
-Wl,--wrap=flash_range_program
|
||||
-Wl,--wrap=flash_get_unique_id
|
||||
-Wl,--wrap=flash_do_cmd
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -26,6 +26,9 @@
|
|||
{
|
||||
"name": "Raspberry Pi Pico 2"
|
||||
},
|
||||
{
|
||||
"name": "Raspberry Pi Pico 2W"
|
||||
},
|
||||
{
|
||||
"name": "0xCB Helios"
|
||||
},
|
||||
|
|
|
|||
2
pico-sdk
2
pico-sdk
|
|
@ -1 +1 @@
|
|||
Subproject commit 89691ed8798ce80e294f0b2a16174a2ebec0c9f7
|
||||
Subproject commit 95ea6acad131124694cda1c162c52cd30e0aece0
|
||||
55
tools/json/rpipico2w.json
Normal file
55
tools/json/rpipico2w.json
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"build": {
|
||||
"arduino": {
|
||||
"earlephilhower": {
|
||||
"boot2_source": "none.S",
|
||||
"usb_vid": "0x2E8A",
|
||||
"usb_pid": "0xF00F"
|
||||
}
|
||||
},
|
||||
"core": "earlephilhower",
|
||||
"cpu": "cortex-m33",
|
||||
"extra_flags": "-DARDUINO_RASPBERRY_PI_PICO_2W -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250 -DPICO_CYW43_SUPPORTED=1 -DCYW43_PIN_WL_DYNAMIC=1",
|
||||
"f_cpu": "150000000L",
|
||||
"hwids": [
|
||||
[
|
||||
"0x2E8A",
|
||||
"0x00C0"
|
||||
],
|
||||
[
|
||||
"0x2E8A",
|
||||
"0xF00F"
|
||||
]
|
||||
],
|
||||
"mcu": "rp2350",
|
||||
"variant": "rpipico2w"
|
||||
},
|
||||
"debug": {
|
||||
"jlink_device": "RP2350_0",
|
||||
"openocd_target": "rp2350.cfg",
|
||||
"svd_path": "rp2350.svd"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino"
|
||||
],
|
||||
"name": "Pico 2W",
|
||||
"upload": {
|
||||
"maximum_ram_size": 524288,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"native_usb": true,
|
||||
"use_1200bps_touch": true,
|
||||
"wait_for_upload_port": false,
|
||||
"protocol": "picotool",
|
||||
"protocols": [
|
||||
"blackmagic",
|
||||
"cmsis-dap",
|
||||
"jlink",
|
||||
"raspberrypi-swd",
|
||||
"picotool",
|
||||
"picoprobe"
|
||||
]
|
||||
},
|
||||
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
|
||||
"vendor": "Raspberry Pi"
|
||||
}
|
||||
|
|
@ -200,8 +200,9 @@ target_link_libraries(pico-${cpu}
|
|||
tinyusb_device_unmarked
|
||||
)
|
||||
if (${cpu} MATCHES "rp2350")
|
||||
# RP2350-only peripheral
|
||||
# RP2350-only peripherals
|
||||
target_link_libraries(pico-${cpu}
|
||||
hardware_xip_cache
|
||||
pico_sha256)
|
||||
endif()
|
||||
|
||||
|
|
@ -223,7 +224,6 @@ set(picow_link_libraries
|
|||
pico_async_context
|
||||
pico_async_context_threadsafe_background
|
||||
pico_cyw43_driver
|
||||
pico_cyw43_driver
|
||||
pico_cyw43_arch
|
||||
pico_cyw43_arch_threadsafe_background
|
||||
pico_lwip
|
||||
|
|
|
|||
|
|
@ -478,6 +478,7 @@ BuildGlobalMenuList()
|
|||
MakeBoard("rpipico", "rp2040", "Raspberry Pi", "Pico", "0x2e8a", "0x000a", 250, "RASPBERRY_PI_PICO", 2, 0, "boot2_w25q080_2_padded_checksum")
|
||||
MakeBoard("rpipicow", "rp2040", "Raspberry Pi", "Pico W", "0x2e8a", "0xf00a", 250, "RASPBERRY_PI_PICO_W", 2, 0, "boot2_w25q080_2_padded_checksum", ["PICO_CYW43_SUPPORTED=1", "CYW43_PIN_WL_DYNAMIC=1"])
|
||||
MakeBoard("rpipico2", "rp2350", "Raspberry Pi", "Pico 2", "0x2e8a", "0x000f", 250, "RASPBERRY_PI_PICO_2", 4, 0, "none")
|
||||
MakeBoard("rpipico2w", "rp2350", "Raspberry Pi", "Pico 2W", "0x2e8a", "0xf00f", 250, "RASPBERRY_PI_PICO_2W", 4, 0, "none", ["PICO_CYW43_SUPPORTED=1", "CYW43_PIN_WL_DYNAMIC=1"])
|
||||
|
||||
# 0xCB
|
||||
MakeBoard("0xcb_helios", "rp2040", "0xCB", "Helios", "0x1209", "0xCB74", 500, "0XCB_HELIOS", 16, 0, "boot2_w25q128jvxq_4_padded_checksum")
|
||||
|
|
|
|||
33
variants/rpipico2w/digital.cpp
Normal file
33
variants/rpipico2w/digital.cpp
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
pinMode and digitalRead/Write for the Raspberry Pi Pico W RP2040
|
||||
Copyright (c) 2022 Earle F. Philhower, III <earlephilhower@yahoo.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <cyw43_wrappers.h>
|
||||
|
||||
extern "C" void pinMode(pin_size_t pin, PinMode mode) {
|
||||
cyw43_pinMode(pin, mode);
|
||||
}
|
||||
|
||||
extern "C" void digitalWrite(pin_size_t pin, PinStatus val) {
|
||||
cyw43_digitalWrite(pin, val);
|
||||
}
|
||||
|
||||
extern "C" PinStatus digitalRead(pin_size_t pin) {
|
||||
return cyw43_digitalRead(pin);
|
||||
}
|
||||
25
variants/rpipico2w/init.cpp
Normal file
25
variants/rpipico2w/init.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
Initialize the Pico W WiFi driver
|
||||
|
||||
Copyright (c) 2022 Earle F. Philhower, III <earlephilhower@yahoo.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <cyw43_wrappers.h>
|
||||
|
||||
extern "C" void initVariant() {
|
||||
init_cyw43_wifi();
|
||||
}
|
||||
41
variants/rpipico2w/pins_arduino.h
Normal file
41
variants/rpipico2w/pins_arduino.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#pragma once
|
||||
|
||||
#include <cyw43_wrappers.h>
|
||||
|
||||
// Pin definitions taken from:
|
||||
// https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf
|
||||
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED (25u)
|
||||
|
||||
// Serial
|
||||
#define PIN_SERIAL1_TX (0u)
|
||||
#define PIN_SERIAL1_RX (1u)
|
||||
|
||||
#define PIN_SERIAL2_TX (8u)
|
||||
#define PIN_SERIAL2_RX (9u)
|
||||
|
||||
// SPI
|
||||
#define PIN_SPI0_MISO (16u)
|
||||
#define PIN_SPI0_MOSI (19u)
|
||||
#define PIN_SPI0_SCK (18u)
|
||||
#define PIN_SPI0_SS (17u)
|
||||
|
||||
#define PIN_SPI1_MISO (12u)
|
||||
#define PIN_SPI1_MOSI (15u)
|
||||
#define PIN_SPI1_SCK (14u)
|
||||
#define PIN_SPI1_SS (13u)
|
||||
|
||||
// Wire
|
||||
#define PIN_WIRE0_SDA (4u)
|
||||
#define PIN_WIRE0_SCL (5u)
|
||||
|
||||
#define PIN_WIRE1_SDA (26u)
|
||||
#define PIN_WIRE1_SCL (27u)
|
||||
|
||||
#define SERIAL_HOWMANY (3u)
|
||||
#define SPI_HOWMANY (2u)
|
||||
#define WIRE_HOWMANY (2u)
|
||||
|
||||
#include "../generic/common.h"
|
||||
Loading…
Reference in a new issue