Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@
[submodule "cores/rp2040/tlsf"]
path = lib/tlsf
url = https://github.com/earlephilhower/tlsf.git
[submodule "libraries/ESPHost"]
path = libraries/ESPHost
url = https://github.com/Networking-for-Arduino/ESPHost.git
485 changes: 343 additions & 142 deletions boards.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions libraries/ESPHost
Submodule ESPHost added at 147639
5 changes: 3 additions & 2 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ build.libpicow=libipv4.a
build.boot2=boot2_generic_03h_4_padded_checksum
build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1
build.wificc=-DWIFICC=CYW43_COUNTRY_WORLDWIDE
build.espwifitype=
build.debugscript=picoprobe_cmsis_dap.tcl
build.picodebugflags=
build.variantdefines=
Expand All @@ -126,10 +127,10 @@ pluggable_discovery.rp2040.pattern="{runtime.platform.path}/system/python3/pytho
recipe.hooks.sketch.prebuild.pattern="{runtime.tools.pqt-python3.path}/python3" -I "{runtime.platform.path}/tools/signing.py" --mode header --publickey "{build.source.path}/public.key" --out "{build.path}/core/Updater_Signing.h"

## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {build.flags.optimize} {includes} "{source_file}" -o "{object_file}"
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} {build.espwifitype} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {build.flags.optimize} {includes} "{source_file}" -o "{object_file}"

## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" -I "{build.path}/core" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {build.flags.optimize} {build.wificc} {includes} "{source_file}" -o "{object_file}"
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" -I "{build.path}/core" {compiler.cpp.flags} -DF_CPU={build.f_cpu} {build.espwifitype} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {build.flags.optimize} {build.wificc} {includes} "{source_file}" -o "{object_file}"

## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DBOARD_NAME="{build.board}" -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level} {includes} "{source_file}" -o "{object_file}"
Expand Down
2 changes: 1 addition & 1 deletion tests/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ EOL
fi
# Add items to the following list with "\n" netween them to skip running. No spaces, tabs, etc. allowed
read -d '' skiplist << EOL || true
/ESPHost/
/#attic/
/AvrAdcLogger/
/examplesV1/
Expand Down Expand Up @@ -187,7 +188,6 @@ function install_libraries()
{ test -r Adafruit_CircuitPlayground-1.11.3.zip || curl -sS --output Adafruit_CircuitPlayground-1.11.3.zip -L https://github.com/adafruit/Adafruit_CircuitPlayground/archive/refs/tags/1.11.3.zip; } && unzip -qo Adafruit_CircuitPlayground-1.11.3.zip
{ test -r Adafruit_NeoPixel-1.8.1.zip || curl -sS --output Adafruit_NeoPixel-1.8.1.zip -L https://github.com/adafruit/Adafruit_NeoPixel/archive/refs/tags/1.8.1.zip; } && unzip -qo Adafruit_NeoPixel-1.8.1.zip
{ test -r Arduino_MIDI_Library-5.0.2.zip || curl -sS --output Arduino_MIDI_Library-5.0.2.zip -L https://github.com/FortySevenEffects/arduino_midi_library/archive/refs/tags/5.0.2.zip; } && unzip -qo Arduino_MIDI_Library-5.0.2.zip
git clone https://github.com/JAndrassy/ESPHost.git
popd
}

Expand Down
2 changes: 1 addition & 1 deletion tools/json/challenger_2040_wifi_ble.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-DARDUINO_CHALLENGER_2040_WIFI_BLE_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500 -DWIFIESPAT2",
"extra_flags": "-DARDUINO_CHALLENGER_2040_WIFI_BLE_RP2040 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500 ",
"f_cpu": "133000000L",
"hwids": [
[
Expand Down
2 changes: 1 addition & 1 deletion tools/json/challenger_2350_wifi6_ble5.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"core": "earlephilhower",
"cpu": "cortex-m33",
"extra_flags": "-DARDUINO_CHALLENGER_2350_WIFI_BLE_RP2350 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500 -DWIFIESPAT2",
"extra_flags": "-DARDUINO_CHALLENGER_2350_WIFI_BLE_RP2350 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=500 ",
"f_cpu": "150000000L",
"hwids": [
[
Expand Down
16 changes: 14 additions & 2 deletions tools/makeboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,16 @@ def BuildGlobalMenuList():
print("menu.boot2=Boot Stage 2")
print("menu.wificountry=WiFi Region")
print("menu.usbstack=USB Stack")
print("menu.espwifitype=ESP Wifi Type")
print("menu.ipbtstack=IP/Bluetooth Stack")
print("menu.uploadmethod=Upload Method")

def BuildWifiType(name):
print("%s.menu.espwifitype.esp_at=ESP AT" % (name))
print("%s.menu.espwifitype.esp_at.build.espwifitype=-DWIFIESPAT2" % (name))
print("%s.menu.espwifitype.esp_hosted=ESP Hosted" % (name))
print("%s.menu.espwifitype.esp_hosted.build.espwifitype=-DESPHOSTSPI=SPI1" % (name))

def MakeBoard(name, chip, vendor_name, product_name, vid, pid, pwr, boarddefine, flashsizemb, psramsize, boot2, extra = None, board_url = None):
fssizelist = [ 0, 64 * 1024, 128 * 1024, 256 * 1024, 512 * 1024 ]
for i in range(1, flashsizemb):
Expand Down Expand Up @@ -305,6 +312,11 @@ def MakeBoard(name, chip, vendor_name, product_name, vid, pid, pwr, boarddefine,
BuildFlashMenu(name, chip, 2*1024*1024, [0, 1*1024*1024])
BuildFlashMenu(name, chip, 8*1024*1024, [0, 7*1024*1024, 4*1024*1024, 2*1024*1024])
BuildFlashMenu(name, chip, 16*1024*1024, [0, 15*1024*1024, 14*1024*1024, 12*1024*1024, 8*1024*1024, 4*1024*1024, 2*1024*1024])
elif (name == "challenger_2350_wifi6_ble5") or (name == "challenger_2040_wifi_ble"):
BuildWifiType(name)
BuildCountry(name)
BuildFlashMenu(name, chip, 8*1024*1024, [0, 7*1024*1024, 4*1024*1024, 2*1024*1024])
BuildFlashMenu(name, chip, 16*1024*1024, [0, 15*1024*1024, 14*1024*1024, 12*1024*1024, 8*1024*1024, 4*1024*1024, 2*1024*1024])
else:
BuildFlashMenu(name, chip, flashsizemb * 1024 * 1024, fssizelist)
if chip == "rp2350":
Expand Down Expand Up @@ -520,15 +532,15 @@ def MakeBoardJSON(name, chip, vendor_name, product_name, vid, pid, pwr, boarddef
MakeBoard("challenger_2040_lora", "rp2040", "iLabs", "Challenger 2040 LoRa", "0x2e8a", "0x1023", 250, "CHALLENGER_2040_LORA_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum")
MakeBoard("challenger_2040_subghz", "rp2040", "iLabs", "Challenger 2040 SubGHz", "0x2e8a", "0x1032", 250, "CHALLENGER_2040_SUBGHZ_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum")
MakeBoard("challenger_2040_wifi", "rp2040", "iLabs", "Challenger 2040 WiFi", "0x2e8a", "0x1006", 250, "CHALLENGER_2040_WIFI_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum", ["WIFIESPAT2"])
MakeBoard("challenger_2040_wifi_ble", "rp2040", "iLabs", "Challenger 2040 WiFi/BLE", "0x2e8a", "0x102C", 500, "CHALLENGER_2040_WIFI_BLE_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum", ["WIFIESPAT2"])
MakeBoard("challenger_2040_wifi_ble", "rp2040", "iLabs", "Challenger 2040 WiFi/BLE", "0x2e8a", "0x102C", 500, "CHALLENGER_2040_WIFI_BLE_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum")
MakeBoard("challenger_2040_wifi6_ble", "rp2040", "iLabs", "Challenger 2040 WiFi6/BLE", "0x2e8a", "0x105F", 500, "CHALLENGER_2040_WIFI6_BLE_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum", ["WIFIESPAT2"])
MakeBoard("challenger_nb_2040_wifi", "rp2040", "iLabs", "Challenger NB 2040 WiFi", "0x2e8a", "0x100d", 500, "CHALLENGER_NB_2040_WIFI_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum", ["WIFIESPAT2"])
MakeBoard("challenger_2040_sdrtc", "rp2040", "iLabs", "Challenger 2040 SD/RTC", "0x2e8a", "0x102d", 250, "CHALLENGER_2040_SDRTC_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum")
MakeBoard("challenger_2040_nfc", "rp2040", "iLabs", "Challenger 2040 NFC", "0x2e8a", "0x1036", 250, "CHALLENGER_2040_NFC_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum")
MakeBoard("challenger_2040_uwb", "rp2040", "iLabs", "Challenger 2040 UWB", "0x2e8a", "0x1052", 500, "CHALLENGER_2040_UWB_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum")
MakeBoard("connectivity_2040_lte_wifi_ble", "rp2040", "iLabs", "Connectivity 2040 LTE/WiFi/BLE", "0x2e8a", "0x107b", 500, "CONNECTIVITY_2040_LTE_WIFI_BLE_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum", ["WIFIESPAT2"])
MakeBoard("ilabs_rpico32", "rp2040", "iLabs", "RPICO32", "0x2e8a", "0x1010", 250, "ILABS_2040_RPICO32_RP2040", 8, 0, "boot2_w25q080_2_padded_checksum", ["WIFIESPAT2"])
MakeBoard("challenger_2350_wifi6_ble5", "rp2350", "iLabs", "Challenger 2350 WiFi/BLE", "0x2e8a", "0x109a", 500, "CHALLENGER_2350_WIFI_BLE_RP2350", 8, 8, "boot2_generic_03h_2_padded_checksum", ["WIFIESPAT2"])
MakeBoard("challenger_2350_wifi6_ble5", "rp2350", "iLabs", "Challenger 2350 WiFi/BLE", "0x2e8a", "0x109a", 500, "CHALLENGER_2350_WIFI_BLE_RP2350", 8, 8, "boot2_generic_03h_2_padded_checksum")
MakeBoard("challenger_2350_bconnect", "rp2350", "iLabs", "Challenger 2350 BConnect", "0x2e8a", "0x109b", 500, "CHALLENGER_2350_BCONNECT_RP2350", 8, 8, "boot2_generic_03h_2_padded_checksum")

# Melopero
Expand Down
18 changes: 17 additions & 1 deletion variants/challenger_2040_wifi_ble/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@
#define PIN_SPI1_SCK (14u)
#define PIN_SPI1_SS (13u)
// Handshake signal from ESP32C3
#define ESP32_HS (18u)
#define PIN_ESP32_HS (18u)
#define ESP32_SPI SPI1
// Definitions for ESP hosted
#define ESPHOST_DATA_READY PIN_ESP_MODE
#define ESPHOST_RESET PIN_ESP_RST
#define ESPHOST_HANDSHAKE PIN_ESP32_HS
#define ESPHOST_CS PIN_SPI1_SS

// Wire
#define PIN_WIRE0_SDA (0u)
Expand Down Expand Up @@ -85,3 +90,14 @@ static const uint8_t A2 = (28u);
static const uint8_t A3 = (29u);
static const uint8_t A4 = (25u);
static const uint8_t A5 = (21u);

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;
8 changes: 0 additions & 8 deletions variants/challenger_2350_wifi6_ble5/ChallengerWiFi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,11 @@ bool Challenger2040WiFiClass::waitForReady() {
return false;
}

int esp_host_spi_init(void);
// Reset the ESP and wait for the "ready" prompt to be returned.
bool Challenger2040WiFiClass::reset() {
#if defined(WIFIESPAT2)
runReset();
delay(100);

_serial->begin(DEFAULT_ESP_BAUDRATE);
return waitForReady();
#else
esp_host_spi_init();
return true;
#endif
}

// Checks to see if the modem responds to the "AT" poll command.
Expand Down
12 changes: 5 additions & 7 deletions variants/challenger_2350_wifi6_ble5/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@
#define PIN_SPI1_MOSI (11u)
#define PIN_SPI1_SCK (10u)
#define PIN_SPI1_SS (9u)
// Handshake signal from ESP32C3
#define ESP32_HS (22u)
// Handshake signal from ESP32C6
#define PIN_ESP32_HS (22u)
#define ESP32_SPI SPI1
// Declarations for ESPHOSTSPI
// -DESPHOST_RESET=D5 -DESPHOST_HANDSHAKE=D7 -DESPHOST_DATA_READY=D6 -DESPHOST_CS=D1 -DESPHOSTSPI=SPI
#define ESPHOST_RESET PIN_ESP_RST
#define ESPHOST_HANDSHAKE ESP32_HS
// Definitions for ESP hosted
#define ESPHOST_DATA_READY PIN_ESP_MODE
#define ESPHOST_RESET PIN_ESP_RST
#define ESPHOST_HANDSHAKE PIN_ESP32_HS
#define ESPHOST_CS PIN_SPI1_SS
#define ESPHOSTSPI_MHZ 1

// Wire
#define PIN_WIRE0_SDA (20u)
Expand Down
Loading