diff --git a/.github/workflows/build-libpico.yml b/.github/workflows/build-libpico.yml index 17ee02630..cd4010bdf 100644 --- a/.github/workflows/build-libpico.yml +++ b/.github/workflows/build-libpico.yml @@ -29,12 +29,6 @@ jobs: # add to PATH echo "$GITHUB_WORKSPACE/system/riscv32-unknown-elf/bin" >> "$GITHUB_PATH" echo "$GITHUB_WORKSPACE/system/arm-none-eabi/bin" >> "$GITHUB_PATH" - # Needed until we switch to Pico-SDK 2.0.1. - - name: Patch Pico-SDK (Fix Assembly for newer GCC) - run: | - cd pico-sdk - wget https://patch-diff.githubusercontent.com/raw/raspberrypi/pico-sdk/pull/2000.patch - patch -p1 < 2000.patch - name: Build libpico run: | cd tools/libpico diff --git a/boards.txt b/boards.txt index 90d235926..310728ac4 100644 --- a/boards.txt +++ b/boards.txt @@ -286,6 +286,7 @@ rpipicow.build.ldscript=memmap_default.ld rpipicow.build.boot2=boot2_w25q080_2_padded_checksum rpipicow.build.usb_manufacturer="Raspberry Pi" rpipicow.build.usb_product="Pico W" +rpipicow.build.extra_flags=-DPICO_CYW43_SUPPORTED=1 rpipicow.menu.flash.2097152_0=2MB (no FS) rpipicow.menu.flash.2097152_0.upload.maximum_size=2093056 rpipicow.menu.flash.2097152_0.build.flash_total=2097152 @@ -20467,6 +20468,446 @@ pimoroni_pico_plus_2.menu.uploadmethod.picoprobe_cmsis_dap.upload.maximum_data_s pimoroni_pico_plus_2.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool=picoprobe_cmsis_dap pimoroni_pico_plus_2.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool.default=picoprobe_cmsis_dap +# ----------------------------------- +# Pimoroni PicoPlus2W +# ----------------------------------- +pimoroni_pico_plus_2w.name=Pimoroni PicoPlus2W +pimoroni_pico_plus_2w.vid.0=0x2e8a +pimoroni_pico_plus_2w.pid.0=0x100a +pimoroni_pico_plus_2w.vid.1=0x2e8a +pimoroni_pico_plus_2w.pid.1=0x110a +pimoroni_pico_plus_2w.vid.2=0x2e8a +pimoroni_pico_plus_2w.pid.2=0x500a +pimoroni_pico_plus_2w.vid.3=0x2e8a +pimoroni_pico_plus_2w.pid.3=0x510a +pimoroni_pico_plus_2w.vid.4=0x2e8a +pimoroni_pico_plus_2w.pid.4=0x900a +pimoroni_pico_plus_2w.vid.5=0x2e8a +pimoroni_pico_plus_2w.pid.5=0x910a +pimoroni_pico_plus_2w.vid.6=0x2e8a +pimoroni_pico_plus_2w.pid.6=0xd00a +pimoroni_pico_plus_2w.vid.7=0x2e8a +pimoroni_pico_plus_2w.pid.7=0xd10a +pimoroni_pico_plus_2w.upload_port.0.vid=0x2e8a +pimoroni_pico_plus_2w.upload_port.0.pid=0x100a +pimoroni_pico_plus_2w.upload_port.1.vid=0x2e8a +pimoroni_pico_plus_2w.upload_port.1.pid=0x110a +pimoroni_pico_plus_2w.upload_port.2.vid=0x2e8a +pimoroni_pico_plus_2w.upload_port.2.pid=0x500a +pimoroni_pico_plus_2w.upload_port.3.vid=0x2e8a +pimoroni_pico_plus_2w.upload_port.3.pid=0x510a +pimoroni_pico_plus_2w.upload_port.4.vid=0x2e8a +pimoroni_pico_plus_2w.upload_port.4.pid=0x900a +pimoroni_pico_plus_2w.upload_port.5.vid=0x2e8a +pimoroni_pico_plus_2w.upload_port.5.pid=0x910a +pimoroni_pico_plus_2w.upload_port.6.vid=0x2e8a +pimoroni_pico_plus_2w.upload_port.6.pid=0xd00a +pimoroni_pico_plus_2w.upload_port.7.vid=0x2e8a +pimoroni_pico_plus_2w.upload_port.7.pid=0xd10a +pimoroni_pico_plus_2w.build.usbvid=-DUSBD_VID=0x2e8a +pimoroni_pico_plus_2w.build.usbpid=-DUSBD_PID=0x100a +pimoroni_pico_plus_2w.build.usbpwr=-DUSBD_MAX_POWER_MA=500 +pimoroni_pico_plus_2w.build.board=PIMORONI_PICO_PLUS_2W +pimoroni_pico_plus_2w.build.variant=pimoroni_pico_plus_2w +pimoroni_pico_plus_2w.upload.maximum_size=16777216 +pimoroni_pico_plus_2w.upload.wait_for_upload_port=true +pimoroni_pico_plus_2w.upload.erase_cmd= +pimoroni_pico_plus_2w.serial.disableDTR=false +pimoroni_pico_plus_2w.serial.disableRTS=false +pimoroni_pico_plus_2w.build.f_cpu=125000000 +pimoroni_pico_plus_2w.build.led= +pimoroni_pico_plus_2w.build.core=rp2040 +pimoroni_pico_plus_2w.build.ldscript=memmap_default.ld +pimoroni_pico_plus_2w.build.boot2=none +pimoroni_pico_plus_2w.build.usb_manufacturer="Pimoroni" +pimoroni_pico_plus_2w.build.usb_product="PicoPlus2W" +pimoroni_pico_plus_2w.build.psram_length=0x800000 +pimoroni_pico_plus_2w.build.extra_flags=-DPICO_CYW43_SUPPORTED=1 +pimoroni_pico_plus_2w.menu.flash.16777216_0=16MB (no FS) +pimoroni_pico_plus_2w.menu.flash.16777216_0.upload.maximum_size=16769024 +pimoroni_pico_plus_2w.menu.flash.16777216_0.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_0.build.flash_length=16769024 +pimoroni_pico_plus_2w.menu.flash.16777216_0.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_0.build.fs_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_0.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_65536=16MB (Sketch: 16320KB, FS: 64KB) +pimoroni_pico_plus_2w.menu.flash.16777216_65536.upload.maximum_size=16703488 +pimoroni_pico_plus_2w.menu.flash.16777216_65536.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_65536.build.flash_length=16703488 +pimoroni_pico_plus_2w.menu.flash.16777216_65536.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_65536.build.fs_start=285138944 +pimoroni_pico_plus_2w.menu.flash.16777216_65536.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_131072=16MB (Sketch: 16256KB, FS: 128KB) +pimoroni_pico_plus_2w.menu.flash.16777216_131072.upload.maximum_size=16637952 +pimoroni_pico_plus_2w.menu.flash.16777216_131072.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_131072.build.flash_length=16637952 +pimoroni_pico_plus_2w.menu.flash.16777216_131072.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_131072.build.fs_start=285073408 +pimoroni_pico_plus_2w.menu.flash.16777216_131072.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_262144=16MB (Sketch: 16128KB, FS: 256KB) +pimoroni_pico_plus_2w.menu.flash.16777216_262144.upload.maximum_size=16506880 +pimoroni_pico_plus_2w.menu.flash.16777216_262144.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_262144.build.flash_length=16506880 +pimoroni_pico_plus_2w.menu.flash.16777216_262144.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_262144.build.fs_start=284942336 +pimoroni_pico_plus_2w.menu.flash.16777216_262144.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_524288=16MB (Sketch: 15872KB, FS: 512KB) +pimoroni_pico_plus_2w.menu.flash.16777216_524288.upload.maximum_size=16244736 +pimoroni_pico_plus_2w.menu.flash.16777216_524288.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_524288.build.flash_length=16244736 +pimoroni_pico_plus_2w.menu.flash.16777216_524288.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_524288.build.fs_start=284680192 +pimoroni_pico_plus_2w.menu.flash.16777216_524288.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_1048576=16MB (Sketch: 15MB, FS: 1MB) +pimoroni_pico_plus_2w.menu.flash.16777216_1048576.upload.maximum_size=15720448 +pimoroni_pico_plus_2w.menu.flash.16777216_1048576.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_1048576.build.flash_length=15720448 +pimoroni_pico_plus_2w.menu.flash.16777216_1048576.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_1048576.build.fs_start=284155904 +pimoroni_pico_plus_2w.menu.flash.16777216_1048576.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_2097152=16MB (Sketch: 14MB, FS: 2MB) +pimoroni_pico_plus_2w.menu.flash.16777216_2097152.upload.maximum_size=14671872 +pimoroni_pico_plus_2w.menu.flash.16777216_2097152.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_2097152.build.flash_length=14671872 +pimoroni_pico_plus_2w.menu.flash.16777216_2097152.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_2097152.build.fs_start=283107328 +pimoroni_pico_plus_2w.menu.flash.16777216_2097152.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_3145728=16MB (Sketch: 13MB, FS: 3MB) +pimoroni_pico_plus_2w.menu.flash.16777216_3145728.upload.maximum_size=13623296 +pimoroni_pico_plus_2w.menu.flash.16777216_3145728.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_3145728.build.flash_length=13623296 +pimoroni_pico_plus_2w.menu.flash.16777216_3145728.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_3145728.build.fs_start=282058752 +pimoroni_pico_plus_2w.menu.flash.16777216_3145728.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_4194304=16MB (Sketch: 12MB, FS: 4MB) +pimoroni_pico_plus_2w.menu.flash.16777216_4194304.upload.maximum_size=12574720 +pimoroni_pico_plus_2w.menu.flash.16777216_4194304.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_4194304.build.flash_length=12574720 +pimoroni_pico_plus_2w.menu.flash.16777216_4194304.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_4194304.build.fs_start=281010176 +pimoroni_pico_plus_2w.menu.flash.16777216_4194304.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_5242880=16MB (Sketch: 11MB, FS: 5MB) +pimoroni_pico_plus_2w.menu.flash.16777216_5242880.upload.maximum_size=11526144 +pimoroni_pico_plus_2w.menu.flash.16777216_5242880.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_5242880.build.flash_length=11526144 +pimoroni_pico_plus_2w.menu.flash.16777216_5242880.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_5242880.build.fs_start=279961600 +pimoroni_pico_plus_2w.menu.flash.16777216_5242880.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_6291456=16MB (Sketch: 10MB, FS: 6MB) +pimoroni_pico_plus_2w.menu.flash.16777216_6291456.upload.maximum_size=10477568 +pimoroni_pico_plus_2w.menu.flash.16777216_6291456.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_6291456.build.flash_length=10477568 +pimoroni_pico_plus_2w.menu.flash.16777216_6291456.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_6291456.build.fs_start=278913024 +pimoroni_pico_plus_2w.menu.flash.16777216_6291456.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_7340032=16MB (Sketch: 9MB, FS: 7MB) +pimoroni_pico_plus_2w.menu.flash.16777216_7340032.upload.maximum_size=9428992 +pimoroni_pico_plus_2w.menu.flash.16777216_7340032.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_7340032.build.flash_length=9428992 +pimoroni_pico_plus_2w.menu.flash.16777216_7340032.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_7340032.build.fs_start=277864448 +pimoroni_pico_plus_2w.menu.flash.16777216_7340032.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_8388608=16MB (Sketch: 8MB, FS: 8MB) +pimoroni_pico_plus_2w.menu.flash.16777216_8388608.upload.maximum_size=8380416 +pimoroni_pico_plus_2w.menu.flash.16777216_8388608.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_8388608.build.flash_length=8380416 +pimoroni_pico_plus_2w.menu.flash.16777216_8388608.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_8388608.build.fs_start=276815872 +pimoroni_pico_plus_2w.menu.flash.16777216_8388608.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_9437184=16MB (Sketch: 7MB, FS: 9MB) +pimoroni_pico_plus_2w.menu.flash.16777216_9437184.upload.maximum_size=7331840 +pimoroni_pico_plus_2w.menu.flash.16777216_9437184.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_9437184.build.flash_length=7331840 +pimoroni_pico_plus_2w.menu.flash.16777216_9437184.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_9437184.build.fs_start=275767296 +pimoroni_pico_plus_2w.menu.flash.16777216_9437184.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_10485760=16MB (Sketch: 6MB, FS: 10MB) +pimoroni_pico_plus_2w.menu.flash.16777216_10485760.upload.maximum_size=6283264 +pimoroni_pico_plus_2w.menu.flash.16777216_10485760.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_10485760.build.flash_length=6283264 +pimoroni_pico_plus_2w.menu.flash.16777216_10485760.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_10485760.build.fs_start=274718720 +pimoroni_pico_plus_2w.menu.flash.16777216_10485760.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_11534336=16MB (Sketch: 5MB, FS: 11MB) +pimoroni_pico_plus_2w.menu.flash.16777216_11534336.upload.maximum_size=5234688 +pimoroni_pico_plus_2w.menu.flash.16777216_11534336.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_11534336.build.flash_length=5234688 +pimoroni_pico_plus_2w.menu.flash.16777216_11534336.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_11534336.build.fs_start=273670144 +pimoroni_pico_plus_2w.menu.flash.16777216_11534336.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_12582912=16MB (Sketch: 4MB, FS: 12MB) +pimoroni_pico_plus_2w.menu.flash.16777216_12582912.upload.maximum_size=4186112 +pimoroni_pico_plus_2w.menu.flash.16777216_12582912.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_12582912.build.flash_length=4186112 +pimoroni_pico_plus_2w.menu.flash.16777216_12582912.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_12582912.build.fs_start=272621568 +pimoroni_pico_plus_2w.menu.flash.16777216_12582912.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_13631488=16MB (Sketch: 3MB, FS: 13MB) +pimoroni_pico_plus_2w.menu.flash.16777216_13631488.upload.maximum_size=3137536 +pimoroni_pico_plus_2w.menu.flash.16777216_13631488.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_13631488.build.flash_length=3137536 +pimoroni_pico_plus_2w.menu.flash.16777216_13631488.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_13631488.build.fs_start=271572992 +pimoroni_pico_plus_2w.menu.flash.16777216_13631488.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_14680064=16MB (Sketch: 2MB, FS: 14MB) +pimoroni_pico_plus_2w.menu.flash.16777216_14680064.upload.maximum_size=2088960 +pimoroni_pico_plus_2w.menu.flash.16777216_14680064.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_14680064.build.flash_length=2088960 +pimoroni_pico_plus_2w.menu.flash.16777216_14680064.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_14680064.build.fs_start=270524416 +pimoroni_pico_plus_2w.menu.flash.16777216_14680064.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_15728640=16MB (Sketch: 1MB, FS: 15MB) +pimoroni_pico_plus_2w.menu.flash.16777216_15728640.upload.maximum_size=1040384 +pimoroni_pico_plus_2w.menu.flash.16777216_15728640.build.flash_total=16777216 +pimoroni_pico_plus_2w.menu.flash.16777216_15728640.build.flash_length=1040384 +pimoroni_pico_plus_2w.menu.flash.16777216_15728640.build.eeprom_start=285204480 +pimoroni_pico_plus_2w.menu.flash.16777216_15728640.build.fs_start=269475840 +pimoroni_pico_plus_2w.menu.flash.16777216_15728640.build.fs_end=285204480 +pimoroni_pico_plus_2w.menu.arch.arm=ARM +pimoroni_pico_plus_2w.menu.arch.arm.build.chip=rp2350 +pimoroni_pico_plus_2w.menu.arch.arm.build.toolchain=arm-none-eabi +pimoroni_pico_plus_2w.menu.arch.arm.build.toolchainpkg=pqt-gcc +pimoroni_pico_plus_2w.menu.arch.arm.build.toolchainopts=-mcpu=cortex-m33 -mthumb -march=armv8-m.main+fp+dsp -mfloat-abi=softfp -mcmse +pimoroni_pico_plus_2w.menu.arch.arm.build.uf2family=--family rp2350-arm-s --abs-block +pimoroni_pico_plus_2w.menu.arch.riscv=RISC-V +pimoroni_pico_plus_2w.menu.arch.riscv.build.chip=rp2350-riscv +pimoroni_pico_plus_2w.menu.arch.riscv.build.toolchain=riscv32-unknown-elf +pimoroni_pico_plus_2w.menu.arch.riscv.build.toolchainpkg=pqt-gcc-riscv +pimoroni_pico_plus_2w.menu.arch.riscv.build.toolchainopts=-march=rv32imac_zicsr_zifencei_zba_zbb_zbs_zbkb -mabi=ilp32 +pimoroni_pico_plus_2w.menu.arch.riscv.build.uf2family=--family rp2350-riscv --abs-block +pimoroni_pico_plus_2w.menu.freq.150=150 MHz +pimoroni_pico_plus_2w.menu.freq.150.build.f_cpu=150000000L +pimoroni_pico_plus_2w.menu.freq.50=50 MHz +pimoroni_pico_plus_2w.menu.freq.50.build.f_cpu=50000000L +pimoroni_pico_plus_2w.menu.freq.100=100 MHz +pimoroni_pico_plus_2w.menu.freq.100.build.f_cpu=100000000L +pimoroni_pico_plus_2w.menu.freq.120=120 MHz +pimoroni_pico_plus_2w.menu.freq.120.build.f_cpu=120000000L +pimoroni_pico_plus_2w.menu.freq.125=125 MHz +pimoroni_pico_plus_2w.menu.freq.125.build.f_cpu=125000000L +pimoroni_pico_plus_2w.menu.freq.128=128 MHz +pimoroni_pico_plus_2w.menu.freq.128.build.f_cpu=128000000L +pimoroni_pico_plus_2w.menu.freq.133=133 MHz +pimoroni_pico_plus_2w.menu.freq.133.build.f_cpu=133000000L +pimoroni_pico_plus_2w.menu.freq.175=175 MHz (Overclock) +pimoroni_pico_plus_2w.menu.freq.175.build.f_cpu=175000000L +pimoroni_pico_plus_2w.menu.freq.200=200 MHz (Overclock) +pimoroni_pico_plus_2w.menu.freq.200.build.f_cpu=200000000L +pimoroni_pico_plus_2w.menu.freq.225=225 MHz (Overclock) +pimoroni_pico_plus_2w.menu.freq.225.build.f_cpu=225000000L +pimoroni_pico_plus_2w.menu.freq.240=240 MHz (Overclock) +pimoroni_pico_plus_2w.menu.freq.240.build.f_cpu=240000000L +pimoroni_pico_plus_2w.menu.freq.250=250 MHz (Overclock) +pimoroni_pico_plus_2w.menu.freq.250.build.f_cpu=250000000L +pimoroni_pico_plus_2w.menu.freq.275=275 MHz (Overclock) +pimoroni_pico_plus_2w.menu.freq.275.build.f_cpu=275000000L +pimoroni_pico_plus_2w.menu.freq.300=300 MHz (Overclock) +pimoroni_pico_plus_2w.menu.freq.300.build.f_cpu=300000000L +pimoroni_pico_plus_2w.menu.opt.Small=Small (-Os) (standard) +pimoroni_pico_plus_2w.menu.opt.Small.build.flags.optimize=-Os +pimoroni_pico_plus_2w.menu.opt.Optimize=Optimize (-O) +pimoroni_pico_plus_2w.menu.opt.Optimize.build.flags.optimize=-O +pimoroni_pico_plus_2w.menu.opt.Optimize2=Optimize More (-O2) +pimoroni_pico_plus_2w.menu.opt.Optimize2.build.flags.optimize=-O2 +pimoroni_pico_plus_2w.menu.opt.Optimize3=Optimize Even More (-O3) +pimoroni_pico_plus_2w.menu.opt.Optimize3.build.flags.optimize=-O3 +pimoroni_pico_plus_2w.menu.opt.Fast=Fast (-Ofast) (maybe slower) +pimoroni_pico_plus_2w.menu.opt.Fast.build.flags.optimize=-Ofast +pimoroni_pico_plus_2w.menu.opt.Debug=Debug (-Og) +pimoroni_pico_plus_2w.menu.opt.Debug.build.flags.optimize=-Og +pimoroni_pico_plus_2w.menu.rtti.Disabled=Disabled +pimoroni_pico_plus_2w.menu.rtti.Disabled.build.flags.rtti=-fno-rtti +pimoroni_pico_plus_2w.menu.rtti.Enabled=Enabled +pimoroni_pico_plus_2w.menu.rtti.Enabled.build.flags.rtti= +pimoroni_pico_plus_2w.menu.stackprotect.Disabled=Disabled +pimoroni_pico_plus_2w.menu.stackprotect.Disabled.build.flags.stackprotect= +pimoroni_pico_plus_2w.menu.stackprotect.Enabled=Enabled +pimoroni_pico_plus_2w.menu.stackprotect.Enabled.build.flags.stackprotect=-fstack-protector +pimoroni_pico_plus_2w.menu.exceptions.Disabled=Disabled +pimoroni_pico_plus_2w.menu.exceptions.Disabled.build.flags.exceptions=-fno-exceptions +pimoroni_pico_plus_2w.menu.exceptions.Disabled.build.flags.libstdcpp=-lstdc++ +pimoroni_pico_plus_2w.menu.exceptions.Enabled=Enabled +pimoroni_pico_plus_2w.menu.exceptions.Enabled.build.flags.exceptions=-fexceptions +pimoroni_pico_plus_2w.menu.exceptions.Enabled.build.flags.libstdcpp=-lstdc++-exc +pimoroni_pico_plus_2w.menu.dbgport.Disabled=Disabled +pimoroni_pico_plus_2w.menu.dbgport.Disabled.build.debug_port= +pimoroni_pico_plus_2w.menu.dbgport.Serial=Serial +pimoroni_pico_plus_2w.menu.dbgport.Serial.build.debug_port=-DDEBUG_RP2040_PORT=Serial +pimoroni_pico_plus_2w.menu.dbgport.Serial1=Serial1 +pimoroni_pico_plus_2w.menu.dbgport.Serial1.build.debug_port=-DDEBUG_RP2040_PORT=Serial1 +pimoroni_pico_plus_2w.menu.dbgport.Serial2=Serial2 +pimoroni_pico_plus_2w.menu.dbgport.Serial2.build.debug_port=-DDEBUG_RP2040_PORT=Serial2 +pimoroni_pico_plus_2w.menu.dbglvl.None=None +pimoroni_pico_plus_2w.menu.dbglvl.None.build.debug_level= +pimoroni_pico_plus_2w.menu.dbglvl.Core=Core +pimoroni_pico_plus_2w.menu.dbglvl.Core.build.debug_level=-DDEBUG_RP2040_CORE +pimoroni_pico_plus_2w.menu.dbglvl.SPI=SPI +pimoroni_pico_plus_2w.menu.dbglvl.SPI.build.debug_level=-DDEBUG_RP2040_SPI +pimoroni_pico_plus_2w.menu.dbglvl.Wire=Wire +pimoroni_pico_plus_2w.menu.dbglvl.Wire.build.debug_level=-DDEBUG_RP2040_WIRE +pimoroni_pico_plus_2w.menu.dbglvl.Bluetooth=Bluetooth +pimoroni_pico_plus_2w.menu.dbglvl.Bluetooth.build.debug_level=-DDEBUG_RP2040_BLUETOOTH +pimoroni_pico_plus_2w.menu.dbglvl.All=All +pimoroni_pico_plus_2w.menu.dbglvl.All.build.debug_level=-DDEBUG_RP2040_WIRE -DDEBUG_RP2040_SPI -DDEBUG_RP2040_CORE -DDEBUG_RP2040_BLUETOOTH +pimoroni_pico_plus_2w.menu.dbglvl.NDEBUG=NDEBUG +pimoroni_pico_plus_2w.menu.dbglvl.NDEBUG.build.debug_level=-DNDEBUG +pimoroni_pico_plus_2w.menu.usbstack.picosdk=Pico SDK +pimoroni_pico_plus_2w.menu.usbstack.picosdk.build.usbstack_flags= +pimoroni_pico_plus_2w.menu.usbstack.tinyusb=Adafruit TinyUSB +pimoroni_pico_plus_2w.menu.usbstack.tinyusb.build.usbstack_flags=-DUSE_TINYUSB "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" +pimoroni_pico_plus_2w.menu.usbstack.tinyusb_host=Adafruit TinyUSB Host (native) +pimoroni_pico_plus_2w.menu.usbstack.tinyusb_host.build.usbstack_flags=-DUSE_TINYUSB -DUSE_TINYUSB_HOST "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" +pimoroni_pico_plus_2w.menu.usbstack.nousb=No USB +pimoroni_pico_plus_2w.menu.usbstack.nousb.build.usbstack_flags="-DNO_USB -DDISABLE_USB_SERIAL -I{runtime.platform.path}/tools/libpico" +pimoroni_pico_plus_2w.menu.wificountry.worldwide=Worldwide +pimoroni_pico_plus_2w.menu.wificountry.worldwide.build.wificc=-DWIFICC=CYW43_COUNTRY_WORLDWIDE +pimoroni_pico_plus_2w.menu.wificountry.australia=Australia +pimoroni_pico_plus_2w.menu.wificountry.australia.build.wificc=-DWIFICC=CYW43_COUNTRY_AUSTRALIA +pimoroni_pico_plus_2w.menu.wificountry.austria=Austria +pimoroni_pico_plus_2w.menu.wificountry.austria.build.wificc=-DWIFICC=CYW43_COUNTRY_AUSTRIA +pimoroni_pico_plus_2w.menu.wificountry.belgium=Belgium +pimoroni_pico_plus_2w.menu.wificountry.belgium.build.wificc=-DWIFICC=CYW43_COUNTRY_BELGIUM +pimoroni_pico_plus_2w.menu.wificountry.brazil=Brazil +pimoroni_pico_plus_2w.menu.wificountry.brazil.build.wificc=-DWIFICC=CYW43_COUNTRY_BRAZIL +pimoroni_pico_plus_2w.menu.wificountry.canada=Canada +pimoroni_pico_plus_2w.menu.wificountry.canada.build.wificc=-DWIFICC=CYW43_COUNTRY_CANADA +pimoroni_pico_plus_2w.menu.wificountry.chile=Chile +pimoroni_pico_plus_2w.menu.wificountry.chile.build.wificc=-DWIFICC=CYW43_COUNTRY_CHILE +pimoroni_pico_plus_2w.menu.wificountry.china=China +pimoroni_pico_plus_2w.menu.wificountry.china.build.wificc=-DWIFICC=CYW43_COUNTRY_CHINA +pimoroni_pico_plus_2w.menu.wificountry.colombia=Colombia +pimoroni_pico_plus_2w.menu.wificountry.colombia.build.wificc=-DWIFICC=CYW43_COUNTRY_COLOMBIA +pimoroni_pico_plus_2w.menu.wificountry.czech_republic=Czech Republic +pimoroni_pico_plus_2w.menu.wificountry.czech_republic.build.wificc=-DWIFICC=CYW43_COUNTRY_CZECH_REPUBLIC +pimoroni_pico_plus_2w.menu.wificountry.denmark=Denmark +pimoroni_pico_plus_2w.menu.wificountry.denmark.build.wificc=-DWIFICC=CYW43_COUNTRY_DENMARK +pimoroni_pico_plus_2w.menu.wificountry.estonia=Estonia +pimoroni_pico_plus_2w.menu.wificountry.estonia.build.wificc=-DWIFICC=CYW43_COUNTRY_ESTONIA +pimoroni_pico_plus_2w.menu.wificountry.finland=Finland +pimoroni_pico_plus_2w.menu.wificountry.finland.build.wificc=-DWIFICC=CYW43_COUNTRY_FINLAND +pimoroni_pico_plus_2w.menu.wificountry.france=France +pimoroni_pico_plus_2w.menu.wificountry.france.build.wificc=-DWIFICC=CYW43_COUNTRY_FRANCE +pimoroni_pico_plus_2w.menu.wificountry.germany=Germany +pimoroni_pico_plus_2w.menu.wificountry.germany.build.wificc=-DWIFICC=CYW43_COUNTRY_GERMANY +pimoroni_pico_plus_2w.menu.wificountry.greece=Greece +pimoroni_pico_plus_2w.menu.wificountry.greece.build.wificc=-DWIFICC=CYW43_COUNTRY_GREECE +pimoroni_pico_plus_2w.menu.wificountry.hong_kong=Hong Kong +pimoroni_pico_plus_2w.menu.wificountry.hong_kong.build.wificc=-DWIFICC=CYW43_COUNTRY_HONG_KONG +pimoroni_pico_plus_2w.menu.wificountry.hungary=Hungary +pimoroni_pico_plus_2w.menu.wificountry.hungary.build.wificc=-DWIFICC=CYW43_COUNTRY_HUNGARY +pimoroni_pico_plus_2w.menu.wificountry.iceland=Iceland +pimoroni_pico_plus_2w.menu.wificountry.iceland.build.wificc=-DWIFICC=CYW43_COUNTRY_ICELAND +pimoroni_pico_plus_2w.menu.wificountry.india=India +pimoroni_pico_plus_2w.menu.wificountry.india.build.wificc=-DWIFICC=CYW43_COUNTRY_INDIA +pimoroni_pico_plus_2w.menu.wificountry.israel=Israel +pimoroni_pico_plus_2w.menu.wificountry.israel.build.wificc=-DWIFICC=CYW43_COUNTRY_ISRAEL +pimoroni_pico_plus_2w.menu.wificountry.italy=Italy +pimoroni_pico_plus_2w.menu.wificountry.italy.build.wificc=-DWIFICC=CYW43_COUNTRY_ITALY +pimoroni_pico_plus_2w.menu.wificountry.japan=Japan +pimoroni_pico_plus_2w.menu.wificountry.japan.build.wificc=-DWIFICC=CYW43_COUNTRY_JAPAN +pimoroni_pico_plus_2w.menu.wificountry.kenya=Kenya +pimoroni_pico_plus_2w.menu.wificountry.kenya.build.wificc=-DWIFICC=CYW43_COUNTRY_KENYA +pimoroni_pico_plus_2w.menu.wificountry.latvia=Latvia +pimoroni_pico_plus_2w.menu.wificountry.latvia.build.wificc=-DWIFICC=CYW43_COUNTRY_LATVIA +pimoroni_pico_plus_2w.menu.wificountry.liechtenstein=Liechtenstein +pimoroni_pico_plus_2w.menu.wificountry.liechtenstein.build.wificc=-DWIFICC=CYW43_COUNTRY_LIECHTENSTEIN +pimoroni_pico_plus_2w.menu.wificountry.lithuania=Lithuania +pimoroni_pico_plus_2w.menu.wificountry.lithuania.build.wificc=-DWIFICC=CYW43_COUNTRY_LITHUANIA +pimoroni_pico_plus_2w.menu.wificountry.luxembourg=Luxembourg +pimoroni_pico_plus_2w.menu.wificountry.luxembourg.build.wificc=-DWIFICC=CYW43_COUNTRY_LUXEMBOURG +pimoroni_pico_plus_2w.menu.wificountry.malaysia=Malaysia +pimoroni_pico_plus_2w.menu.wificountry.malaysia.build.wificc=-DWIFICC=CYW43_COUNTRY_MALAYSIA +pimoroni_pico_plus_2w.menu.wificountry.malta=Malta +pimoroni_pico_plus_2w.menu.wificountry.malta.build.wificc=-DWIFICC=CYW43_COUNTRY_MALTA +pimoroni_pico_plus_2w.menu.wificountry.mexico=Mexico +pimoroni_pico_plus_2w.menu.wificountry.mexico.build.wificc=-DWIFICC=CYW43_COUNTRY_MEXICO +pimoroni_pico_plus_2w.menu.wificountry.netherlands=Netherlands +pimoroni_pico_plus_2w.menu.wificountry.netherlands.build.wificc=-DWIFICC=CYW43_COUNTRY_NETHERLANDS +pimoroni_pico_plus_2w.menu.wificountry.new_zealand=New Zealand +pimoroni_pico_plus_2w.menu.wificountry.new_zealand.build.wificc=-DWIFICC=CYW43_COUNTRY_NEW_ZEALAND +pimoroni_pico_plus_2w.menu.wificountry.nigeria=Nigeria +pimoroni_pico_plus_2w.menu.wificountry.nigeria.build.wificc=-DWIFICC=CYW43_COUNTRY_NIGERIA +pimoroni_pico_plus_2w.menu.wificountry.norway=Norway +pimoroni_pico_plus_2w.menu.wificountry.norway.build.wificc=-DWIFICC=CYW43_COUNTRY_NORWAY +pimoroni_pico_plus_2w.menu.wificountry.peru=Peru +pimoroni_pico_plus_2w.menu.wificountry.peru.build.wificc=-DWIFICC=CYW43_COUNTRY_PERU +pimoroni_pico_plus_2w.menu.wificountry.philippines=Philippines +pimoroni_pico_plus_2w.menu.wificountry.philippines.build.wificc=-DWIFICC=CYW43_COUNTRY_PHILIPPINES +pimoroni_pico_plus_2w.menu.wificountry.poland=Poland +pimoroni_pico_plus_2w.menu.wificountry.poland.build.wificc=-DWIFICC=CYW43_COUNTRY_POLAND +pimoroni_pico_plus_2w.menu.wificountry.portugal=Portugal +pimoroni_pico_plus_2w.menu.wificountry.portugal.build.wificc=-DWIFICC=CYW43_COUNTRY_PORTUGAL +pimoroni_pico_plus_2w.menu.wificountry.singapore=Singapore +pimoroni_pico_plus_2w.menu.wificountry.singapore.build.wificc=-DWIFICC=CYW43_COUNTRY_SINGAPORE +pimoroni_pico_plus_2w.menu.wificountry.slovakia=Slovakia +pimoroni_pico_plus_2w.menu.wificountry.slovakia.build.wificc=-DWIFICC=CYW43_COUNTRY_SLOVAKIA +pimoroni_pico_plus_2w.menu.wificountry.slovenia=Slovenia +pimoroni_pico_plus_2w.menu.wificountry.slovenia.build.wificc=-DWIFICC=CYW43_COUNTRY_SLOVENIA +pimoroni_pico_plus_2w.menu.wificountry.south_africa=South Africa +pimoroni_pico_plus_2w.menu.wificountry.south_africa.build.wificc=-DWIFICC=CYW43_COUNTRY_SOUTH_AFRICA +pimoroni_pico_plus_2w.menu.wificountry.south_korea=South Korea +pimoroni_pico_plus_2w.menu.wificountry.south_korea.build.wificc=-DWIFICC=CYW43_COUNTRY_SOUTH_KOREA +pimoroni_pico_plus_2w.menu.wificountry.spain=Spain +pimoroni_pico_plus_2w.menu.wificountry.spain.build.wificc=-DWIFICC=CYW43_COUNTRY_SPAIN +pimoroni_pico_plus_2w.menu.wificountry.sweden=Sweden +pimoroni_pico_plus_2w.menu.wificountry.sweden.build.wificc=-DWIFICC=CYW43_COUNTRY_SWEDEN +pimoroni_pico_plus_2w.menu.wificountry.switzerland=Switzerland +pimoroni_pico_plus_2w.menu.wificountry.switzerland.build.wificc=-DWIFICC=CYW43_COUNTRY_SWITZERLAND +pimoroni_pico_plus_2w.menu.wificountry.taiwan=Taiwan +pimoroni_pico_plus_2w.menu.wificountry.taiwan.build.wificc=-DWIFICC=CYW43_COUNTRY_TAIWAN +pimoroni_pico_plus_2w.menu.wificountry.thailand=Thailand +pimoroni_pico_plus_2w.menu.wificountry.thailand.build.wificc=-DWIFICC=CYW43_COUNTRY_THAILAND +pimoroni_pico_plus_2w.menu.wificountry.turkey=Turkey +pimoroni_pico_plus_2w.menu.wificountry.turkey.build.wificc=-DWIFICC=CYW43_COUNTRY_TURKEY +pimoroni_pico_plus_2w.menu.wificountry.uk=UK +pimoroni_pico_plus_2w.menu.wificountry.uk.build.wificc=-DWIFICC=CYW43_COUNTRY_UK +pimoroni_pico_plus_2w.menu.wificountry.usa=USA +pimoroni_pico_plus_2w.menu.wificountry.usa.build.wificc=-DWIFICC=CYW43_COUNTRY_USA +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4only=IPv4 Only +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4only.build.libpicow=libipv4.a +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4only.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1 +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4ipv6=IPv4 + IPv6 +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4ipv6.build.libpicow=libipv4-ipv6.a +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4ipv6.build.libpicowdefs=-DLWIP_IPV6=1 -DLWIP_IPV4=1 +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4btcble=IPv4 + Bluetooth +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4btcble.build.libpicow=libipv4-bt.a +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4btcble.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1 -DENABLE_CLASSIC=1 -DENABLE_BLE=1 +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4ipv6btcble=IPv4 + IPv6 + Bluetooth +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4ipv6btcble.build.libpicow=libipv4-ipv6-bt.a +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4ipv6btcble.build.libpicowdefs=-DLWIP_IPV6=1 -DLWIP_IPV4=1 -DENABLE_CLASSIC=1 -DENABLE_BLE=1 +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4onlybig=IPv4 Only - 32K +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4onlybig.build.libpicow=libipv4-big.a +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4onlybig.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1 -D__LWIP_MEMMULT=2 +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4ipv6big=IPv4 + IPv6 - 32K +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4ipv6big.build.libpicow=libipv4-ipv6-big.a +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4ipv6big.build.libpicowdefs=-DLWIP_IPV6=1 -DLWIP_IPV4=1 -D__LWIP_MEMMULT=2 +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4btcblebig=IPv4 + Bluetooth - 32K +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4btcblebig.build.libpicow=libipv4-bt-big.a +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4btcblebig.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1 -DENABLE_CLASSIC=1 -DENABLE_BLE=1 -D__LWIP_MEMMULT=2 +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4ipv6btcblebig=IPv4 + IPv6 + Bluetooth - 32K +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4ipv6btcblebig.build.libpicow=libipv4-ipv6-bt-big.a +pimoroni_pico_plus_2w.menu.ipbtstack.ipv4ipv6btcblebig.build.libpicowdefs=-DLWIP_IPV6=1 -DLWIP_IPV4=1 -DENABLE_CLASSIC=1 -DENABLE_BLE=1 -D__LWIP_MEMMULT=2 +pimoroni_pico_plus_2w.menu.uploadmethod.default=Default (UF2) +pimoroni_pico_plus_2w.menu.uploadmethod.default.build.ram_length=512k +pimoroni_pico_plus_2w.menu.uploadmethod.default.build.debugscript=picoprobe_cmsis_dap.tcl +pimoroni_pico_plus_2w.menu.uploadmethod.default.upload.maximum_data_size=524288 +pimoroni_pico_plus_2w.menu.uploadmethod.default.upload.tool=uf2conv +pimoroni_pico_plus_2w.menu.uploadmethod.default.upload.tool.default=uf2conv +pimoroni_pico_plus_2w.menu.uploadmethod.default.upload.tool.network=uf2conv-network +pimoroni_pico_plus_2w.menu.uploadmethod.picotool=Picotool +pimoroni_pico_plus_2w.menu.uploadmethod.picotool.build.ram_length=512k +pimoroni_pico_plus_2w.menu.uploadmethod.picotool.build.debugscript=picoprobe.tcl +pimoroni_pico_plus_2w.menu.uploadmethod.picotool.build.picodebugflags=-DENABLE_PICOTOOL_USB +pimoroni_pico_plus_2w.menu.uploadmethod.picotool.upload.maximum_data_size=524288 +pimoroni_pico_plus_2w.menu.uploadmethod.picotool.upload.tool=picotool +pimoroni_pico_plus_2w.menu.uploadmethod.picotool.upload.tool.default=picotool +pimoroni_pico_plus_2w.menu.uploadmethod.picoprobe_cmsis_dap=Picoprobe/Debugprobe (CMSIS-DAP) +pimoroni_pico_plus_2w.menu.uploadmethod.picoprobe_cmsis_dap.build.ram_length=512k +pimoroni_pico_plus_2w.menu.uploadmethod.picoprobe_cmsis_dap.build.debugscript=picoprobe_cmsis_dap.tcl +pimoroni_pico_plus_2w.menu.uploadmethod.picoprobe_cmsis_dap.upload.maximum_data_size=524288 +pimoroni_pico_plus_2w.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool=picoprobe_cmsis_dap +pimoroni_pico_plus_2w.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool.default=picoprobe_cmsis_dap + # ----------------------------------- # Pimoroni Plasma2040 # ----------------------------------- @@ -24975,6 +25416,7 @@ sparkfun_thingplusrp2350.build.boot2=none sparkfun_thingplusrp2350.build.usb_manufacturer="SparkFun" sparkfun_thingplusrp2350.build.usb_product="Thing Plus RP2350" sparkfun_thingplusrp2350.build.psram_length=0x800000 +sparkfun_thingplusrp2350.build.extra_flags=-DPICO_CYW43_SUPPORTED=1 sparkfun_thingplusrp2350.menu.flash.16777216_0=16MB (no FS) sparkfun_thingplusrp2350.menu.flash.16777216_0.upload.maximum_size=16769024 sparkfun_thingplusrp2350.menu.flash.16777216_0.build.flash_total=16777216 @@ -25211,6 +25653,110 @@ sparkfun_thingplusrp2350.menu.usbstack.tinyusb_host=Adafruit TinyUSB Host (nativ sparkfun_thingplusrp2350.menu.usbstack.tinyusb_host.build.usbstack_flags=-DUSE_TINYUSB -DUSE_TINYUSB_HOST "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino" sparkfun_thingplusrp2350.menu.usbstack.nousb=No USB sparkfun_thingplusrp2350.menu.usbstack.nousb.build.usbstack_flags="-DNO_USB -DDISABLE_USB_SERIAL -I{runtime.platform.path}/tools/libpico" +sparkfun_thingplusrp2350.menu.wificountry.worldwide=Worldwide +sparkfun_thingplusrp2350.menu.wificountry.worldwide.build.wificc=-DWIFICC=CYW43_COUNTRY_WORLDWIDE +sparkfun_thingplusrp2350.menu.wificountry.australia=Australia +sparkfun_thingplusrp2350.menu.wificountry.australia.build.wificc=-DWIFICC=CYW43_COUNTRY_AUSTRALIA +sparkfun_thingplusrp2350.menu.wificountry.austria=Austria +sparkfun_thingplusrp2350.menu.wificountry.austria.build.wificc=-DWIFICC=CYW43_COUNTRY_AUSTRIA +sparkfun_thingplusrp2350.menu.wificountry.belgium=Belgium +sparkfun_thingplusrp2350.menu.wificountry.belgium.build.wificc=-DWIFICC=CYW43_COUNTRY_BELGIUM +sparkfun_thingplusrp2350.menu.wificountry.brazil=Brazil +sparkfun_thingplusrp2350.menu.wificountry.brazil.build.wificc=-DWIFICC=CYW43_COUNTRY_BRAZIL +sparkfun_thingplusrp2350.menu.wificountry.canada=Canada +sparkfun_thingplusrp2350.menu.wificountry.canada.build.wificc=-DWIFICC=CYW43_COUNTRY_CANADA +sparkfun_thingplusrp2350.menu.wificountry.chile=Chile +sparkfun_thingplusrp2350.menu.wificountry.chile.build.wificc=-DWIFICC=CYW43_COUNTRY_CHILE +sparkfun_thingplusrp2350.menu.wificountry.china=China +sparkfun_thingplusrp2350.menu.wificountry.china.build.wificc=-DWIFICC=CYW43_COUNTRY_CHINA +sparkfun_thingplusrp2350.menu.wificountry.colombia=Colombia +sparkfun_thingplusrp2350.menu.wificountry.colombia.build.wificc=-DWIFICC=CYW43_COUNTRY_COLOMBIA +sparkfun_thingplusrp2350.menu.wificountry.czech_republic=Czech Republic +sparkfun_thingplusrp2350.menu.wificountry.czech_republic.build.wificc=-DWIFICC=CYW43_COUNTRY_CZECH_REPUBLIC +sparkfun_thingplusrp2350.menu.wificountry.denmark=Denmark +sparkfun_thingplusrp2350.menu.wificountry.denmark.build.wificc=-DWIFICC=CYW43_COUNTRY_DENMARK +sparkfun_thingplusrp2350.menu.wificountry.estonia=Estonia +sparkfun_thingplusrp2350.menu.wificountry.estonia.build.wificc=-DWIFICC=CYW43_COUNTRY_ESTONIA +sparkfun_thingplusrp2350.menu.wificountry.finland=Finland +sparkfun_thingplusrp2350.menu.wificountry.finland.build.wificc=-DWIFICC=CYW43_COUNTRY_FINLAND +sparkfun_thingplusrp2350.menu.wificountry.france=France +sparkfun_thingplusrp2350.menu.wificountry.france.build.wificc=-DWIFICC=CYW43_COUNTRY_FRANCE +sparkfun_thingplusrp2350.menu.wificountry.germany=Germany +sparkfun_thingplusrp2350.menu.wificountry.germany.build.wificc=-DWIFICC=CYW43_COUNTRY_GERMANY +sparkfun_thingplusrp2350.menu.wificountry.greece=Greece +sparkfun_thingplusrp2350.menu.wificountry.greece.build.wificc=-DWIFICC=CYW43_COUNTRY_GREECE +sparkfun_thingplusrp2350.menu.wificountry.hong_kong=Hong Kong +sparkfun_thingplusrp2350.menu.wificountry.hong_kong.build.wificc=-DWIFICC=CYW43_COUNTRY_HONG_KONG +sparkfun_thingplusrp2350.menu.wificountry.hungary=Hungary +sparkfun_thingplusrp2350.menu.wificountry.hungary.build.wificc=-DWIFICC=CYW43_COUNTRY_HUNGARY +sparkfun_thingplusrp2350.menu.wificountry.iceland=Iceland +sparkfun_thingplusrp2350.menu.wificountry.iceland.build.wificc=-DWIFICC=CYW43_COUNTRY_ICELAND +sparkfun_thingplusrp2350.menu.wificountry.india=India +sparkfun_thingplusrp2350.menu.wificountry.india.build.wificc=-DWIFICC=CYW43_COUNTRY_INDIA +sparkfun_thingplusrp2350.menu.wificountry.israel=Israel +sparkfun_thingplusrp2350.menu.wificountry.israel.build.wificc=-DWIFICC=CYW43_COUNTRY_ISRAEL +sparkfun_thingplusrp2350.menu.wificountry.italy=Italy +sparkfun_thingplusrp2350.menu.wificountry.italy.build.wificc=-DWIFICC=CYW43_COUNTRY_ITALY +sparkfun_thingplusrp2350.menu.wificountry.japan=Japan +sparkfun_thingplusrp2350.menu.wificountry.japan.build.wificc=-DWIFICC=CYW43_COUNTRY_JAPAN +sparkfun_thingplusrp2350.menu.wificountry.kenya=Kenya +sparkfun_thingplusrp2350.menu.wificountry.kenya.build.wificc=-DWIFICC=CYW43_COUNTRY_KENYA +sparkfun_thingplusrp2350.menu.wificountry.latvia=Latvia +sparkfun_thingplusrp2350.menu.wificountry.latvia.build.wificc=-DWIFICC=CYW43_COUNTRY_LATVIA +sparkfun_thingplusrp2350.menu.wificountry.liechtenstein=Liechtenstein +sparkfun_thingplusrp2350.menu.wificountry.liechtenstein.build.wificc=-DWIFICC=CYW43_COUNTRY_LIECHTENSTEIN +sparkfun_thingplusrp2350.menu.wificountry.lithuania=Lithuania +sparkfun_thingplusrp2350.menu.wificountry.lithuania.build.wificc=-DWIFICC=CYW43_COUNTRY_LITHUANIA +sparkfun_thingplusrp2350.menu.wificountry.luxembourg=Luxembourg +sparkfun_thingplusrp2350.menu.wificountry.luxembourg.build.wificc=-DWIFICC=CYW43_COUNTRY_LUXEMBOURG +sparkfun_thingplusrp2350.menu.wificountry.malaysia=Malaysia +sparkfun_thingplusrp2350.menu.wificountry.malaysia.build.wificc=-DWIFICC=CYW43_COUNTRY_MALAYSIA +sparkfun_thingplusrp2350.menu.wificountry.malta=Malta +sparkfun_thingplusrp2350.menu.wificountry.malta.build.wificc=-DWIFICC=CYW43_COUNTRY_MALTA +sparkfun_thingplusrp2350.menu.wificountry.mexico=Mexico +sparkfun_thingplusrp2350.menu.wificountry.mexico.build.wificc=-DWIFICC=CYW43_COUNTRY_MEXICO +sparkfun_thingplusrp2350.menu.wificountry.netherlands=Netherlands +sparkfun_thingplusrp2350.menu.wificountry.netherlands.build.wificc=-DWIFICC=CYW43_COUNTRY_NETHERLANDS +sparkfun_thingplusrp2350.menu.wificountry.new_zealand=New Zealand +sparkfun_thingplusrp2350.menu.wificountry.new_zealand.build.wificc=-DWIFICC=CYW43_COUNTRY_NEW_ZEALAND +sparkfun_thingplusrp2350.menu.wificountry.nigeria=Nigeria +sparkfun_thingplusrp2350.menu.wificountry.nigeria.build.wificc=-DWIFICC=CYW43_COUNTRY_NIGERIA +sparkfun_thingplusrp2350.menu.wificountry.norway=Norway +sparkfun_thingplusrp2350.menu.wificountry.norway.build.wificc=-DWIFICC=CYW43_COUNTRY_NORWAY +sparkfun_thingplusrp2350.menu.wificountry.peru=Peru +sparkfun_thingplusrp2350.menu.wificountry.peru.build.wificc=-DWIFICC=CYW43_COUNTRY_PERU +sparkfun_thingplusrp2350.menu.wificountry.philippines=Philippines +sparkfun_thingplusrp2350.menu.wificountry.philippines.build.wificc=-DWIFICC=CYW43_COUNTRY_PHILIPPINES +sparkfun_thingplusrp2350.menu.wificountry.poland=Poland +sparkfun_thingplusrp2350.menu.wificountry.poland.build.wificc=-DWIFICC=CYW43_COUNTRY_POLAND +sparkfun_thingplusrp2350.menu.wificountry.portugal=Portugal +sparkfun_thingplusrp2350.menu.wificountry.portugal.build.wificc=-DWIFICC=CYW43_COUNTRY_PORTUGAL +sparkfun_thingplusrp2350.menu.wificountry.singapore=Singapore +sparkfun_thingplusrp2350.menu.wificountry.singapore.build.wificc=-DWIFICC=CYW43_COUNTRY_SINGAPORE +sparkfun_thingplusrp2350.menu.wificountry.slovakia=Slovakia +sparkfun_thingplusrp2350.menu.wificountry.slovakia.build.wificc=-DWIFICC=CYW43_COUNTRY_SLOVAKIA +sparkfun_thingplusrp2350.menu.wificountry.slovenia=Slovenia +sparkfun_thingplusrp2350.menu.wificountry.slovenia.build.wificc=-DWIFICC=CYW43_COUNTRY_SLOVENIA +sparkfun_thingplusrp2350.menu.wificountry.south_africa=South Africa +sparkfun_thingplusrp2350.menu.wificountry.south_africa.build.wificc=-DWIFICC=CYW43_COUNTRY_SOUTH_AFRICA +sparkfun_thingplusrp2350.menu.wificountry.south_korea=South Korea +sparkfun_thingplusrp2350.menu.wificountry.south_korea.build.wificc=-DWIFICC=CYW43_COUNTRY_SOUTH_KOREA +sparkfun_thingplusrp2350.menu.wificountry.spain=Spain +sparkfun_thingplusrp2350.menu.wificountry.spain.build.wificc=-DWIFICC=CYW43_COUNTRY_SPAIN +sparkfun_thingplusrp2350.menu.wificountry.sweden=Sweden +sparkfun_thingplusrp2350.menu.wificountry.sweden.build.wificc=-DWIFICC=CYW43_COUNTRY_SWEDEN +sparkfun_thingplusrp2350.menu.wificountry.switzerland=Switzerland +sparkfun_thingplusrp2350.menu.wificountry.switzerland.build.wificc=-DWIFICC=CYW43_COUNTRY_SWITZERLAND +sparkfun_thingplusrp2350.menu.wificountry.taiwan=Taiwan +sparkfun_thingplusrp2350.menu.wificountry.taiwan.build.wificc=-DWIFICC=CYW43_COUNTRY_TAIWAN +sparkfun_thingplusrp2350.menu.wificountry.thailand=Thailand +sparkfun_thingplusrp2350.menu.wificountry.thailand.build.wificc=-DWIFICC=CYW43_COUNTRY_THAILAND +sparkfun_thingplusrp2350.menu.wificountry.turkey=Turkey +sparkfun_thingplusrp2350.menu.wificountry.turkey.build.wificc=-DWIFICC=CYW43_COUNTRY_TURKEY +sparkfun_thingplusrp2350.menu.wificountry.uk=UK +sparkfun_thingplusrp2350.menu.wificountry.uk.build.wificc=-DWIFICC=CYW43_COUNTRY_UK +sparkfun_thingplusrp2350.menu.wificountry.usa=USA +sparkfun_thingplusrp2350.menu.wificountry.usa.build.wificc=-DWIFICC=CYW43_COUNTRY_USA sparkfun_thingplusrp2350.menu.ipbtstack.ipv4only=IPv4 Only sparkfun_thingplusrp2350.menu.ipbtstack.ipv4only.build.libpicow=libipv4.a sparkfun_thingplusrp2350.menu.ipbtstack.ipv4only.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1 diff --git a/cores/rp2040/RP2040Support.h b/cores/rp2040/RP2040Support.h index 2797707d2..445078e95 100644 --- a/cores/rp2040/RP2040Support.h +++ b/cores/rp2040/RP2040Support.h @@ -465,7 +465,7 @@ class RP2040 { } bool isPicoW() { -#if !defined(ARDUINO_RASPBERRY_PI_PICO_W) +#if !defined(PICO_CYW43_SUPPORTED) return false; #else extern bool __isPicoW; diff --git a/cores/rp2040/cyw43_wrappers.cpp b/cores/rp2040/cyw43_wrappers.cpp index 9ac0b9604..ee98930ab 100644 --- a/cores/rp2040/cyw43_wrappers.cpp +++ b/cores/rp2040/cyw43_wrappers.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if defined(ARDUINO_RASPBERRY_PI_PICO_W) +#if defined(PICO_CYW43_SUPPORTED) #include extern "C" { @@ -25,6 +25,12 @@ extern "C" { #include } #include +#include +#include +#include +#include +#include +#include #include // From cyw43_ctrl.c @@ -101,4 +107,100 @@ extern "C" void __wrap_cyw43_cb_tcpip_deinit(cyw43_t *self, int itf) { (void) itf; } +#ifndef WIFICC +#define WIFICC CYW43_COUNTRY_WORLDWIDE +#endif + +// Taken from https://datasheets.raspberrypi.com/picow/connecting-to-the-internet-with-pico-w.pdf +// also discussion in https://github.com/earlephilhower/arduino-pico/issues/849 +static bool CheckPicoW() { +#ifdef PICO_RP2040 + adc_init(); + auto dir = gpio_get_dir(29); + auto fnc = gpio_get_function(29); + adc_gpio_init(29); + adc_select_input(3); + auto adc29 = adc_read(); + gpio_set_function(29, fnc); + gpio_set_dir(29, dir); + + dir = gpio_get_dir(25); + fnc = gpio_get_function(25); + gpio_init(25); + gpio_set_dir(25, GPIO_IN); + auto gp25 = gpio_get(25); + gpio_set_function(25, fnc); + gpio_set_dir(25, dir); + + if (gp25) { + return true; // Can't tell, so assume yes + } else if (adc29 < 200) { + return true; // PicoW + } else { + return false; + } +#else + return true; +#endif +} + +bool __isPicoW = true; + +extern "C" void init_cyw43_wifi() { + __isPicoW = CheckPicoW(); + if (__isPicoW) { + // Fix for overclocked CPU: SPI communication breaks down with default "div by 2" speed + // So, divide clock by 4 for anything including and above 250MHz CPU frequency. + if (clock_get_hz(clk_sys) >= 250000000) { + cyw43_set_pio_clock_divisor(4, 0); // div by 4.0 + } + cyw43_arch_init_with_country(WIFICC); + } +} + +extern "C" void __lockBluetooth() { + async_context_acquire_lock_blocking(cyw43_arch_async_context()); +} + +extern "C" void __unlockBluetooth() { + async_context_release_lock(cyw43_arch_async_context()); +} + +extern "C" void __pinMode(pin_size_t pin, PinMode mode); +extern "C" void __digitalWrite(pin_size_t pin, PinStatus val); +extern "C" PinStatus __digitalRead(pin_size_t pin); + +extern "C" void cyw43_pinMode(pin_size_t pin, PinMode mode) { + if (!__isPicoW && (pin == PIN_LED)) { + pin = 25; // Silently swap in the Pico's LED + } + if (pin < 64) { + __pinMode(pin, mode); + } else { + // TBD - There is no GPIO direction control in the driver + } +} + +extern "C" void cyw43_digitalWrite(pin_size_t pin, PinStatus val) { + if (!__isPicoW && (pin == PIN_LED)) { + pin = 25; // Silently swap in the Pico's LED + } + if (pin < 64) { + __digitalWrite(pin, val); + } else { + cyw43_arch_gpio_put(pin - 64, val == HIGH ? 1 : 0); + } +} + +extern "C" PinStatus cyw43_digitalRead(pin_size_t pin) { + if (!__isPicoW && (pin == PIN_LED)) { + pin = 25; // Silently swap in the Pico's LED + } + if (pin < 64) { + return __digitalRead(pin); + } else { + return cyw43_arch_gpio_get(pin - 64) ? HIGH : LOW; + } +} + #endif diff --git a/cores/rp2040/cyw43_wrappers.h b/cores/rp2040/cyw43_wrappers.h new file mode 100644 index 000000000..46d8a48c2 --- /dev/null +++ b/cores/rp2040/cyw43_wrappers.h @@ -0,0 +1,32 @@ +/* + CYW43 TCP/Ethernet wrappers + Copyright (c) 2023 Earle F. Philhower, III + + 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 +*/ + +#pragma once + +#include + +extern bool __isPicoW; +extern "C" { + void init_cyw43_wifi(); + void __lockBluetooth(); + void __unlockBluetooth(); + void cyw43_pinMode(pin_size_t pin, PinMode mode); + void cyw43_digitalWrite(pin_size_t pin, PinStatus val); + PinStatus cyw43_digitalRead(pin_size_t pin); +} diff --git a/cores/rp2040/lwip_wrap.cpp b/cores/rp2040/lwip_wrap.cpp index ad190fbb1..97f271db3 100644 --- a/cores/rp2040/lwip_wrap.cpp +++ b/cores/rp2040/lwip_wrap.cpp @@ -26,9 +26,7 @@ #include #include #include -#ifdef PICO_RP2040 #include -#endif #include #include #include "_xoshiro.h" @@ -46,7 +44,7 @@ class LWIPMutex { if (ethernet_arch_lwip_gpio_mask) { ethernet_arch_lwip_gpio_mask(); } -#if defined(ARDUINO_RASPBERRY_PI_PICO_W) +#if defined(PICO_CYW43_SUPPORTED) if (rp2040.isPicoW()) { cyw43_arch_lwip_begin(); return; @@ -60,7 +58,7 @@ class LWIPMutex { } ~LWIPMutex() { -#if defined(ARDUINO_RASPBERRY_PI_PICO_W) +#if defined(PICO_CYW43_SUPPORTED) if (rp2040.isPicoW()) { cyw43_arch_lwip_end(); } else { @@ -70,7 +68,7 @@ class LWIPMutex { } else { recursive_mutex_exit(&__lwipMutex); } -#if defined(ARDUINO_RASPBERRY_PI_PICO_W) +#if defined(PICO_CYW43_SUPPORTED) } #endif if (ethernet_arch_lwip_gpio_unmask) { diff --git a/include/lwipopts.h b/include/lwipopts.h index ac9875c23..9ec17c56a 100644 --- a/include/lwipopts.h +++ b/include/lwipopts.h @@ -29,7 +29,6 @@ extern unsigned long __lwip_rand(void); #define MEM_SIZE (__LWIP_MEMMULT * 16384) #define MEMP_NUM_TCP_SEG (32) #define MEMP_NUM_ARP_QUEUE (10) -//#define MEMP_NUM_SYS_TIMEOUT (LWIP_NUM_SYS_TIMEOUT_INTERNAL + 4) #define PBUF_POOL_SIZE (__LWIP_MEMMULT > 1 ? 32 : 24) #define LWIP_ARP 5 #define LWIP_ETHERNET 1 diff --git a/include/rp2040/pico_base/pico/version.h b/include/rp2040/pico_base/pico/version.h index 70a103759..4fe70f4e6 100644 --- a/include/rp2040/pico_base/pico/version.h +++ b/include/rp2040/pico_base/pico/version.h @@ -13,7 +13,7 @@ #define PICO_SDK_VERSION_MAJOR 2 #define PICO_SDK_VERSION_MINOR 0 -#define PICO_SDK_VERSION_REVISION 0 -#define PICO_SDK_VERSION_STRING "2.0.0" +#define PICO_SDK_VERSION_REVISION 1 +#define PICO_SDK_VERSION_STRING "2.0.1-develop" #endif diff --git a/include/rp2350/pico_base/pico/version.h b/include/rp2350/pico_base/pico/version.h index 70a103759..4fe70f4e6 100644 --- a/include/rp2350/pico_base/pico/version.h +++ b/include/rp2350/pico_base/pico/version.h @@ -13,7 +13,7 @@ #define PICO_SDK_VERSION_MAJOR 2 #define PICO_SDK_VERSION_MINOR 0 -#define PICO_SDK_VERSION_REVISION 0 -#define PICO_SDK_VERSION_STRING "2.0.0" +#define PICO_SDK_VERSION_REVISION 1 +#define PICO_SDK_VERSION_STRING "2.0.1-develop" #endif diff --git a/lib/core_inc.txt b/lib/core_inc.txt index 86a38fb24..826591b08 100644 --- a/lib/core_inc.txt +++ b/lib/core_inc.txt @@ -15,6 +15,7 @@ -iwithprefixbefore/pico-sdk/src/common/pico_util/include -iwithprefixbefore/pico-sdk/src/common/pico_stdlib_headers/include -iwithprefixbefore/pico-sdk/src/common/pico_usb_reset_interface_headers/include +-iwithprefixbefore/pico-sdk/src/rp2_common/boot_bootrom_headers/include -iwithprefixbefore/pico-sdk/src/rp2_common/cmsis/include -iwithprefixbefore/pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include -iwithprefixbefore/pico-sdk/src/rp2_common/hardware_adc/include @@ -47,6 +48,7 @@ -iwithprefixbefore/pico-sdk/src/rp2_common/pico_bootrom/include -iwithprefixbefore/pico-sdk/src/rp2_common/pico_double/include -iwithprefixbefore/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/include +-iwithprefixbefore/pico-sdk/src/rp2_common/pico_flash/include -iwithprefixbefore/pico-sdk/src/rp2_common/pico_float/include -iwithprefixbefore/pico-sdk/src/rp2_common/pico_int64_ops/include -iwithprefixbefore/pico-sdk/src/rp2_common/pico_lwip/include diff --git a/lib/rp2040/libipv4-big.a b/lib/rp2040/libipv4-big.a index b2398a1d8..c7d5ab7f5 100644 Binary files a/lib/rp2040/libipv4-big.a and b/lib/rp2040/libipv4-big.a differ diff --git a/lib/rp2040/libipv4-bt-big.a b/lib/rp2040/libipv4-bt-big.a index e0f4baa7d..6889e5a93 100644 Binary files a/lib/rp2040/libipv4-bt-big.a and b/lib/rp2040/libipv4-bt-big.a differ diff --git a/lib/rp2040/libipv4-bt.a b/lib/rp2040/libipv4-bt.a index 1e07fa553..9de17b52a 100644 Binary files a/lib/rp2040/libipv4-bt.a and b/lib/rp2040/libipv4-bt.a differ diff --git a/lib/rp2040/libipv4-ipv6-big.a b/lib/rp2040/libipv4-ipv6-big.a index 0db53a937..a32737dc3 100644 Binary files a/lib/rp2040/libipv4-ipv6-big.a and b/lib/rp2040/libipv4-ipv6-big.a differ diff --git a/lib/rp2040/libipv4-ipv6-bt-big.a b/lib/rp2040/libipv4-ipv6-bt-big.a index 901067575..bca92e33b 100644 Binary files a/lib/rp2040/libipv4-ipv6-bt-big.a and b/lib/rp2040/libipv4-ipv6-bt-big.a differ diff --git a/lib/rp2040/libipv4-ipv6-bt.a b/lib/rp2040/libipv4-ipv6-bt.a index 1cb85f032..9c690d871 100644 Binary files a/lib/rp2040/libipv4-ipv6-bt.a and b/lib/rp2040/libipv4-ipv6-bt.a differ diff --git a/lib/rp2040/libipv4-ipv6.a b/lib/rp2040/libipv4-ipv6.a index 9bdb3d978..817f57330 100644 Binary files a/lib/rp2040/libipv4-ipv6.a and b/lib/rp2040/libipv4-ipv6.a differ diff --git a/lib/rp2040/libipv4.a b/lib/rp2040/libipv4.a index 96217885c..ef37026cc 100644 Binary files a/lib/rp2040/libipv4.a and b/lib/rp2040/libipv4.a differ diff --git a/lib/rp2040/libpico.a b/lib/rp2040/libpico.a index 494bd7ec5..e6021ec6a 100644 Binary files a/lib/rp2040/libpico.a and b/lib/rp2040/libpico.a differ diff --git a/lib/rp2040/platform_def.txt b/lib/rp2040/platform_def.txt index 5461ebfd4..53cd7980b 100644 --- a/lib/rp2040/platform_def.txt +++ b/lib/rp2040/platform_def.txt @@ -1,5 +1,6 @@ -DPICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 -DCYW43_LWIP=1 +-DCYW43_PIO_CLOCK_DIV_DYNAMIC=1 -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DARM_MATH_CM0_FAMILY -DARM_MATH_CM0_PLUS diff --git a/lib/rp2350-riscv/libipv4-big.a b/lib/rp2350-riscv/libipv4-big.a index ee01d604d..f106b5250 100644 Binary files a/lib/rp2350-riscv/libipv4-big.a and b/lib/rp2350-riscv/libipv4-big.a differ diff --git a/lib/rp2350-riscv/libipv4-bt-big.a b/lib/rp2350-riscv/libipv4-bt-big.a new file mode 100644 index 000000000..ec60056fb Binary files /dev/null and b/lib/rp2350-riscv/libipv4-bt-big.a differ diff --git a/lib/rp2350-riscv/libipv4-bt.a b/lib/rp2350-riscv/libipv4-bt.a new file mode 100644 index 000000000..99c40ef11 Binary files /dev/null and b/lib/rp2350-riscv/libipv4-bt.a differ diff --git a/lib/rp2350-riscv/libipv4-ipv6-big.a b/lib/rp2350-riscv/libipv4-ipv6-big.a index 6174832b4..d316bcc7c 100644 Binary files a/lib/rp2350-riscv/libipv4-ipv6-big.a and b/lib/rp2350-riscv/libipv4-ipv6-big.a differ diff --git a/lib/rp2350-riscv/libipv4-ipv6-bt-big.a b/lib/rp2350-riscv/libipv4-ipv6-bt-big.a new file mode 100644 index 000000000..b928aeedd Binary files /dev/null and b/lib/rp2350-riscv/libipv4-ipv6-bt-big.a differ diff --git a/lib/rp2350-riscv/libipv4-ipv6-bt.a b/lib/rp2350-riscv/libipv4-ipv6-bt.a new file mode 100644 index 000000000..a2f2f3b53 Binary files /dev/null and b/lib/rp2350-riscv/libipv4-ipv6-bt.a differ diff --git a/lib/rp2350-riscv/libipv4-ipv6.a b/lib/rp2350-riscv/libipv4-ipv6.a index fb770b218..273aed108 100644 Binary files a/lib/rp2350-riscv/libipv4-ipv6.a and b/lib/rp2350-riscv/libipv4-ipv6.a differ diff --git a/lib/rp2350-riscv/libipv4.a b/lib/rp2350-riscv/libipv4.a index 96ecf85ff..b7011653c 100644 Binary files a/lib/rp2350-riscv/libipv4.a and b/lib/rp2350-riscv/libipv4.a differ diff --git a/lib/rp2350-riscv/libpico.a b/lib/rp2350-riscv/libpico.a index 6cbb175ed..eb6113782 100644 Binary files a/lib/rp2350-riscv/libpico.a and b/lib/rp2350-riscv/libpico.a differ diff --git a/lib/rp2350-riscv/platform_def.txt b/lib/rp2350-riscv/platform_def.txt index e14d8b16e..3c03c8715 100644 --- a/lib/rp2350-riscv/platform_def.txt +++ b/lib/rp2350-riscv/platform_def.txt @@ -1,3 +1,6 @@ +-DPICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 +-DCYW43_LWIP=1 +-DCYW43_PIO_CLOCK_DIV_DYNAMIC=1 -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DCFG_TUSB_OS=OPT_OS_PICO -DLIB_BOOT_STAGE2_HEADERS=1 diff --git a/lib/rp2350-riscv/platform_inc.txt b/lib/rp2350-riscv/platform_inc.txt index 4bb47cda7..290cb376b 100644 --- a/lib/rp2350-riscv/platform_inc.txt +++ b/lib/rp2350-riscv/platform_inc.txt @@ -8,3 +8,11 @@ -iwithprefixbefore/pico-sdk/src/rp2_common/hardware_hazard3/include -iwithprefixbefore/pico-sdk/src/rp2_common/hardware_sha256/include -iwithprefixbefore/pico-sdk/src/rp2_common/pico_sha256/include +-iwithprefixbefore/pico-sdk/src/rp2_common/pico_btstack/include +-iwithprefixbefore/pico-sdk/src/rp2_common/pico_cyw43_arch/include +-iwithprefixbefore/pico-sdk/src/rp2_common/pico_cyw43_driver/include +-iwithprefixbefore/pico-sdk/lib/cyw43-driver/src +-iwithprefixbefore/pico-sdk/lib/btstack/src +-iwithprefixbefore/pico-sdk/lib/btstack/3rd-party/bluedroid/decoder/include +-iwithprefixbefore/pico-sdk/lib/btstack/3rd-party/bluedroid/encoder/include +-iwithprefixbefore/pico-sdk/lib/btstack/platform/embedded diff --git a/lib/rp2350/libipv4-big.a b/lib/rp2350/libipv4-big.a index b13797fcc..83c6a0769 100644 Binary files a/lib/rp2350/libipv4-big.a and b/lib/rp2350/libipv4-big.a differ diff --git a/lib/rp2350/libipv4-bt-big.a b/lib/rp2350/libipv4-bt-big.a new file mode 100644 index 000000000..133a466f5 Binary files /dev/null and b/lib/rp2350/libipv4-bt-big.a differ diff --git a/lib/rp2350/libipv4-bt.a b/lib/rp2350/libipv4-bt.a new file mode 100644 index 000000000..40ce8dca1 Binary files /dev/null and b/lib/rp2350/libipv4-bt.a differ diff --git a/lib/rp2350/libipv4-ipv6-big.a b/lib/rp2350/libipv4-ipv6-big.a index 56f1d38bc..7fa052367 100644 Binary files a/lib/rp2350/libipv4-ipv6-big.a and b/lib/rp2350/libipv4-ipv6-big.a differ diff --git a/lib/rp2350/libipv4-ipv6-bt-big.a b/lib/rp2350/libipv4-ipv6-bt-big.a new file mode 100644 index 000000000..a94eba868 Binary files /dev/null and b/lib/rp2350/libipv4-ipv6-bt-big.a differ diff --git a/lib/rp2350/libipv4-ipv6-bt.a b/lib/rp2350/libipv4-ipv6-bt.a new file mode 100644 index 000000000..0e2848b47 Binary files /dev/null and b/lib/rp2350/libipv4-ipv6-bt.a differ diff --git a/lib/rp2350/libipv4-ipv6.a b/lib/rp2350/libipv4-ipv6.a index c979be81c..41f331481 100644 Binary files a/lib/rp2350/libipv4-ipv6.a and b/lib/rp2350/libipv4-ipv6.a differ diff --git a/lib/rp2350/libipv4.a b/lib/rp2350/libipv4.a index 2ba2becc3..c9e1ac3f9 100644 Binary files a/lib/rp2350/libipv4.a and b/lib/rp2350/libipv4.a differ diff --git a/lib/rp2350/libpico.a b/lib/rp2350/libpico.a index efcf588e3..3c86d3d80 100644 Binary files a/lib/rp2350/libpico.a and b/lib/rp2350/libpico.a differ diff --git a/lib/rp2350/platform_def.txt b/lib/rp2350/platform_def.txt index 460f837ed..f4135acf1 100644 --- a/lib/rp2350/platform_def.txt +++ b/lib/rp2350/platform_def.txt @@ -1,3 +1,6 @@ +-DPICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 +-DCYW43_LWIP=1 +-DCYW43_PIO_CLOCK_DIV_DYNAMIC=1 -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DCFG_TUSB_OS=OPT_OS_PICO -DLIB_BOOT_STAGE2_HEADERS=1 diff --git a/lib/rp2350/platform_inc.txt b/lib/rp2350/platform_inc.txt index 8ed910c03..1567da252 100644 --- a/lib/rp2350/platform_inc.txt +++ b/lib/rp2350/platform_inc.txt @@ -6,3 +6,11 @@ -iwithprefixbefore/pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Device/RP2350/Include -iwithprefixbefore/pico-sdk/src/rp2_common/hardware_sha256/include -iwithprefixbefore/pico-sdk/src/rp2_common/pico_sha256/include +-iwithprefixbefore/pico-sdk/src/rp2_common/pico_btstack/include +-iwithprefixbefore/pico-sdk/src/rp2_common/pico_cyw43_arch/include +-iwithprefixbefore/pico-sdk/src/rp2_common/pico_cyw43_driver/include +-iwithprefixbefore/pico-sdk/lib/cyw43-driver/src +-iwithprefixbefore/pico-sdk/lib/btstack/src +-iwithprefixbefore/pico-sdk/lib/btstack/3rd-party/bluedroid/decoder/include +-iwithprefixbefore/pico-sdk/lib/btstack/3rd-party/bluedroid/encoder/include +-iwithprefixbefore/pico-sdk/lib/btstack/platform/embedded diff --git a/libraries/FreeRTOS/examples/Multicore-FreeRTOS/Multicore-FreeRTOS.ino b/libraries/FreeRTOS/examples/Multicore-FreeRTOS/Multicore-FreeRTOS.ino index 71ab988d1..c4cd6329c 100644 --- a/libraries/FreeRTOS/examples/Multicore-FreeRTOS/Multicore-FreeRTOS.ino +++ b/libraries/FreeRTOS/examples/Multicore-FreeRTOS/Multicore-FreeRTOS.ino @@ -53,7 +53,7 @@ void setup() { TaskHandle_t blinkTask; Serial.begin(115200); xTaskCreate(blink, "BLINK", 256, nullptr, 1, &blinkTask); -#ifdef ARDUINO_RASPBERRY_PI_PICO_W +#if defined(PICO_CYW43_SUPPORTED) // The PicoW WiFi chip controls the LED, and only core 0 can make calls to it safely vTaskCoreAffinitySet(blinkTask, 1 << 0); #endif diff --git a/libraries/FreeRTOS/examples/StaticMulticore-FreeRTOS/StaticMulticore-FreeRTOS.ino b/libraries/FreeRTOS/examples/StaticMulticore-FreeRTOS/StaticMulticore-FreeRTOS.ino index 35e277c73..2e8cef17d 100644 --- a/libraries/FreeRTOS/examples/StaticMulticore-FreeRTOS/StaticMulticore-FreeRTOS.ino +++ b/libraries/FreeRTOS/examples/StaticMulticore-FreeRTOS/StaticMulticore-FreeRTOS.ino @@ -47,12 +47,12 @@ void setup() { xSemaphore = xSemaphoreCreateMutexStatic( &xMutexBuffer ); ledOnTask = xTaskCreateStatic(led_ON, "led_ON", STACK_SIZE, NULL, configMAX_PRIORITIES - 1, xStack_A, &xTaskBuffer_A); -#ifdef ARDUINO_RASPBERRY_PI_PICO_W +#if defined(PICO_CYW43_SUPPORTED) // The PicoW WiFi chip controls the LED, and only core 0 can make calls to it safely vTaskCoreAffinitySet(ledOnTask, 1 << 0); #endif ledOffTask = xTaskCreateStatic(led_OFF, "led_OFF", STACK_SIZE, NULL, configMAX_PRIORITIES - 1, xStack_B, &xTaskBuffer_B); -#ifdef ARDUINO_RASPBERRY_PI_PICO_W +#if defined(PICO_CYW43_SUPPORTED) // The PicoW WiFi chip controls the LED, and only core 0 can make calls to it safely vTaskCoreAffinitySet(ledOffTask, 1 << 0); #endif diff --git a/libraries/WiFi/src/WiFiClass.cpp b/libraries/WiFi/src/WiFiClass.cpp index 9e812c5bc..8b9d7d13e 100644 --- a/libraries/WiFi/src/WiFiClass.cpp +++ b/libraries/WiFi/src/WiFiClass.cpp @@ -29,7 +29,7 @@ // This is the real WiFi network object, we just tickle it to do our magic #include -#ifdef ARDUINO_RASPBERRY_PI_PICO_W +#if defined(PICO_CYW43_SUPPORTED) #include static CYW43lwIP _wifi(1); #elif defined(ESPHOSTSPI) @@ -204,7 +204,7 @@ uint8_t WiFiClass::beginAP(const char *ssid, const char* passphrase) { return WL_CONNECTED; } -#ifdef ARDUINO_RASPBERRY_PI_PICO_W +#if defined(PICO_CYW43_SUPPORTED) uint8_t WiFiClass::softAPgetStationNum() { if (!_apMode || !_wifiHWInitted) { return 0; @@ -324,7 +324,7 @@ void WiFiClass::end(void) { return: pointer to uint8_t array with length WL_MAC_ADDR_LENGTH */ uint8_t* WiFiClass::macAddress(uint8_t* mac) { -#ifdef ARDUINO_RASPBERRY_PI_PICO_W +#if defined(PICO_CYW43_SUPPORTED) if (!_wifiHWInitted) { _apMode = false; cyw43_wifi_set_up(&cyw43_state, _apMode ? 1 : 0, true, CYW43_COUNTRY_WORLDWIDE); @@ -423,7 +423,7 @@ uint8_t WiFiClass::encryptionType() { int8_t WiFiClass::scanNetworks(bool async) { if (!_wifiHWInitted) { _apMode = false; -#ifdef ARDUINO_RASPBERRY_PI_PICO_W +#if defined(PICO_CYW43_SUPPORTED) cyw43_arch_enable_sta_mode(); #endif _wifiHWInitted = true; @@ -519,7 +519,7 @@ unsigned long WiFiClass::getTime() { return millis(); } -#ifdef ARDUINO_RASPBERRY_PI_PICO_W +#if defined(PICO_CYW43_SUPPORTED) void WiFiClass::aggressiveLowPowerMode() { cyw43_wifi_pm(&cyw43_state, CYW43_AGGRESSIVE_PM); } diff --git a/libraries/WiFi/src/WiFiClass.h b/libraries/WiFi/src/WiFiClass.h index 0bdcae095..ae77700d0 100644 --- a/libraries/WiFi/src/WiFiClass.h +++ b/libraries/WiFi/src/WiFiClass.h @@ -23,7 +23,7 @@ #pragma once #include -#ifdef ARDUINO_RASPBERRY_PI_PICO_W +#if defined(PICO_CYW43_SUPPORTED) #include #elif defined(ESPHOSTSPI) #include @@ -158,7 +158,7 @@ class WiFiClass { return true; } -#ifdef ARDUINO_RASPBERRY_PI_PICO_W +#if defined(PICO_CYW43_SUPPORTED) uint8_t softAPgetStationNum(); #endif @@ -405,7 +405,7 @@ class WiFiClass { unsigned long getTime(); -#ifdef ARDUINO_RASPBERRY_PI_PICO_W +#if defined(PICO_CYW43_SUPPORTED) void aggressiveLowPowerMode(); void defaultLowPowerMode(); #endif diff --git a/libraries/lwIP_Ethernet/src/LwipEthernet.cpp b/libraries/lwIP_Ethernet/src/LwipEthernet.cpp index 2702e5576..55ff47105 100644 --- a/libraries/lwIP_Ethernet/src/LwipEthernet.cpp +++ b/libraries/lwIP_Ethernet/src/LwipEthernet.cpp @@ -22,7 +22,7 @@ #include #include #include -#if defined(ARDUINO_RASPBERRY_PI_PICO_W) +#if defined(PICO_CYW43_SUPPORTED) #include #endif #include @@ -41,7 +41,7 @@ static async_context_t *_context = nullptr; static std::map> _handlePacketList; void ethernet_arch_lwip_begin() { -#if defined(ARDUINO_RASPBERRY_PI_PICO_W) +#if defined(PICO_CYW43_SUPPORTED) if (rp2040.isPicoW()) { cyw43_arch_lwip_begin(); return; @@ -51,7 +51,7 @@ void ethernet_arch_lwip_begin() { } void ethernet_arch_lwip_end() { -#if defined(ARDUINO_RASPBERRY_PI_PICO_W) +#if defined(PICO_CYW43_SUPPORTED) if (rp2040.isPicoW()) { cyw43_arch_lwip_end(); return; @@ -187,7 +187,7 @@ static void ethernet_timeout_reached(__unused async_context_t *context, __unused for (auto handlePacket : _handlePacketList) { handlePacket.second(); } -#if defined(ARDUINO_RASPBERRY_PI_PICO_W) +#if defined(PICO_CYW43_SUPPORTED) if (!rp2040.isPicoW()) { sys_check_timeouts(); } @@ -207,7 +207,7 @@ void __startEthernetContext() { if (__ethernetContextInitted) { return; } -#if defined(ARDUINO_RASPBERRY_PI_PICO_W) +#if defined(PICO_CYW43_SUPPORTED) if (rp2040.isPicoW()) { _context = cyw43_arch_async_context(); } else { diff --git a/package/package_pico_index.template.json b/package/package_pico_index.template.json index 41284cb3b..34578d6ee 100644 --- a/package/package_pico_index.template.json +++ b/package/package_pico_index.template.json @@ -233,6 +233,9 @@ { "name": "Pimoroni PicoPlus2" }, + { + "name": "Pimoroni PicoPlus2W" + }, { "name": "Pimoroni Plasma2040" }, diff --git a/pico-sdk b/pico-sdk index efe2103f9..1b64cac8d 160000 --- a/pico-sdk +++ b/pico-sdk @@ -1 +1 @@ -Subproject commit efe2103f9b28458a1615ff096054479743ade236 +Subproject commit 1b64cac8d697cdfda50527dfcff58c083f55429b diff --git a/tools/json/pimoroni_pico_plus_2w.json b/tools/json/pimoroni_pico_plus_2w.json new file mode 100644 index 000000000..fa081ced9 --- /dev/null +++ b/tools/json/pimoroni_pico_plus_2w.json @@ -0,0 +1,56 @@ +{ + "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "none.S", + "usb_vid": "0x2E8A", + "usb_pid": "0x100A" + } + }, + "core": "earlephilhower", + "cpu": "cortex-m33", + "extra_flags": "-DARDUINO_PIMORONI_PICO_PLUS_2W -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500 -DPICO_CYW43_SUPPORTED=1", + "f_cpu": "150000000L", + "hwids": [ + [ + "0x2E8A", + "0x00C0" + ], + [ + "0x2E8A", + "0x100A" + ] + ], + "mcu": "rp2350", + "variant": "pimoroni_pico_plus_2w" + }, + "debug": { + "jlink_device": "RP2350_0", + "openocd_target": "rp2350.cfg", + "svd_path": "rp2350.svd" + }, + "frameworks": [ + "arduino" + ], + "name": "PicoPlus2W", + "upload": { + "maximum_ram_size": 524288, + "maximum_size": 16777216, + "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" + ], + "psram_length": 8388608 + }, + "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", + "vendor": "Pimoroni" +} \ No newline at end of file diff --git a/tools/json/rpipicow.json b/tools/json/rpipicow.json index 883e2fc67..a31b1c18c 100644 --- a/tools/json/rpipicow.json +++ b/tools/json/rpipicow.json @@ -9,7 +9,7 @@ }, "core": "earlephilhower", "cpu": "cortex-m0plus", - "extra_flags": "-DARDUINO_RASPBERRY_PI_PICO_W -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250 ", + "extra_flags": "-DARDUINO_RASPBERRY_PI_PICO_W -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250 -DPICO_CYW43_SUPPORTED=1", "f_cpu": "133000000L", "hwids": [ [ diff --git a/tools/json/sparkfun_thingplusrp2350.json b/tools/json/sparkfun_thingplusrp2350.json index 0f9fdaf17..e2d263cc2 100644 --- a/tools/json/sparkfun_thingplusrp2350.json +++ b/tools/json/sparkfun_thingplusrp2350.json @@ -9,7 +9,7 @@ }, "core": "earlephilhower", "cpu": "cortex-m33", - "extra_flags": "-DARDUINO_SPARKFUN_THINGPLUS_RP2350 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250 ", + "extra_flags": "-DARDUINO_SPARKFUN_THINGPLUS_RP2350 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250 -DPICO_CYW43_SUPPORTED=1", "f_cpu": "150000000L", "hwids": [ [ diff --git a/tools/libpico/CMakeLists.txt b/tools/libpico/CMakeLists.txt index a47943f03..dea244379 100644 --- a/tools/libpico/CMakeLists.txt +++ b/tools/libpico/CMakeLists.txt @@ -3,20 +3,18 @@ cmake_minimum_required(VERSION 3.12) set(cpu $ENV{CPU}) message("Building for CPU ${cpu}") +set(PICO_CYW43_SUPPORTED 1) if (${cpu} MATCHES "rp2040") # Enable PicoW driver support. Compatible with standard Pico set(PICO_BOARD pico_w) set(PICO_PLATFORM rp2040) - set(PICO_CYW43_SUPPORTED 1) elseif(${cpu} MATCHES "rp2350$") set(PICO_BOARD solderparty_rp2350_stamp_xl) # Pico2 sets to RP2350A which disables all code for RP2350B set(PICO_PLATFORM rp2350) - set(PICO_CYW43_SUPPORTED 0) elseif(${cpu} MATCHES "rp2350-riscv$") message(INFO "Building RISCV") set(PICO_BOARD solderparty_rp2350_stamp_xl) # Pico2 sets to RP2350A which disables all code for RP2350B set(PICO_PLATFORM rp2350-riscv) - set(PICO_CYW43_SUPPORTED 0) else() message(FATAL_ERROR "Unknown CPU, '${cpu}'") endif() @@ -50,13 +48,10 @@ if (${cpu} MATCHES "rp2040") PICO_RP2040_B0_SUPPORTED=1 PICO_RP2040_B1_SUPPORTED=1 PICO_RP2040_B2_SUPPORTED=1 - PICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 - CYW43_WARN=// PICO_XOSC_STARTUP_DELAY_MULTIPLIER=64 PICO_FLOAT_SUPPORT_ROM_V1=1 PICO_DOUBLE_SUPPORT_ROM_V1=1 - PICO_RP2040=1 - PICO_CYW43_SUPPORTED=1) + PICO_RP2040=1) elseif (${cpu} MATCHES "rp2350") set(xcd CFG_TUSB_DEBUG=0 @@ -110,6 +105,15 @@ elseif (${cpu} MATCHES "rp2350") PICO_RP2040_USB_DEVICE_UFRAME_FIX=1 PICO_RP2350=1 PICO_USE_BLOCKED_RAM=0 + + CYW43_PIN_WL_DYNAMIC=1 + CYW43_DEFAULT_PIN_WL_REG_ON=23u + CYW43_DEFAULT_PIN_WL_DATA_OUT=24u + CYW43_DEFAULT_PIN_WL_DATA_IN=24u + CYW43_DEFAULT_PIN_WL_HOST_WAKE=24u + CYW43_DEFAULT_PIN_WL_CLOCK=29u + CYW43_DEFAULT_PIN_WL_CS=25u + ${xcda}) endif() @@ -130,11 +134,14 @@ target_compile_definitions(common-${cpu} INTERFACE LWIP_UDP=1 LWIP_IGMP=1 LWIP_CHECKSUM_CTRL_PER_NETIF=1 + PICO_CYW43_SUPPORTED=1 + PICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 + CYW43_WARN=// + CYW43_PIO_CLOCK_DIV_DYNAMIC=1 ${xcd} ${ppp} ) - target_compile_options(common-${cpu} INTERFACE -fno-exceptions -Os @@ -219,16 +226,16 @@ target_compile_definitions(ipv4-big-${cpu} PUBLIC LWIP_IPV6=0 ) -if (${cpu} MATCHES "rp2040") - set(xll pico_cyw43_driver cyw43_driver cyw43_driver_picow pico_cyw43_driver pico_cyw43_arch pico_cyw43_arch_threadsafe_background) -elseif(${cpu} MATCHES "rp2350") - set(xll) -endif() set(picow_link_libraries common-${cpu} + cyw43_driver + cyw43_driver_picow pico_async_context pico_async_context_threadsafe_background - ${xll} + pico_cyw43_driver + pico_cyw43_driver + pico_cyw43_arch + pico_cyw43_arch_threadsafe_background pico_lwip pico_lwip_nosys pico_lwip_sntp @@ -263,64 +270,57 @@ target_link_libraries(ipv4-ipv6-big-${cpu} ${picow_link_libraries} ) -if(${cpu} MATCHES "rp2040") - add_library(ipv4-bt-${cpu} STATIC) - target_compile_definitions(ipv4-bt-${cpu} PUBLIC - LWIP_IPV6=0 - ) +add_library(ipv4-bt-${cpu} STATIC) +target_compile_definitions(ipv4-bt-${cpu} PUBLIC + LWIP_IPV6=0 +) - add_library(ipv4-bt-big-${cpu} STATIC) - target_compile_definitions(ipv4-bt-${cpu} PUBLIC - __LWIP_MEMMULT=2 - LWIP_IPV6=0 - ) +add_library(ipv4-bt-big-${cpu} STATIC) +target_compile_definitions(ipv4-bt-${cpu} PUBLIC + __LWIP_MEMMULT=2 + LWIP_IPV6=0 +) - set(picow_bt_link_libraries - pico_btstack_cyw43 - pico_btstack_ble - pico_btstack_classic - pico_btstack_sbc_encoder - pico_btstack_sbc_decoder - ) +set(picow_bt_link_libraries + pico_btstack_cyw43 + pico_btstack_ble + pico_btstack_classic + pico_btstack_sbc_encoder + pico_btstack_sbc_decoder +) - target_link_libraries(ipv4-bt-${cpu} - ${picow_link_libraries} - ${picow_bt_link_libraries} - ) +target_link_libraries(ipv4-bt-${cpu} + ${picow_link_libraries} + ${picow_bt_link_libraries} +) - target_link_libraries(ipv4-bt-big-${cpu} - ${picow_link_libraries} - ${picow_bt_link_libraries} - ) +target_link_libraries(ipv4-bt-big-${cpu} + ${picow_link_libraries} + ${picow_bt_link_libraries} +) - add_library(ipv4-ipv6-bt-${cpu} STATIC) - target_compile_definitions(ipv4-ipv6-bt-${cpu} PUBLIC - LWIP_IPV6=1 - ) +add_library(ipv4-ipv6-bt-${cpu} STATIC) +target_compile_definitions(ipv4-ipv6-bt-${cpu} PUBLIC + LWIP_IPV6=1 +) - add_library(ipv4-ipv6-bt-big-${cpu} STATIC) - target_compile_definitions(ipv4-ipv6-bt-big-${cpu} PUBLIC - __LWIP_MEMMULT=2 - LWIP_IPV6=1 - ) +add_library(ipv4-ipv6-bt-big-${cpu} STATIC) +target_compile_definitions(ipv4-ipv6-bt-big-${cpu} PUBLIC + __LWIP_MEMMULT=2 + LWIP_IPV6=1 +) - target_link_libraries(ipv4-ipv6-bt-${cpu} - ${picow_link_libraries} - ${picow_bt_link_libraries} - ) +target_link_libraries(ipv4-ipv6-bt-${cpu} + ${picow_link_libraries} + ${picow_bt_link_libraries} +) - target_link_libraries(ipv4-ipv6-bt-big-${cpu} - ${picow_link_libraries} - ${picow_bt_link_libraries} - ) -endif() +target_link_libraries(ipv4-ipv6-bt-big-${cpu} + ${picow_link_libraries} + ${picow_bt_link_libraries} +) -if(${cpu} MATCHES "rp2040") - set(tx ipv4-bt ipv4-ipv6-bt ipv4-bt-big ipv4-ipv6-bt-big) -elseif(${cpu} MATCHES "rp2350") - set(tx) -endif() -foreach(tgt pico ipv4 ipv4-ipv6 ipv4-big ipv4-ipv6-big ${tx}) +foreach(tgt pico ipv4 ipv4-ipv6 ipv4-big ipv4-ipv6-big ipv4-bt ipv4-ipv6-bt ipv4-bt-big ipv4-ipv6-bt-big) add_custom_command(TARGET ${tgt}-${cpu} POST_BUILD COMMAND ar d lib${tgt}-${cpu}.a stdio.c.obj stdio_uart.c.obj stdio_usb.c.obj stdio_usb_descriptors.c.obj pico_malloc.c.obj newlib_interface.c.obj COMMAND ar d lib${tgt}-${cpu}.a btstack_flash_bank.c.obj # Need to override with our own implementation diff --git a/tools/libpico/make-libpico.sh b/tools/libpico/make-libpico.sh index 7c380d129..37d379cdf 100755 --- a/tools/libpico/make-libpico.sh +++ b/tools/libpico/make-libpico.sh @@ -6,6 +6,7 @@ set -x export PICO_SDK_PATH="$(cd ../../pico-sdk/; pwd)" export PATH="$(cd ../../system/arm-none-eabi/bin; pwd):$PATH" export PATH="$(cd ../../system/riscv32-unknown-elf/bin; pwd):$PATH" +export PATH="$(cd ../../system/picotool; pwd):$PATH" rm -rf build-rp2040 mkdir build-rp2040 diff --git a/tools/makeboards.py b/tools/makeboards.py index b4e68e9dc..522663862 100755 --- a/tools/makeboards.py +++ b/tools/makeboards.py @@ -358,7 +358,7 @@ def MakeBoard(name, chip, vendor_name, product_name, vid, pid, pwr, boarddefine, BuildDebugPort(name) BuildDebugLevel(name) BuildUSBStack(name) - if name == "rpipicow": + if name in ["rpipicow", "pimoroni_pico_plus_2w", "sparkfun_thingplusrp2350"]: BuildCountry(name) BuildIPBTStack(name) if name == "generic": @@ -476,7 +476,7 @@ def MakeBoardJSON(name, chip, vendor_name, product_name, vid, pid, pwr, boarddef # Raspberry Pi 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") +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"]) MakeBoard("rpipico2", "rp2350", "Raspberry Pi", "Pico 2", "0x2e8a", "0x000f", 250, "RASPBERRY_PI_PICO_2", 4, 0, "none") # 0xCB @@ -600,11 +600,12 @@ def MakeBoardJSON(name, chip, vendor_name, product_name, vid, pid, pwr, boarddef MakeBoard("pimoroni_pga2040", "rp2040", "Pimoroni", "PGA2040", "0x2e8a", "0x1008", 250, "PIMORONI_PGA2040", 8, 0, "boot2_w25q64jv_4_padded_checksum") MakeBoard("pimoroni_pga2350", "rp2350", "Pimoroni", "PGA2350", "0x2e8a", "0x1018", 250, "PIMORONI_PGA2350", 16, 8, "none") MakeBoard("pimoroni_pico_plus_2", "rp2350", "Pimoroni", "PicoPlus2", "0x2e8a", "0x100a", 500, "PIMORONI_PICO_PLUS_2", 16, 8, "none") +MakeBoard("pimoroni_pico_plus_2w", "rp2350", "Pimoroni", "PicoPlus2W", "0x2e8a", "0x100a", 500, "PIMORONI_PICO_PLUS_2W", 16, 8, "none", ["PICO_CYW43_SUPPORTED=1"]) MakeBoard("pimoroni_plasma2040", "rp2040", "Pimoroni", "Plasma2040", "0x2e8a", "0x100a", 500, "PIMORONI_PLASMA2040", 2, 0, "boot2_w25q080_2_padded_checksum") MakeBoard("pimoroni_tiny2040", "rp2040", "Pimoroni", "Tiny2040", "0x2e8a", "0x100a", 500, "PIMORONI_TINY2040", 2, 0, "boot2_w25q64jv_4_padded_checksum") MakeBoard("pimoroni_tiny2350", "rp2350", "Pimoroni", "Tiny2350", "0x2e8a", "0x100b", 500, "PIMORONI_TINY2350", 4, 0, "none") -#Pintronix +# Pintronix MakeBoard("pintronix_pinmax", "rp2040", "Pintronix", "PinMax", "0x2e8a", "0x9101", 250, "PINTRONIX_PINMAX", 4, 0, "boot2_w25q080_2_padded_checksum") # RAKwireless @@ -630,7 +631,7 @@ def MakeBoardJSON(name, chip, vendor_name, product_name, vid, pid, pwr, boarddef MakeBoard("sparkfun_promicrorp2040", "rp2040", "SparkFun", "ProMicro RP2040", "0x1b4f", "0x0026", 250, "SPARKFUN_PROMICRO_RP2040", 16, 0, "boot2_generic_03h_4_padded_checksum") MakeBoard("sparkfun_promicrorp2350", "rp2350", "SparkFun", "ProMicro RP2350", "0x1b4f", "0x0026", 250, "SPARKFUN_PROMICRO_RP2350", 16, 8, "none") MakeBoard("sparkfun_thingplusrp2040", "rp2040", "SparkFun", "Thing Plus RP2040", "0x1b4f", "0x0026", 250, "SPARKFUN_THINGPLUS_RP2040", 16, 0, "boot2_w25q080_2_padded_checksum") -MakeBoard("sparkfun_thingplusrp2350", "rp2350", "SparkFun", "Thing Plus RP2350", "0x1b4f", "0x0038", 250, "SPARKFUN_THINGPLUS_RP2350", 16, 8, "none") +MakeBoard("sparkfun_thingplusrp2350", "rp2350", "SparkFun", "Thing Plus RP2350", "0x1b4f", "0x0038", 250, "SPARKFUN_THINGPLUS_RP2350", 16, 8, "none", ["PICO_CYW43_SUPPORTED=1"]) # Upesy MakeBoard("upesy_rp2040_devkit", "rp2040", "uPesy", "RP2040 DevKit", "0x2e8a", "0x1007", 250, "UPESY_RP2040_DEVKIT", 2, 0, "boot2_w25q080_2_padded_checksum") diff --git a/tools/platformio-build.py b/tools/platformio-build.py index 4345b35ca..026b9589a 100755 --- a/tools/platformio-build.py +++ b/tools/platformio-build.py @@ -363,6 +363,7 @@ def configure_network_flags(cpp_defines): env.Append(CPPDEFINES=[ ("PICO_CYW43_ARCH_THREADSAFE_BACKGROUND", 1), ("CYW43_LWIP", 1), + ("CYW43_PIO_CLOCK_DIV_DYNAMIC", 1), ("LWIP_IPV4", 1), ("LWIP_IGMP", 1), ("LWIP_CHECKSUM_CTRL_PER_NETIF", 1) diff --git a/variants/rpipicow/picow_digital.cpp b/variants/pimoroni_pico_plus_2w/digital.cpp similarity index 53% rename from variants/rpipicow/picow_digital.cpp rename to variants/pimoroni_pico_plus_2w/digital.cpp index 468791162..2dc7a878e 100644 --- a/variants/rpipicow/picow_digital.cpp +++ b/variants/pimoroni_pico_plus_2w/digital.cpp @@ -18,43 +18,16 @@ */ #include "Arduino.h" -#include - -extern "C" void __pinMode(pin_size_t pin, PinMode mode); -extern "C" void __digitalWrite(pin_size_t pin, PinStatus val); -extern "C" PinStatus __digitalRead(pin_size_t pin); - -extern bool __isPicoW; +#include extern "C" void pinMode(pin_size_t pin, PinMode mode) { - if (!__isPicoW && (pin == PIN_LED)) { - pin = 25; // Silently swap in the Pico's LED - } - if (pin < 32) { - __pinMode(pin, mode); - } else { - // TBD - There is no GPIO direction control in the driver - } + cyw43_pinMode(pin, mode); } extern "C" void digitalWrite(pin_size_t pin, PinStatus val) { - if (!__isPicoW && (pin == PIN_LED)) { - pin = 25; // Silently swap in the Pico's LED - } - if (pin < 32) { - __digitalWrite(pin, val); - } else { - cyw43_arch_gpio_put(pin - 32, val == HIGH ? 1 : 0); - } + cyw43_digitalWrite(pin, val); } extern "C" PinStatus digitalRead(pin_size_t pin) { - if (!__isPicoW && (pin == PIN_LED)) { - pin = 25; // Silently swap in the Pico's LED - } - if (pin < 32) { - return __digitalRead(pin); - } else { - return cyw43_arch_gpio_get(pin - 32) ? HIGH : LOW; - } + return cyw43_digitalRead(pin); } diff --git a/variants/pimoroni_pico_plus_2w/init.cpp b/variants/pimoroni_pico_plus_2w/init.cpp new file mode 100644 index 000000000..568ccdca8 --- /dev/null +++ b/variants/pimoroni_pico_plus_2w/init.cpp @@ -0,0 +1,25 @@ +/* + Initialize the Pico W WiFi driver + + Copyright (c) 2022 Earle F. Philhower, III + + 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 + +extern "C" void initVariant() { + init_cyw43_wifi(); +} diff --git a/variants/pimoroni_pico_plus_2w/pins_arduino.h b/variants/pimoroni_pico_plus_2w/pins_arduino.h new file mode 100644 index 000000000..04a8fb405 --- /dev/null +++ b/variants/pimoroni_pico_plus_2w/pins_arduino.h @@ -0,0 +1,100 @@ +#pragma once + +#include + +#include + +// Pin definitions taken from: +// https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf +// https://shop.pimoroni.com/products/pimoroni-pico-plus-2 + +#define PINS_COUNT (33u) +#define NUM_DIGITAL_PINS (33u) +#define NUM_ANALOG_INPUTS (3u) +#define NUM_ANALOG_OUTPUTS (0u) +#define ADC_RESOLUTION (12u) + +// LED_BUILTIN +#define PIN_LED (64u) +#define LED_BUILTIN PIN_LED + +// 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 (32u) +#define PIN_SPI0_MOSI (35u) +#define PIN_SPI0_SCK (34u) +#define PIN_SPI0_SS (33u) + +#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 (6u) +#define PIN_WIRE1_SCL (7u) + +#define SERIAL_HOWMANY (3u) +#define SPI_HOWMANY (2u) +#define WIRE_HOWMANY (2u) + +// PSRAM +#define RP2350_PSRAM_CS (47u) +#define RP2350_PSRAM_MAX_SCK_HZ (109*1000*1000) + +#define PICO_RP2350B 1 + +/* Pins mappings for marked pins on the board */ +static const uint8_t D0 = (0u); +static const uint8_t D1 = (1u); +static const uint8_t D2 = (2u); +static const uint8_t D3 = (3u); +static const uint8_t D4 = (4u); +static const uint8_t D5 = (5u); +static const uint8_t D6 = (6u); +static const uint8_t D7 = (7u); +static const uint8_t D8 = (8u); +static const uint8_t D9 = (9u); +static const uint8_t D10 = (10u); +static const uint8_t D11 = (11u); +static const uint8_t D12 = (12u); +static const uint8_t D13 = (13u); +static const uint8_t D14 = (14u); +static const uint8_t D15 = (15u); +static const uint8_t D16 = (16u); +static const uint8_t D17 = (17u); +static const uint8_t D18 = (18u); +static const uint8_t D19 = (19u); +static const uint8_t D20 = (20u); +static const uint8_t D21 = (21u); +static const uint8_t D22 = (22u); + +static const uint8_t D26 = (40u); +static const uint8_t D27 = (41u); +static const uint8_t D28 = (42u); + +static const uint8_t A0 = (40u); +static const uint8_t A1 = (41u); +static const uint8_t A2 = (42u); + +static const uint8_t A3 = (43u); + +static const uint8_t SS = PIN_SPI0_SS; +static const uint8_t MOSI = PIN_SPI0_MOSI; +static const uint8_t MISO = PIN_SPI0_MISO; +static const uint8_t SCK = PIN_SPI0_SCK; + +static const uint8_t SDA = PIN_WIRE0_SDA; +static const uint8_t SCL = PIN_WIRE0_SCL; + +static const uint8_t RX = PIN_SERIAL1_RX; +static const uint8_t TX = PIN_SERIAL1_TX; diff --git a/variants/rpipicow/digital.cpp b/variants/rpipicow/digital.cpp new file mode 100644 index 000000000..2dc7a878e --- /dev/null +++ b/variants/rpipicow/digital.cpp @@ -0,0 +1,33 @@ +/* + pinMode and digitalRead/Write for the Raspberry Pi Pico W RP2040 + Copyright (c) 2022 Earle F. Philhower, III + + 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 + +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); +} diff --git a/variants/rpipicow/init.cpp b/variants/rpipicow/init.cpp new file mode 100644 index 000000000..568ccdca8 --- /dev/null +++ b/variants/rpipicow/init.cpp @@ -0,0 +1,25 @@ +/* + Initialize the Pico W WiFi driver + + Copyright (c) 2022 Earle F. Philhower, III + + 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 + +extern "C" void initVariant() { + init_cyw43_wifi(); +} diff --git a/variants/rpipicow/picow_init.cpp b/variants/rpipicow/picow_init.cpp deleted file mode 100644 index 1a2e77d67..000000000 --- a/variants/rpipicow/picow_init.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - Initialize the Pico W WiFi driver - - Copyright (c) 2022 Earle F. Philhower, III - - 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 -#include -#include "hardware/resets.h" -#include "hardware/gpio.h" -#include "hardware/adc.h" - -#ifndef WIFICC -#define WIFICC CYW43_COUNTRY_WORLDWIDE -#endif - -// Taken from https://datasheets.raspberrypi.com/picow/connecting-to-the-internet-with-pico-w.pdf -// also discussion in https://github.com/earlephilhower/arduino-pico/issues/849 -static bool CheckPicoW() { - adc_init(); - auto dir = gpio_get_dir(29); - auto fnc = gpio_get_function(29); - adc_gpio_init(29); - adc_select_input(3); - auto adc29 = adc_read(); - gpio_set_function(29, fnc); - gpio_set_dir(29, dir); - - dir = gpio_get_dir(25); - fnc = gpio_get_function(25); - gpio_init(25); - gpio_set_dir(25, GPIO_IN); - auto gp25 = gpio_get(25); - gpio_set_function(25, fnc); - gpio_set_dir(25, dir); - - if (gp25) { - return true; // Can't tell, so assume yes - } else if (adc29 < 200) { - return true; // PicoW - } else { - return false; - } -} - -bool __isPicoW = true; - -extern "C" void initVariant() { - __isPicoW = CheckPicoW(); - if (__isPicoW) { - cyw43_arch_init_with_country(WIFICC); - } -} - -extern "C" void __lockBluetooth() { - async_context_acquire_lock_blocking(cyw43_arch_async_context()); -} - -extern "C" void __unlockBluetooth() { - async_context_release_lock(cyw43_arch_async_context()); -} diff --git a/variants/rpipicow/pins_arduino.h b/variants/rpipicow/pins_arduino.h index 863afa1ce..639ae582d 100644 --- a/variants/rpipicow/pins_arduino.h +++ b/variants/rpipicow/pins_arduino.h @@ -3,19 +3,10 @@ // Pin definitions taken from: // https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf -extern bool __isPicoW; - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus -extern void __lockBluetooth(); -extern void __unlockBluetooth(); -#ifdef __cplusplus -}; // extern "C" -#endif // __cplusplus +#include // LEDs -#define PIN_LED (32u) +#define PIN_LED (64u) // Serial #define PIN_SERIAL1_TX (0u) diff --git a/variants/sparkfun_thingplusrp2350/digital.cpp b/variants/sparkfun_thingplusrp2350/digital.cpp new file mode 100644 index 000000000..2dc7a878e --- /dev/null +++ b/variants/sparkfun_thingplusrp2350/digital.cpp @@ -0,0 +1,33 @@ +/* + pinMode and digitalRead/Write for the Raspberry Pi Pico W RP2040 + Copyright (c) 2022 Earle F. Philhower, III + + 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 + +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); +} diff --git a/variants/sparkfun_thingplusrp2350/init.cpp b/variants/sparkfun_thingplusrp2350/init.cpp new file mode 100644 index 000000000..568ccdca8 --- /dev/null +++ b/variants/sparkfun_thingplusrp2350/init.cpp @@ -0,0 +1,25 @@ +/* + Initialize the Pico W WiFi driver + + Copyright (c) 2022 Earle F. Philhower, III + + 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 + +extern "C" void initVariant() { + init_cyw43_wifi(); +} diff --git a/variants/sparkfun_thingplusrp2350/pins_arduino.h b/variants/sparkfun_thingplusrp2350/pins_arduino.h index 991b2de54..5b8d1a0c3 100644 --- a/variants/sparkfun_thingplusrp2350/pins_arduino.h +++ b/variants/sparkfun_thingplusrp2350/pins_arduino.h @@ -1,7 +1,9 @@ #pragma once +#include + // LEDs -#define PIN_LED (32u) +#define PIN_LED (64u) #define PIN_NEOPIXEL (14) #define NUM_NEOPIXEL (1)