diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index e2e38cf..b24ad69 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -10,8 +10,7 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] example: - "examples/arduino-blink" - - "examples/arduino-blink" - - "examples/arduino-blink-earlephilhower" + - "examples/arduino-external-libs" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 diff --git a/boards/adafruit_feather.json b/boards/adafruit_feather.json index dec96a6..46c114d 100644 --- a/boards/adafruit_feather.json +++ b/boards/adafruit_feather.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "adafruit_feather", "arduino": { "earlephilhower": { - "variant": "adafruit_feather", "boot2_source": "boot2_w25x10cl_4_padded_checksum.S", "usb_vid": "0x239a", - "usb_pid": "0x80f1", - "usb_manufacturer": "Adafruit", - "usb_product": "Feather RP2040" + "usb_pid": "0x80f1" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Adafruit" -} \ No newline at end of file +} diff --git a/boards/adafruit_itsybitsy.json b/boards/adafruit_itsybitsy.json index 14622dd..3119dac 100644 --- a/boards/adafruit_itsybitsy.json +++ b/boards/adafruit_itsybitsy.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "adafruit_itsybitsy", "arduino": { "earlephilhower": { - "variant": "adafruit_itsybitsy", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x239a", - "usb_pid": "0x80fd", - "usb_manufacturer": "Adafruit", - "usb_product": "ItsyBitsy RP2040" + "usb_pid": "0x80fd" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Adafruit" -} \ No newline at end of file +} diff --git a/boards/adafruit_kb2040.json b/boards/adafruit_kb2040.json index 4be755f..d77f37a 100644 --- a/boards/adafruit_kb2040.json +++ b/boards/adafruit_kb2040.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "adafruit_kb2040", "arduino": { "earlephilhower": { - "variant": "adafruit_kb2040", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x239a", - "usb_pid": "0x8105", - "usb_manufacturer": "Adafruit", - "usb_product": "KB2040" + "usb_pid": "0x8105" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Adafruit" -} \ No newline at end of file +} diff --git a/boards/adafruit_macropad2040.json b/boards/adafruit_macropad2040.json index c066254..34c7a12 100644 --- a/boards/adafruit_macropad2040.json +++ b/boards/adafruit_macropad2040.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "adafruit_macropad2040", "arduino": { "earlephilhower": { - "variant": "adafruit_macropad2040", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x239a", - "usb_pid": "0x8107", - "usb_manufacturer": "Adafruit", - "usb_product": "MacroPad RP2040" + "usb_pid": "0x8107" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Adafruit" -} \ No newline at end of file +} diff --git a/boards/adafruit_qtpy.json b/boards/adafruit_qtpy.json index 21f09fa..f372308 100644 --- a/boards/adafruit_qtpy.json +++ b/boards/adafruit_qtpy.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "adafruit_qtpy", "arduino": { "earlephilhower": { - "variant": "adafruit_qtpy", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x239a", - "usb_pid": "0x80f7", - "usb_manufacturer": "Adafruit", - "usb_product": "QT Py RP2040" + "usb_pid": "0x80f7" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Adafruit" -} \ No newline at end of file +} diff --git a/boards/adafruit_stemmafriend.json b/boards/adafruit_stemmafriend.json index 89a8f0c..d9c1667 100644 --- a/boards/adafruit_stemmafriend.json +++ b/boards/adafruit_stemmafriend.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "adafruit_stemmafriend", "arduino": { "earlephilhower": { - "variant": "adafruit_stemmafriend", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x239a", - "usb_pid": "0x80e3", - "usb_manufacturer": "Adafruit", - "usb_product": "STEMMA Friend RP2040" + "usb_pid": "0x80e3" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Adafruit" -} \ No newline at end of file +} diff --git a/boards/adafruit_trinkeyrp2040qt.json b/boards/adafruit_trinkeyrp2040qt.json index 6c873c9..3472ccc 100644 --- a/boards/adafruit_trinkeyrp2040qt.json +++ b/boards/adafruit_trinkeyrp2040qt.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "adafruit_trinkeyrp2040qt", "arduino": { "earlephilhower": { - "variant": "adafruit_trinkeyrp2040qt", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x239a", - "usb_pid": "0x8109", - "usb_manufacturer": "Adafruit", - "usb_product": "Trinkey RP2040 QT" + "usb_pid": "0x8109" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Adafruit" -} \ No newline at end of file +} diff --git a/boards/arduino_nano_connect.json b/boards/arduino_nano_connect.json index a294f93..a8235e0 100644 --- a/boards/arduino_nano_connect.json +++ b/boards/arduino_nano_connect.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "arduino_nano_connect", "arduino": { "earlephilhower": { - "variant": "arduino_nano_connect", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2341", - "usb_pid": "0x0058", - "usb_manufacturer": "Arduino", - "usb_product": "Nano RP2040 Connect" + "usb_pid": "0x0058" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Arduino" -} \ No newline at end of file +} diff --git a/boards/challenger_2040_lora.json b/boards/challenger_2040_lora.json index e47abf4..7e75c39 100644 --- a/boards/challenger_2040_lora.json +++ b/boards/challenger_2040_lora.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "challenger_2040_lora", "arduino": { "earlephilhower": { - "variant": "challenger_2040_lora", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x1023", - "usb_manufacturer": "iLabs", - "usb_product": "Challenger 2040 LoRa" + "usb_pid": "0x1023" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "iLabs" -} \ No newline at end of file +} diff --git a/boards/challenger_2040_lte.json b/boards/challenger_2040_lte.json index 7b5991b..5e59e2d 100644 --- a/boards/challenger_2040_lte.json +++ b/boards/challenger_2040_lte.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "challenger_2040_lte", "arduino": { "earlephilhower": { - "variant": "challenger_2040_lte", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x100b", - "usb_manufacturer": "iLabs", - "usb_product": "Challenger 2040 LTE" + "usb_pid": "0x100b" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "iLabs" -} \ No newline at end of file +} diff --git a/boards/challenger_2040_wifi.json b/boards/challenger_2040_wifi.json index 5111111..e286c81 100644 --- a/boards/challenger_2040_wifi.json +++ b/boards/challenger_2040_wifi.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "challenger_2040_wifi", "arduino": { "earlephilhower": { - "variant": "challenger_2040_wifi", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x1006", - "usb_manufacturer": "iLabs", - "usb_product": "Challenger 2040 WiFi" + "usb_pid": "0x1006" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "iLabs" -} \ No newline at end of file +} diff --git a/boards/challenger_2040_wifi_ble.json b/boards/challenger_2040_wifi_ble.json index b7f1783..78cfefa 100644 --- a/boards/challenger_2040_wifi_ble.json +++ b/boards/challenger_2040_wifi_ble.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "challenger_2040_wifi_ble", "arduino": { "earlephilhower": { - "variant": "challenger_2040_wifi_ble", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x102C", - "usb_manufacturer": "iLabs", - "usb_product": "Challenger 2040 WiFi/BLE" + "usb_pid": "0x102C" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "iLabs" -} \ No newline at end of file +} diff --git a/boards/challenger_nb_2040_wifi.json b/boards/challenger_nb_2040_wifi.json index b1ee114..8adff86 100644 --- a/boards/challenger_nb_2040_wifi.json +++ b/boards/challenger_nb_2040_wifi.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "challenger_nb_2040_wifi", "arduino": { "earlephilhower": { - "variant": "challenger_nb_2040_wifi", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x100b", - "usb_manufacturer": "iLabs", - "usb_product": "Challenger NB 2040 WiFi" + "usb_pid": "0x100b" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "iLabs" -} \ No newline at end of file +} diff --git a/boards/cytron_maker_nano_rp2040.json b/boards/cytron_maker_nano_rp2040.json index cb7314c..2b78995 100644 --- a/boards/cytron_maker_nano_rp2040.json +++ b/boards/cytron_maker_nano_rp2040.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "cytron_maker_nano_rp2040", "arduino": { "earlephilhower": { - "variant": "cytron_maker_nano_rp2040", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x100f", - "usb_manufacturer": "Cytron", - "usb_product": "Maker Nano RP2040" + "usb_pid": "0x100f" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Cytron" -} \ No newline at end of file +} diff --git a/boards/cytron_maker_pi_rp2040.json b/boards/cytron_maker_pi_rp2040.json index d5ed15c..a3985ac 100644 --- a/boards/cytron_maker_pi_rp2040.json +++ b/boards/cytron_maker_pi_rp2040.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "cytron_maker_pi_rp2040", "arduino": { "earlephilhower": { - "variant": "cytron_maker_pi_rp2040", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x1000", - "usb_manufacturer": "Cytron", - "usb_product": "Maker Pi RP2040" + "usb_pid": "0x1000" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Cytron" -} \ No newline at end of file +} diff --git a/boards/dfrobot_beetle_rp2040.json b/boards/dfrobot_beetle_rp2040.json index 95df8f8..f0c1f55 100644 --- a/boards/dfrobot_beetle_rp2040.json +++ b/boards/dfrobot_beetle_rp2040.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "dfrobot_beetle_rp2040", "arduino": { "earlephilhower": { - "variant": "dfrobot_beetle_rp2040", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x3343", - "usb_pid": "0x4253", - "usb_manufacturer": "DFRobot", - "usb_product": "Beetle RP2040" + "usb_pid": "0x4253" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "DFRobot" -} \ No newline at end of file +} diff --git a/boards/flyboard2040_core.json b/boards/flyboard2040_core.json index b60e0ba..b7f0b83 100644 --- a/boards/flyboard2040_core.json +++ b/boards/flyboard2040_core.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "flyboard2040_core", "arduino": { "earlephilhower": { - "variant": "flyboard2040_core", "boot2_source": "boot2_generic_03h_4_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x008a", - "usb_manufacturer": "DeRuiLab", - "usb_product": "FlyBoard2040Core" + "usb_pid": "0x008a" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "DeRuiLab" -} \ No newline at end of file +} diff --git a/boards/generic.json b/boards/generic.json index fa89b11..4785e67 100644 --- a/boards/generic.json +++ b/boards/generic.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "generic", "arduino": { "earlephilhower": { - "variant": "generic", "boot2_source": "boot2_generic_03h_4_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0xf00a", - "usb_manufacturer": "Generic", - "usb_product": "RP2040" + "usb_pid": "0xf00a" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Generic" -} \ No newline at end of file +} diff --git a/boards/ilabs_rpico32.json b/boards/ilabs_rpico32.json index 058e458..ee1dedf 100644 --- a/boards/ilabs_rpico32.json +++ b/boards/ilabs_rpico32.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "ilabs_rpico32", "arduino": { "earlephilhower": { - "variant": "ilabs_rpico32", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x1010", - "usb_manufacturer": "iLabs", - "usb_product": "RPICO32" + "usb_pid": "0x1010" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "iLabs" -} \ No newline at end of file +} diff --git a/boards/melopero_shake_rp2040.json b/boards/melopero_shake_rp2040.json index 9813457..761f215 100644 --- a/boards/melopero_shake_rp2040.json +++ b/boards/melopero_shake_rp2040.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "melopero_shake_rp2040", "arduino": { "earlephilhower": { - "variant": "melopero_shake_rp2040", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x1005", - "usb_manufacturer": "Melopero", - "usb_product": "Shake RP2040" + "usb_pid": "0x1005" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Melopero" -} \ No newline at end of file +} diff --git a/boards/rpipico.json b/boards/rpipico.json index 4d688ab..b5020bc 100644 --- a/boards/rpipico.json +++ b/boards/rpipico.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "rpipico", "arduino": { "earlephilhower": { - "variant": "rpipico", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x000a", - "usb_manufacturer": "Raspberry Pi", - "usb_product": "Pico" + "usb_pid": "0x000a" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Raspberry Pi" -} \ No newline at end of file +} diff --git a/boards/seeed_xiao_rp2040.json b/boards/seeed_xiao_rp2040.json index d70f696..8609f62 100644 --- a/boards/seeed_xiao_rp2040.json +++ b/boards/seeed_xiao_rp2040.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "seeed_xiao_rp2040", "arduino": { "earlephilhower": { - "variant": "seeed_xiao_rp2040", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x000a", - "usb_manufacturer": "Seeed", - "usb_product": "XAIO RP2040" + "usb_pid": "0x000a" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Seeed" -} \ No newline at end of file +} diff --git a/boards/solderparty_rp2040_stamp.json b/boards/solderparty_rp2040_stamp.json index 6f3ac69..57280be 100644 --- a/boards/solderparty_rp2040_stamp.json +++ b/boards/solderparty_rp2040_stamp.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "solderparty_rp2040_stamp", "arduino": { "earlephilhower": { - "variant": "solderparty_rp2040_stamp", "boot2_source": "boot2_generic_03h_4_padded_checksum.S", "usb_vid": "0x1209", - "usb_pid": "0xa182", - "usb_manufacturer": "Solder Party", - "usb_product": "RP2040 Stamp" + "usb_pid": "0xa182" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "Solder Party" -} \ No newline at end of file +} diff --git a/boards/sparkfun_promicrorp2040.json b/boards/sparkfun_promicrorp2040.json index 630630e..efd2fee 100644 --- a/boards/sparkfun_promicrorp2040.json +++ b/boards/sparkfun_promicrorp2040.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "sparkfun_promicrorp2040", "arduino": { "earlephilhower": { - "variant": "sparkfun_promicrorp2040", "boot2_source": "boot2_generic_03h_4_padded_checksum.S", "usb_vid": "0x1b4f", - "usb_pid": "0x0026", - "usb_manufacturer": "SparkFun", - "usb_product": "ProMicro RP2040" + "usb_pid": "0x0026" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "SparkFun" -} \ No newline at end of file +} diff --git a/boards/sparkfun_thingplusrp2040.json b/boards/sparkfun_thingplusrp2040.json index 982b55a..9c4a14c 100644 --- a/boards/sparkfun_thingplusrp2040.json +++ b/boards/sparkfun_thingplusrp2040.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "sparkfun_thingplusrp2040", "arduino": { "earlephilhower": { - "variant": "sparkfun_thingplusrp2040", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x1b4f", - "usb_pid": "0x0026", - "usb_manufacturer": "SparkFun", - "usb_product": "Thing Plus RP2040" + "usb_pid": "0x0026" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "SparkFun" -} \ No newline at end of file +} diff --git a/boards/upesy_rp2040_devkit.json b/boards/upesy_rp2040_devkit.json index 3452f7e..dcf85d4 100644 --- a/boards/upesy_rp2040_devkit.json +++ b/boards/upesy_rp2040_devkit.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "upesy_rp2040_devkit", "arduino": { "earlephilhower": { - "variant": "upesy_rp2040_devkit", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x1007", - "usb_manufacturer": "uPesy", - "usb_product": "RP2040 DevKit" + "usb_pid": "0x1007" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "uPesy" -} \ No newline at end of file +} diff --git a/boards/wiznet_5100s_evb_pico.json b/boards/wiznet_5100s_evb_pico.json index 2e66dba..1f82358 100644 --- a/boards/wiznet_5100s_evb_pico.json +++ b/boards/wiznet_5100s_evb_pico.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "wiznet_5100s_evb_pico", "arduino": { "earlephilhower": { - "variant": "wiznet_5100s_evb_pico", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x1027", - "usb_manufacturer": "WIZnet", - "usb_product": "W5100S-EVB-Pico" + "usb_pid": "0x1027" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "WIZnet" -} \ No newline at end of file +} diff --git a/boards/wiznet_5500_evb_pico.json b/boards/wiznet_5500_evb_pico.json index 27bfe0d..a39122f 100644 --- a/boards/wiznet_5500_evb_pico.json +++ b/boards/wiznet_5500_evb_pico.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "wiznet_5500_evb_pico", "arduino": { "earlephilhower": { - "variant": "wiznet_5500_evb_pico", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x1029", - "usb_manufacturer": "WIZnet", - "usb_product": "W5500-EVB-Pico" + "usb_pid": "0x1029" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "WIZnet" -} \ No newline at end of file +} diff --git a/boards/wiznet_wizfi360_evb_pico.json b/boards/wiznet_wizfi360_evb_pico.json index e696ca2..43f00bc 100644 --- a/boards/wiznet_wizfi360_evb_pico.json +++ b/boards/wiznet_wizfi360_evb_pico.json @@ -11,14 +11,12 @@ ] ], "mcu": "rp2040", + "variant": "wiznet_wizfi360_evb_pico", "arduino": { "earlephilhower": { - "variant": "wiznet_wizfi360_evb_pico", "boot2_source": "boot2_w25q080_2_padded_checksum.S", "usb_vid": "0x2e8a", - "usb_pid": "0x1028", - "usb_manufacturer": "WIZnet", - "usb_product": "WizFi360-EVB-Pico" + "usb_pid": "0x1028" } } }, @@ -49,4 +47,4 @@ }, "url": "https://www.raspberrypi.org/products/raspberry-pi-pico/", "vendor": "WIZnet" -} \ No newline at end of file +} diff --git a/builder/main.py b/builder/main.py index 8e1110a..47b5df8 100644 --- a/builder/main.py +++ b/builder/main.py @@ -149,16 +149,19 @@ def fetch_fs_size(env): flash_size = board.get("upload.maximum_size") filesystem_size = board.get("build.filesystem_size", "0MB") filesystem_size_int = convert_size_expression_to_int(filesystem_size) + # last 4K are allocated for EEPROM emulation in flash. + # see https://github.com/earlephilhower/arduino-pico/blob/3414b73172d307e9dc901f7fee83b41112f73457/libraries/EEPROM/EEPROM.cpp#L43-L46 + eeprom_size = 4096 - maximum_sketch_size = flash_size - 4096 - filesystem_size_int + maximum_sketch_size = flash_size - eeprom_size - filesystem_size_int print("Flash size: %.2fMB" % (flash_size / 1024.0 / 1024.0)) print("Sketch size: %.2fMB" % (maximum_sketch_size / 1024.0 / 1024.0)) print("Filesystem size: %.2fMB" % (filesystem_size_int / 1024.0 / 1024.0)) - eeprom_start = 0x10000000 + flash_size - 4096 - fs_start = 0x10000000 + flash_size - 4096 - filesystem_size_int - fs_end = 0x10000000 + flash_size - 4096 + eeprom_start = 0x10000000 + flash_size - eeprom_size + fs_start = 0x10000000 + flash_size - eeprom_size - filesystem_size_int + fs_end = 0x10000000 + flash_size - eeprom_size if maximum_sketch_size <= 0: sys.stderr.write( @@ -173,7 +176,7 @@ def fetch_fs_size(env): env["PICO_EEPROM_START"] = eeprom_start env["FS_START"] = fs_start env["FS_END"] = fs_end - # LittleFS configuration paramters taken from + # LittleFS configuration parameters taken from # https://github.com/earlephilhower/arduino-pico-littlefs-plugin/blob/master/src/PicoLittleFS.java env["FS_PAGE"] = 256 env["FS_BLOCK"] = 4096 @@ -207,7 +210,7 @@ env.Append( ) # store function to get infno about filesystems for builder scripts. -env["fetch_fs_size"] = fetch_fs_size +env["__fetch_fs_size"] = fetch_fs_size # # Target: Build executable and linkable firmware @@ -246,9 +249,6 @@ if env.get("PIOMAINPROG"): env.VerboseAction( lambda source, target, env: _update_max_upload_size(env), "Retrieving maximum program size $SOURCE")) -# remove after PIO Core 3.6 release -elif set(["checkprogsize", "upload"]) & set(COMMAND_LINE_TARGETS): - _update_max_upload_size(env) # # Target: Print binary size @@ -292,12 +292,11 @@ def UploadUF2ToDisk(target, source, env): "Firmware has been successfully uploaded.\n" "(Some boards may require manual hard reset)" ) -env.UploadUF2ToDisk = UploadUF2ToDisk if upload_protocol == "mbed": upload_actions = [ env.VerboseAction(env.AutodetectUploadPort, "Looking for upload disk..."), - env.VerboseAction(env.UploadUF2ToDisk, "Uploading $SOURCE") + env.VerboseAction(UploadUF2ToDisk, "Uploading $SOURCE") ] elif upload_protocol == "picotool": env.Replace( @@ -313,7 +312,7 @@ elif upload_protocol == "picotool": "load", "--verify" ], - UPLOADCMD="$UPLOADER $UPLOADERFLAGS $SOURCES --offset ${hex(FS_START)}", + UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS $SOURCES --offset ${hex(FS_START)}', ) upload_actions = [ diff --git a/examples/arduino-blink-earlephilhower/.gitignore b/examples/arduino-blink-earlephilhower/.gitignore deleted file mode 100644 index 03f4a3c..0000000 --- a/examples/arduino-blink-earlephilhower/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.pio diff --git a/examples/arduino-blink-earlephilhower/README.md b/examples/arduino-blink-earlephilhower/README.md deleted file mode 100644 index 443298d..0000000 --- a/examples/arduino-blink-earlephilhower/README.md +++ /dev/null @@ -1,21 +0,0 @@ -How to build PlatformIO based project -===================================== - -1. [Install PlatformIO Core](https://docs.platformio.org/page/core.html) -2. Download [development platform with examples](https://github.com/platformio/platform-raspberrypi/archive/develop.zip) -3. Extract ZIP archive -4. Run these commands: - -```shell -# Change directory to example -$ cd platform-raspberrypi/examples/arduino-blink-earlephilhower - -# Build project -$ pio run - -# Upload firmware -$ pio run --target upload - -# Clean build files -$ pio run --target clean -``` diff --git a/examples/arduino-blink-earlephilhower/include/README b/examples/arduino-blink-earlephilhower/include/README deleted file mode 100644 index 194dcd4..0000000 --- a/examples/arduino-blink-earlephilhower/include/README +++ /dev/null @@ -1,39 +0,0 @@ - -This directory is intended for project header files. - -A header file is a file containing C declarations and macro definitions -to be shared between several project source files. You request the use of a -header file in your project source file (C, C++, etc) located in `src` folder -by including it, with the C preprocessing directive `#include'. - -```src/main.c - -#include "header.h" - -int main (void) -{ - ... -} -``` - -Including a header file produces the same results as copying the header file -into each source file that needs it. Such copying would be time-consuming -and error-prone. With a header file, the related declarations appear -in only one place. If they need to be changed, they can be changed in one -place, and programs that include the header file will automatically use the -new version when next recompiled. The header file eliminates the labor of -finding and changing all the copies as well as the risk that a failure to -find one copy will result in inconsistencies within a program. - -In C, the usual convention is to give header files names that end with `.h'. -It is most portable to use only letters, digits, dashes, and underscores in -header file names, and at most one dot. - -Read more about using header files in official GCC documentation: - -* Include Syntax -* Include Operation -* Once-Only Headers -* Computed Includes - -https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html diff --git a/examples/arduino-blink-earlephilhower/lib/README b/examples/arduino-blink-earlephilhower/lib/README deleted file mode 100644 index 6debab1..0000000 --- a/examples/arduino-blink-earlephilhower/lib/README +++ /dev/null @@ -1,46 +0,0 @@ - -This directory is intended for project specific (private) libraries. -PlatformIO will compile them to static libraries and link into executable file. - -The source code of each library should be placed in a an own separate directory -("lib/your_library_name/[here are source files]"). - -For example, see a structure of the following two libraries `Foo` and `Bar`: - -|--lib -| | -| |--Bar -| | |--docs -| | |--examples -| | |--src -| | |- Bar.c -| | |- Bar.h -| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html -| | -| |--Foo -| | |- Foo.c -| | |- Foo.h -| | -| |- README --> THIS FILE -| -|- platformio.ini -|--src - |- main.c - -and a contents of `src/main.c`: -``` -#include -#include - -int main (void) -{ - ... -} - -``` - -PlatformIO Library Dependency Finder will find automatically dependent -libraries scanning project source files. - -More information about PlatformIO Library Dependency Finder -- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/examples/arduino-blink-earlephilhower/platformio.ini b/examples/arduino-blink-earlephilhower/platformio.ini deleted file mode 100644 index ae696fb..0000000 --- a/examples/arduino-blink-earlephilhower/platformio.ini +++ /dev/null @@ -1,35 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter, extra scripting -; Upload options: custom port, speed and extra flags -; Library options: dependencies, extra library storages -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html - -[env] -platform = raspberrypi -framework = arduino - -[env:pico] -board = pico -; "pico" board can use both mbed and earlephilhower core, must select here -board_build.core = earlephilhower - -[env:nanorp2040connect] -board = nanorp2040connect -; "nanorp2040connect" board can use both mbed and earlephilhower core, must select here -board_build.core = earlephilhower - -; earlephilhower-only boards -[env:rpipico] -board = rpipico - -[env:adafruit_feather] -board = adafruit_feather - -[env:seeed_xiao_rp2040] -board = seeed_xiao_rp2040 - -[env:sparkfun_thingplusrp2040] -board = sparkfun_thingplusrp2040 \ No newline at end of file diff --git a/examples/arduino-blink-earlephilhower/src/main.cpp b/examples/arduino-blink-earlephilhower/src/main.cpp deleted file mode 100644 index 8c4e60f..0000000 --- a/examples/arduino-blink-earlephilhower/src/main.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include - -// the setup routine runs once when you press reset: -void setup() { - // initialize the digital pin as an output. - pinMode(LED_BUILTIN, OUTPUT); -} - -// the loop routine runs over and over again forever: -void loop() { - digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) - delay(1000); // wait for a second - digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW - delay(1000); // wait for a second -} diff --git a/examples/arduino-blink-earlephilhower/test/README b/examples/arduino-blink-earlephilhower/test/README deleted file mode 100644 index df5066e..0000000 --- a/examples/arduino-blink-earlephilhower/test/README +++ /dev/null @@ -1,11 +0,0 @@ - -This directory is intended for PIO Unit Testing and project tests. - -Unit Testing is a software testing method by which individual units of -source code, sets of one or more MCU program modules together with associated -control data, usage procedures, and operating procedures, are tested to -determine whether they are fit for use. Unit testing finds problems early -in the development cycle. - -More information about PIO Unit Testing: -- https://docs.platformio.org/page/plus/unit-testing.html diff --git a/examples/arduino-blink/README.md b/examples/arduino-blink/README.md index 6eb4be3..938e48b 100644 --- a/examples/arduino-blink/README.md +++ b/examples/arduino-blink/README.md @@ -19,3 +19,11 @@ $ pio run --target upload # Clean build files $ pio run --target clean ``` + +## Notes + +For Raspberry Pi Pico devices, two Arduino cores exist: +* https://github.com/arduino/ArduinoCore-mbed +* https://github.com/earlephilhower/arduino-pico + +This examples showcases how to use both of these cores in the `platformio.ini`. \ No newline at end of file diff --git a/examples/arduino-blink/platformio.ini b/examples/arduino-blink/platformio.ini index 9a51012..840a800 100644 --- a/examples/arduino-blink/platformio.ini +++ b/examples/arduino-blink/platformio.ini @@ -16,3 +16,26 @@ board = pico [env:nanorp2040connect] board = nanorp2040connect + +[env:pico_earle] +board = pico +; "pico" board can use both mbed and earlephilhower core, must select here +board_build.core = earlephilhower + +[env:nanorp2040connect_earle] +board = nanorp2040connect +; "nanorp2040connect" board can use both mbed and earlephilhower core, must select here +board_build.core = earlephilhower + +; earlephilhower-only boards +[env:rpipico] +board = rpipico + +[env:adafruit_feather] +board = adafruit_feather + +[env:seeed_xiao_rp2040] +board = seeed_xiao_rp2040 + +[env:sparkfun_thingplusrp2040] +board = sparkfun_thingplusrp2040 \ No newline at end of file diff --git a/platform.json b/platform.json index c1c2b49..eefde2c 100644 --- a/platform.json +++ b/platform.json @@ -47,7 +47,7 @@ "type": "framework", "optional": true, "owner": "earlephilhower", - "version": "https://github.com/earlephilhower/arduino-pico.git" + "version": "https://github.com/maxgerhardt/arduino-pico.git" }, "tool-rp2040tools": { "type": "uploader", @@ -64,7 +64,7 @@ "type": "uploader", "optional": true, "owner": "platformio", - "version": "~1.72000.0" + "version": "^1.72000.0" }, "tool-mklittlefs-rp2040-earlephilhower": { "type": "uploader", diff --git a/platform.py b/platform.py index 3b0ef55..f66db00 100644 --- a/platform.py +++ b/platform.py @@ -49,7 +49,7 @@ class RaspberrypiPlatform(PlatformBase): # if we want to build a filesystem, we need the tools. if "buildfs" in targets: - self.packages['tool-mklittlefs-rp2040-earlephilhower']['optional'] = False + self.packages["tool-mklittlefs-rp2040-earlephilhower"]["optional"] = False # configure J-LINK tool jlink_conds = [