diff --git a/boards/adafruit_feather.json b/boards/adafruit_feather.json index 46c114d..9629c2b 100644 --- a/boards/adafruit_feather.json +++ b/boards/adafruit_feather.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25x10cl_4_padded_checksum.S", + "usb_vid": "0x239a", + "usb_pid": "0x80f1" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_ADAFRUIT_FEATHER_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "adafruit_feather", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25x10cl_4_padded_checksum.S", - "usb_vid": "0x239a", - "usb_pid": "0x80f1" - } - } + "variant": "adafruit_feather" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/adafruit_itsybitsy.json b/boards/adafruit_itsybitsy.json index 3119dac..abf457a 100644 --- a/boards/adafruit_itsybitsy.json +++ b/boards/adafruit_itsybitsy.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x239a", + "usb_pid": "0x80fd" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_ADAFRUIT_ITSYBITSY_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "adafruit_itsybitsy", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x239a", - "usb_pid": "0x80fd" - } - } + "variant": "adafruit_itsybitsy" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/adafruit_kb2040.json b/boards/adafruit_kb2040.json index d77f37a..51c2806 100644 --- a/boards/adafruit_kb2040.json +++ b/boards/adafruit_kb2040.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x239a", + "usb_pid": "0x8105" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_ADAFRUIT_KB2040_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "adafruit_kb2040", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x239a", - "usb_pid": "0x8105" - } - } + "variant": "adafruit_kb2040" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/adafruit_macropad2040.json b/boards/adafruit_macropad2040.json index 34c7a12..3aa705d 100644 --- a/boards/adafruit_macropad2040.json +++ b/boards/adafruit_macropad2040.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x239a", + "usb_pid": "0x8107" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_ADAFRUIT_MACROPAD_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "adafruit_macropad2040", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x239a", - "usb_pid": "0x8107" - } - } + "variant": "adafruit_macropad2040" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/adafruit_qtpy.json b/boards/adafruit_qtpy.json index f372308..3ce3131 100644 --- a/boards/adafruit_qtpy.json +++ b/boards/adafruit_qtpy.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x239a", + "usb_pid": "0x80f7" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_ADAFRUIT_QTPY_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "adafruit_qtpy", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x239a", - "usb_pid": "0x80f7" - } - } + "variant": "adafruit_qtpy" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/adafruit_stemmafriend.json b/boards/adafruit_stemmafriend.json index d9c1667..092cf3b 100644 --- a/boards/adafruit_stemmafriend.json +++ b/boards/adafruit_stemmafriend.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x239a", + "usb_pid": "0x80e3" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_ADAFRUIT_STEMMAFRIEND_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "adafruit_stemmafriend", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x239a", - "usb_pid": "0x80e3" - } - } + "variant": "adafruit_stemmafriend" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/adafruit_trinkeyrp2040qt.json b/boards/adafruit_trinkeyrp2040qt.json index 3472ccc..0e3e5fa 100644 --- a/boards/adafruit_trinkeyrp2040qt.json +++ b/boards/adafruit_trinkeyrp2040qt.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x239a", + "usb_pid": "0x8109" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_ADAFRUIT_TRINKEYQT_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "adafruit_trinkeyrp2040qt", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x239a", - "usb_pid": "0x8109" - } - } + "variant": "adafruit_trinkeyrp2040qt" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/arduino_nano_connect.json b/boards/arduino_nano_connect.json index a8235e0..0f384ac 100644 --- a/boards/arduino_nano_connect.json +++ b/boards/arduino_nano_connect.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2341", + "usb_pid": "0x0058" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "arduino_nano_connect", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2341", - "usb_pid": "0x0058" - } - } + "variant": "arduino_nano_connect" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/challenger_2040_lora.json b/boards/challenger_2040_lora.json index 7e75c39..0314757 100644 --- a/boards/challenger_2040_lora.json +++ b/boards/challenger_2040_lora.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x1023" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_CHALLENGER_2040_LORA_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "challenger_2040_lora", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x1023" - } - } + "variant": "challenger_2040_lora" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/challenger_2040_lte.json b/boards/challenger_2040_lte.json index 5e59e2d..5a35c31 100644 --- a/boards/challenger_2040_lte.json +++ b/boards/challenger_2040_lte.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x100b" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_CHALLENGER_2040_LTE_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "challenger_2040_lte", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x100b" - } - } + "variant": "challenger_2040_lte" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/challenger_2040_wifi.json b/boards/challenger_2040_wifi.json index e286c81..a9740b1 100644 --- a/boards/challenger_2040_wifi.json +++ b/boards/challenger_2040_wifi.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x1006" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_CHALLENGER_2040_WIFI_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "challenger_2040_wifi", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x1006" - } - } + "variant": "challenger_2040_wifi" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/challenger_2040_wifi_ble.json b/boards/challenger_2040_wifi_ble.json index 78cfefa..51338a9 100644 --- a/boards/challenger_2040_wifi_ble.json +++ b/boards/challenger_2040_wifi_ble.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x102C" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_CHALLENGER_2040_WIFI_BLE_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "challenger_2040_wifi_ble", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x102C" - } - } + "variant": "challenger_2040_wifi_ble" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/challenger_nb_2040_wifi.json b/boards/challenger_nb_2040_wifi.json index 8adff86..bed8db3 100644 --- a/boards/challenger_nb_2040_wifi.json +++ b/boards/challenger_nb_2040_wifi.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x100b" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_CHALLENGER_NB_2040_WIFI_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "challenger_nb_2040_wifi", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x100b" - } - } + "variant": "challenger_nb_2040_wifi" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/cytron_maker_nano_rp2040.json b/boards/cytron_maker_nano_rp2040.json index 2b78995..434542b 100644 --- a/boards/cytron_maker_nano_rp2040.json +++ b/boards/cytron_maker_nano_rp2040.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x100f" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_CYTRON_MAKER_NANO_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "cytron_maker_nano_rp2040", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x100f" - } - } + "variant": "cytron_maker_nano_rp2040" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/cytron_maker_pi_rp2040.json b/boards/cytron_maker_pi_rp2040.json index a3985ac..9ae6820 100644 --- a/boards/cytron_maker_pi_rp2040.json +++ b/boards/cytron_maker_pi_rp2040.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x1000" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_CYTRON_MAKER_PI_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "cytron_maker_pi_rp2040", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x1000" - } - } + "variant": "cytron_maker_pi_rp2040" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/dfrobot_beetle_rp2040.json b/boards/dfrobot_beetle_rp2040.json index f0c1f55..5cf0502 100644 --- a/boards/dfrobot_beetle_rp2040.json +++ b/boards/dfrobot_beetle_rp2040.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x3343", + "usb_pid": "0x4253" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_DFROBOT_BEETLE_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "dfrobot_beetle_rp2040", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x3343", - "usb_pid": "0x4253" - } - } + "variant": "dfrobot_beetle_rp2040" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/flyboard2040_core.json b/boards/flyboard2040_core.json index b7f0b83..966656d 100644 --- a/boards/flyboard2040_core.json +++ b/boards/flyboard2040_core.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_generic_03h_4_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x008a" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_FLYBOARD2040_CORE -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "flyboard2040_core", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_generic_03h_4_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x008a" - } - } + "variant": "flyboard2040_core" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/generic.json b/boards/generic.json index 4785e67..c8746d9 100644 --- a/boards/generic.json +++ b/boards/generic.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_generic_03h_4_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0xf00a" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_GENERIC_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "generic", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_generic_03h_4_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0xf00a" - } - } + "variant": "generic" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/ilabs_rpico32.json b/boards/ilabs_rpico32.json index ee1dedf..b484417 100644 --- a/boards/ilabs_rpico32.json +++ b/boards/ilabs_rpico32.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x1010" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_ILABS_2040_RPICO32_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "ilabs_rpico32", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x1010" - } - } + "variant": "ilabs_rpico32" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/melopero_shake_rp2040.json b/boards/melopero_shake_rp2040.json index 761f215..20243ae 100644 --- a/boards/melopero_shake_rp2040.json +++ b/boards/melopero_shake_rp2040.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x1005" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_MELOPERO_SHAKE_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "melopero_shake_rp2040", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x1005" - } - } + "variant": "melopero_shake_rp2040" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/nanorp2040connect.json b/boards/nanorp2040connect.json index 4e9c594..3122960 100644 --- a/boards/nanorp2040connect.json +++ b/boards/nanorp2040connect.json @@ -1,5 +1,15 @@ { "build": { + "arduino": { + "earlephilhower": { + "variant": "arduino_nano_connect", + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_pid": "0x0058", + "usb_vid": "0x2341", + "usb_manufacturer": "Arduino", + "usb_product" : "Arduino Nano RP2040 Connect" + } + }, "core": "arduino", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_NANO_RP2040_CONNECT -DARDUINO_ARCH_RP2040", @@ -15,17 +25,7 @@ ] ], "mcu": "rp2040", - "variant": "NANO_RP2040_CONNECT", - "arduino": { - "earlephilhower": { - "variant": "arduino_nano_connect", - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_pid": "0x0058", - "usb_vid": "0x2341", - "usb_manufacturer": "Arduino", - "usb_product" : "Arduino Nano RP2040 Connect" - } - } + "variant": "NANO_RP2040_CONNECT" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/pico.json b/boards/pico.json index eaec305..55fdfa4 100644 --- a/boards/pico.json +++ b/boards/pico.json @@ -1,5 +1,15 @@ { "build": { + "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" + } + }, "core": "arduino", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_RASPBERRY_PI_PICO -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500", @@ -11,17 +21,7 @@ ] ], "mcu": "rp2040", - "variant": "RASPBERRY_PI_PICO", - "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" - } - } + "variant": "RASPBERRY_PI_PICO" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/rpipico.json b/boards/rpipico.json index b5020bc..4c8cd3a 100644 --- a/boards/rpipico.json +++ b/boards/rpipico.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x000a" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_RASPBERRY_PI_PICO -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "rpipico", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x000a" - } - } + "variant": "rpipico" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/seeed_xiao_rp2040.json b/boards/seeed_xiao_rp2040.json index 8609f62..d5a4073 100644 --- a/boards/seeed_xiao_rp2040.json +++ b/boards/seeed_xiao_rp2040.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x000a" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_SEEED_XAIO_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "seeed_xiao_rp2040", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x000a" - } - } + "variant": "seeed_xiao_rp2040" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/solderparty_rp2040_stamp.json b/boards/solderparty_rp2040_stamp.json index 57280be..cd0acc3 100644 --- a/boards/solderparty_rp2040_stamp.json +++ b/boards/solderparty_rp2040_stamp.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_generic_03h_4_padded_checksum.S", + "usb_vid": "0x1209", + "usb_pid": "0xa182" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_SOLDERPARTY_RP2040_STAMP -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "solderparty_rp2040_stamp", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_generic_03h_4_padded_checksum.S", - "usb_vid": "0x1209", - "usb_pid": "0xa182" - } - } + "variant": "solderparty_rp2040_stamp" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/sparkfun_promicrorp2040.json b/boards/sparkfun_promicrorp2040.json index efd2fee..50629ab 100644 --- a/boards/sparkfun_promicrorp2040.json +++ b/boards/sparkfun_promicrorp2040.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_generic_03h_4_padded_checksum.S", + "usb_vid": "0x1b4f", + "usb_pid": "0x0026" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_SPARKFUN_PROMICRO_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "sparkfun_promicrorp2040", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_generic_03h_4_padded_checksum.S", - "usb_vid": "0x1b4f", - "usb_pid": "0x0026" - } - } + "variant": "sparkfun_promicrorp2040" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/sparkfun_thingplusrp2040.json b/boards/sparkfun_thingplusrp2040.json index 9c4a14c..84eeae9 100644 --- a/boards/sparkfun_thingplusrp2040.json +++ b/boards/sparkfun_thingplusrp2040.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x1b4f", + "usb_pid": "0x0026" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_SPARKFUN_THINGPLUS_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "sparkfun_thingplusrp2040", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x1b4f", - "usb_pid": "0x0026" - } - } + "variant": "sparkfun_thingplusrp2040" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/upesy_rp2040_devkit.json b/boards/upesy_rp2040_devkit.json index dcf85d4..e8567f8 100644 --- a/boards/upesy_rp2040_devkit.json +++ b/boards/upesy_rp2040_devkit.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x1007" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_UPESY_RP2040_DEVKIT -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "upesy_rp2040_devkit", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x1007" - } - } + "variant": "upesy_rp2040_devkit" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/wiznet_5100s_evb_pico.json b/boards/wiznet_5100s_evb_pico.json index 1f82358..af186be 100644 --- a/boards/wiznet_5100s_evb_pico.json +++ b/boards/wiznet_5100s_evb_pico.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x1027" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_WIZNET_5100S_EVB_PICO -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "wiznet_5100s_evb_pico", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x1027" - } - } + "variant": "wiznet_5100s_evb_pico" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/wiznet_5500_evb_pico.json b/boards/wiznet_5500_evb_pico.json index a39122f..74b391a 100644 --- a/boards/wiznet_5500_evb_pico.json +++ b/boards/wiznet_5500_evb_pico.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x1029" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_WIZNET_5500_EVB_PICO -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "wiznet_5500_evb_pico", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x1029" - } - } + "variant": "wiznet_5500_evb_pico" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/boards/wiznet_wizfi360_evb_pico.json b/boards/wiznet_wizfi360_evb_pico.json index 43f00bc..009c598 100644 --- a/boards/wiznet_wizfi360_evb_pico.json +++ b/boards/wiznet_wizfi360_evb_pico.json @@ -1,5 +1,12 @@ { "build": { + "arduino": { + "earlephilhower": { + "boot2_source": "boot2_w25q080_2_padded_checksum.S", + "usb_vid": "0x2e8a", + "usb_pid": "0x1028" + } + }, "core": "earlephilhower", "cpu": "cortex-m0plus", "extra_flags": "-D ARDUINO_WIZNET_WIZFI360_EVB_PICO -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250", @@ -11,14 +18,7 @@ ] ], "mcu": "rp2040", - "variant": "wiznet_wizfi360_evb_pico", - "arduino": { - "earlephilhower": { - "boot2_source": "boot2_w25q080_2_padded_checksum.S", - "usb_vid": "0x2e8a", - "usb_pid": "0x1028" - } - } + "variant": "wiznet_wizfi360_evb_pico" }, "debug": { "jlink_device": "RP2040_M0_0", diff --git a/builder/main.py b/builder/main.py index 47b5df8..21cc542 100644 --- a/builder/main.py +++ b/builder/main.py @@ -25,97 +25,6 @@ from platformio.public import list_serial_ports from SCons.Script import (ARGUMENTS, COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default, DefaultEnvironment) - -def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 - upload_options = {} - if "BOARD" in env: - upload_options = env.BoardConfig().get("upload", {}) - - env.AutodetectUploadPort() - before_ports = list_serial_ports() - - if upload_options.get("use_1200bps_touch", False): - env.TouchSerialPort("$UPLOAD_PORT", 1200) - - if upload_options.get("wait_for_upload_port", False): - env.Replace(UPLOAD_PORT=env.WaitForNewSerialPort(before_ports)) - - -def generate_uf2(target, source, env): - elf_file = target[0].get_path() - env.Execute( - " ".join( - [ - "elf2uf2", - '"%s"' % elf_file, - '"%s"' % elf_file.replace(".elf", ".uf2"), - ] - ) - ) - - -env = DefaultEnvironment() -platform = env.PioPlatform() -board = env.BoardConfig() - -env.Replace( - AR="arm-none-eabi-ar", - AS="arm-none-eabi-as", - CC="arm-none-eabi-gcc", - CXX="arm-none-eabi-g++", - GDB="arm-none-eabi-gdb", - OBJCOPY="arm-none-eabi-objcopy", - RANLIB="arm-none-eabi-ranlib", - SIZETOOL="arm-none-eabi-size", - - ARFLAGS=["rc"], - - MKFSTOOL="mklittlefs", - PICO_FS_IMAGE_NAME=env.get("PICO_FS_IMAGE_NAME", "littlefs"), - - SIZEPROGREGEXP=r"^(?:\.text|\.data|\.rodata|\.text.align|\.ARM.exidx)\s+(\d+).*", - SIZEDATAREGEXP=r"^(?:\.data|\.bss|\.noinit)\s+(\d+).*", - SIZECHECKCMD="$SIZETOOL -A -d $SOURCES", - SIZEPRINTCMD='$SIZETOOL -B -d $SOURCES', - - PROGSUFFIX=".elf" -) - -# Allow user to override via pre:script -if env.get("PROGNAME", "program") == "program": - env.Replace(PROGNAME="firmware") - -env.Append( - BUILDERS=dict( - ElfToBin=Builder( - action=env.VerboseAction(" ".join([ - "$OBJCOPY", - "-O", - "binary", - "$SOURCES", - "$TARGET" - ]), "Building $TARGET"), - suffix=".bin" - ), - ElfToHex=Builder( - action=env.VerboseAction(" ".join([ - "$OBJCOPY", - "-O", - "ihex", - "-R", - ".eeprom", - "$SOURCES", - "$TARGET" - ]), "Building $TARGET"), - suffix=".hex" - ) - ) -) - -if not env.get("PIOFRAMEWORK"): - env.SConscript("frameworks/_bare.py") - - def convert_size_expression_to_int(expression): conversion_factors = { "M": 1024*1024, @@ -191,6 +100,97 @@ def __fetch_fs_size(target, source, env): fetch_fs_size(env) return (target, source) +def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 + upload_options = {} + if "BOARD" in env: + upload_options = env.BoardConfig().get("upload", {}) + + env.AutodetectUploadPort() + before_ports = list_serial_ports() + + if upload_options.get("use_1200bps_touch", False): + env.TouchSerialPort("$UPLOAD_PORT", 1200) + + if upload_options.get("wait_for_upload_port", False): + env.Replace(UPLOAD_PORT=env.WaitForNewSerialPort(before_ports)) + + +def generate_uf2(target, source, env): + elf_file = target[0].get_path() + env.Execute( + " ".join( + [ + "elf2uf2", + '"%s"' % elf_file, + '"%s"' % elf_file.replace(".elf", ".uf2"), + ] + ) + ) + + +env = DefaultEnvironment() +platform = env.PioPlatform() +board = env.BoardConfig() + +env.Replace( + __fetch_fs_size=fetch_fs_size, + + AR="arm-none-eabi-ar", + AS="arm-none-eabi-as", + CC="arm-none-eabi-gcc", + CXX="arm-none-eabi-g++", + GDB="arm-none-eabi-gdb", + OBJCOPY="arm-none-eabi-objcopy", + RANLIB="arm-none-eabi-ranlib", + SIZETOOL="arm-none-eabi-size", + + ARFLAGS=["rc"], + + MKFSTOOL="mklittlefs", + PICO_FS_IMAGE_NAME=env.get("PICO_FS_IMAGE_NAME", "littlefs"), + + SIZEPROGREGEXP=r"^(?:\.text|\.data|\.rodata|\.text.align|\.ARM.exidx)\s+(\d+).*", + SIZEDATAREGEXP=r"^(?:\.data|\.bss|\.noinit)\s+(\d+).*", + SIZECHECKCMD="$SIZETOOL -A -d $SOURCES", + SIZEPRINTCMD='$SIZETOOL -B -d $SOURCES', + + PROGSUFFIX=".elf" +) + +# Allow user to override via pre:script +if env.get("PROGNAME", "program") == "program": + env.Replace(PROGNAME="firmware") + +env.Append( + BUILDERS=dict( + ElfToBin=Builder( + action=env.VerboseAction(" ".join([ + "$OBJCOPY", + "-O", + "binary", + "$SOURCES", + "$TARGET" + ]), "Building $TARGET"), + suffix=".bin" + ), + ElfToHex=Builder( + action=env.VerboseAction(" ".join([ + "$OBJCOPY", + "-O", + "ihex", + "-R", + ".eeprom", + "$SOURCES", + "$TARGET" + ]), "Building $TARGET"), + suffix=".hex" + ) + ) +) + +if not env.get("PIOFRAMEWORK"): + env.SConscript("frameworks/_bare.py") + env.Append( BUILDERS=dict( DataToBin=Builder( @@ -209,9 +209,6 @@ env.Append( ) ) -# store function to get infno about filesystems for builder scripts. -env["__fetch_fs_size"] = fetch_fs_size - # # Target: Build executable and linkable firmware # @@ -259,9 +256,6 @@ target_size = env.Alias( env.VerboseAction("$SIZEPRINTCMD", "Calculating size $SOURCE")) AlwaysBuild(target_size) -def DelayBeforeUpload(target, source, env): # pylint: disable=W0613,W0621 - time.sleep(0.5) - def RebootPico(target, source, env): time.sleep(0.5) env.Execute( @@ -322,7 +316,8 @@ elif upload_protocol == "picotool": # picotool seems to need just a tiny bit of delay, but rp2040 load not.. if "uploadfs" in COMMAND_LINE_TARGETS: - upload_actions.insert(1, env.VerboseAction(DelayBeforeUpload, "Delaying a tiny bit...")) + upload_actions.insert(1, env.VerboseAction( + lambda source, target, env: time.sleep(0.5), "Delaying a tiny bit...")) # reboot after filesystem upload upload_actions.append(env.VerboseAction(RebootPico, "Rebooting device...")) diff --git a/examples/arduino-blink/platformio.ini b/examples/arduino-blink/platformio.ini index 840a800..2d88d91 100644 --- a/examples/arduino-blink/platformio.ini +++ b/examples/arduino-blink/platformio.ini @@ -38,4 +38,4 @@ board = adafruit_feather board = seeed_xiao_rp2040 [env:sparkfun_thingplusrp2040] -board = sparkfun_thingplusrp2040 \ No newline at end of file +board = sparkfun_thingplusrp2040