Skip to content

Commit 5bf570c

Browse files
authored
Add support for Challenger UWB board, fix some defines (earlephilhower#1351)
1 parent 0963611 commit 5bf570c

File tree

8 files changed

+373
-6
lines changed

8 files changed

+373
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Read the [Contributing Guide](https://github.com/earlephilhower/arduino-pico/blo
4040
* Invector Labs Challenger RP2040 LoRa
4141
* Invector Labs Challenger RP2040 SubGHz
4242
* Invector Labs Challenger RP2040 SD/RTC
43+
* Invector Labs Challenger RP2040 UWB
4344
* Invector Labs RPICO32
4445
* Melopero Cookie RP2040
4546
* Melopero Shake RP2040

boards.txt

Lines changed: 236 additions & 2 deletions
Large diffs are not rendered by default.

package/package_pico_index.template.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@
113113
{
114114
"name": "iLabs Challenger 2040 NFC"
115115
},
116+
{
117+
"name": "iLabs Challenger 2040 UWB"
118+
},
116119
{
117120
"name": "iLabs RPICO32"
118121
},

tools/json/challenger_2040_nfc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"core": "earlephilhower",
1111
"cpu": "cortex-m0plus",
12-
"extra_flags": "-D ARDUINO_CHALLENGER_NB_2040_NFC_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
12+
"extra_flags": "-D ARDUINO_CHALLENGER_2040_NFC_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
1313
"f_cpu": "133000000L",
1414
"hwids": [
1515
[

tools/json/challenger_2040_sdrtc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"core": "earlephilhower",
1111
"cpu": "cortex-m0plus",
12-
"extra_flags": "-D ARDUINO_CHALLENGER_NB_2040_SDRTC_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
12+
"extra_flags": "-D ARDUINO_CHALLENGER_2040_SDRTC_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
1313
"f_cpu": "133000000L",
1414
"hwids": [
1515
[

tools/json/challenger_2040_uwb.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"earlephilhower": {
5+
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
6+
"usb_vid": "0x2E8A",
7+
"usb_pid": "0x1052"
8+
}
9+
},
10+
"core": "earlephilhower",
11+
"cpu": "cortex-m0plus",
12+
"extra_flags": "-D ARDUINO_CHALLENGER_2040_UWB_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500",
13+
"f_cpu": "133000000L",
14+
"hwids": [
15+
[
16+
"0x2E8A",
17+
"0x00C0"
18+
],
19+
[
20+
"0x2E8A",
21+
"0x1052"
22+
]
23+
],
24+
"mcu": "rp2040",
25+
"variant": "challenger_2040_uwb"
26+
},
27+
"debug": {
28+
"jlink_device": "RP2040_M0_0",
29+
"openocd_target": "rp2040.cfg",
30+
"svd_path": "rp2040.svd"
31+
},
32+
"frameworks": [
33+
"arduino"
34+
],
35+
"name": "Challenger 2040 UWB",
36+
"upload": {
37+
"maximum_ram_size": 270336,
38+
"maximum_size": 8388608,
39+
"require_upload_port": true,
40+
"native_usb": true,
41+
"use_1200bps_touch": true,
42+
"wait_for_upload_port": false,
43+
"protocol": "picotool",
44+
"protocols": [
45+
"cmsis-dap",
46+
"jlink",
47+
"raspberrypi-swd",
48+
"picotool",
49+
"picoprobe"
50+
]
51+
},
52+
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
53+
"vendor": "iLabs"
54+
}

tools/makeboards.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,9 @@ def MakeBoardJSON(name, vendor_name, product_name, vid, pid, pwr, boarddefine, f
381381
MakeBoard("challenger_2040_wifi", "iLabs", "Challenger 2040 WiFi", "0x2e8a", "0x1006", 250, "CHALLENGER_2040_WIFI_RP2040", 8, "boot2_w25q080_2_padded_checksum", ["WIFIESPAT2"])
382382
MakeBoard("challenger_2040_wifi_ble", "iLabs", "Challenger 2040 WiFi/BLE", "0x2e8a", "0x102C", 500, "CHALLENGER_2040_WIFI_BLE_RP2040", 8, "boot2_w25q080_2_padded_checksum", ["WIFIESPAT2"])
383383
MakeBoard("challenger_nb_2040_wifi", "iLabs", "Challenger NB 2040 WiFi", "0x2e8a", "0x100d", 500, "CHALLENGER_NB_2040_WIFI_RP2040", 8, "boot2_w25q080_2_padded_checksum", ["WIFIESPAT2"])
384-
MakeBoard("challenger_2040_sdrtc", "iLabs", "Challenger 2040 SD/RTC", "0x2e8a", "0x102d", 250, "CHALLENGER_NB_2040_SDRTC_RP2040", 8, "boot2_w25q080_2_padded_checksum")
385-
MakeBoard("challenger_2040_nfc", "iLabs", "Challenger 2040 NFC", "0x2e8a", "0x1036", 250, "CHALLENGER_NB_2040_NFC_RP2040", 8, "boot2_w25q080_2_padded_checksum")
384+
MakeBoard("challenger_2040_sdrtc", "iLabs", "Challenger 2040 SD/RTC", "0x2e8a", "0x102d", 250, "CHALLENGER_2040_SDRTC_RP2040", 8, "boot2_w25q080_2_padded_checksum")
385+
MakeBoard("challenger_2040_nfc", "iLabs", "Challenger 2040 NFC", "0x2e8a", "0x1036", 250, "CHALLENGER_2040_NFC_RP2040", 8, "boot2_w25q080_2_padded_checksum")
386+
MakeBoard("challenger_2040_uwb", "iLabs", "Challenger 2040 UWB", "0x2e8a", "0x1052", 500, "CHALLENGER_2040_UWB_RP2040", 8, "boot2_w25q080_2_padded_checksum")
386387
MakeBoard("ilabs_rpico32", "iLabs", "RPICO32", "0x2e8a", "0x1010", 250, "ILABS_2040_RPICO32_RP2040", 8, "boot2_w25q080_2_padded_checksum")
387388

388389
# Melopero
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#pragma once
2+
3+
#define PINS_COUNT (25u)
4+
#define NUM_DIGITAL_PINS (25u)
5+
#define NUM_ANALOG_INPUTS (4u)
6+
#define NUM_ANALOG_OUTPUTS (0u)
7+
#define ADC_RESOLUTION (12u)
8+
9+
// LEDs
10+
#define PIN_LED (24u)
11+
12+
// Serial
13+
#define PIN_SERIAL1_TX (16u)
14+
#define PIN_SERIAL1_RX (17u)
15+
16+
// SPI
17+
#define PIN_SPI0_MISO (20u)
18+
#define PIN_SPI0_MOSI (23u)
19+
#define PIN_SPI0_SCK (22u)
20+
#define PIN_SPI0_SS (21u)
21+
22+
// Connected to DWM3000 module
23+
#define PIN_SPI1_MISO (12u)
24+
#define PIN_SPI1_MOSI (11u)
25+
#define PIN_SPI1_SCK (10u)
26+
#define PIN_SPI1_SS (9u)
27+
#define DWM3000_SS PIN_SPI1_SS
28+
#define DWM3000_RST (13u)
29+
#define DWM3000_IRQ (14u)
30+
#define DWM3000_WAKEUP (15u)
31+
#define DWM3000_SPI SPI1
32+
33+
// Wire
34+
#define PIN_WIRE0_SDA (0u)
35+
#define PIN_WIRE0_SCL (1u)
36+
37+
// Not pinned out
38+
#define PIN_WIRE1_SDA (31u)
39+
#define PIN_WIRE1_SCL (31u)
40+
#define PIN_SERIAL2_RX (31u)
41+
#define PIN_SERIAL2_TX (31u)
42+
43+
#define SERIAL_HOWMANY (1u)
44+
#define SPI_HOWMANY (2u)
45+
#define WIRE_HOWMANY (1u)
46+
47+
#define LED_BUILTIN PIN_LED
48+
49+
static const uint8_t D0 = (16u);
50+
static const uint8_t D1 = (17u);
51+
static const uint8_t D2 = (20u);
52+
static const uint8_t D3 = (23u);
53+
static const uint8_t D4 = (22u);
54+
static const uint8_t D5 = (2u);
55+
static const uint8_t D6 = (3u);
56+
static const uint8_t D7 = (0u);
57+
static const uint8_t D8 = (1u);
58+
static const uint8_t D9 = (4u);
59+
static const uint8_t D10 = (5u);
60+
static const uint8_t D11 = (6u);
61+
static const uint8_t D12 = (7u);
62+
static const uint8_t D13 = (8u);
63+
static const uint8_t D14 = (13u);
64+
static const uint8_t D15 = (14u);
65+
static const uint8_t D16 = (15u);
66+
static const uint8_t D17 = (18u);
67+
static const uint8_t D18 = (24u);
68+
69+
static const uint8_t A0 = (26u);
70+
static const uint8_t A1 = (27u);
71+
static const uint8_t A2 = (28u);
72+
static const uint8_t A3 = (29u);
73+
static const uint8_t A4 = (19u);
74+
static const uint8_t A5 = (21u);

0 commit comments

Comments
 (0)