Skip to content

Commit

Permalink
ci: Add rough structure for extended per-board configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
redmushie committed Oct 1, 2023
1 parent 7f3555a commit 8bc08a5
Show file tree
Hide file tree
Showing 8 changed files with 145 additions and 6 deletions.
50 changes: 50 additions & 0 deletions boards/Wemos-D1-Mini-ESP32/board.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"ldscript": "esp32s3_out.ld",
"partitions": "default_16MB.csv",
"memory_type": "qio_opi"
},
"core": "esp32",
"extra_flags": [
"-DBOARD_HAS_PSRAM",
"-DARDUINO_LOLIN_S3",
"-DARDUINO_USB_MODE=1",
"-DARDUINO_USB_CDC_ON_BOOT=1"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"hwids": [
[
"0x303A",
"0x1001"
]
],
"mcu": "esp32s3",
"variant": "lolin_s3"
},
"connectivity": [
"wifi",
"bluetooth"
],
"debug": {
"openocd_target": "esp32s3.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "WEMOS LOLIN S3",
"upload": {
"flash_size": "16MB",
"maximum_ram_size": 327680,
"maximum_size": 16777216,
"use_1200bps_touch": true,
"wait_for_upload_port": true,
"require_upload_port": true,
"speed": 460800
},
"url": "https://www.wemos.cc/en/latest/s3/index.html",
"vendor": "WEMOS"
}
11 changes: 11 additions & 0 deletions boards/Wemos-D1-Mini-ESP32/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "Wemos Lolin S3",
"env": "Wemos-Lolin-S3",
"board": "boards/Wemos-Lolin-S3/board.json",
"image": {
"0x0": "bootloader.bin",
"0x8000": "partitions.bin",
"0x10000": "firmware.bin",
"0x310000": "littlefs.bin"
}
}
6 changes: 6 additions & 0 deletions boards/Wemos-D1-Mini-ESP32/partitions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
spiffs, data, spiffs, 0x310000,0xE0000,
coredump, data, coredump,0x3F0000,0x10000,
16 changes: 16 additions & 0 deletions boards/Wemos-Lolin-S3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

# Wemos Lolin S3

## Flashing
```bash
python -m esptool \
--chip esp32-s3 \
merge_bin -o OpenShock.S3.bin \
--flash_mode dio \
--flash_freq 40m \
--flash_size 4MB \
0x0 ./bootloader.bin \
0x8000 ./partitions.bin \
0x10000 ./firmware.bin \
0x310000 ./littlefs.bin
```
37 changes: 37 additions & 0 deletions boards/Wemos-Lolin-S3/board.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"build": {
"arduino": {
"ldscript": "esp32_out.ld"
},
"core": "esp32",
"extra_flags": "-DARDUINO_D1_MINI32",
"f_cpu": "240000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
"mcu": "esp32",
"variant": "d1_mini32"
},
"connectivity": [
"wifi",
"bluetooth",
"ethernet",
"can"
],
"debug": {
"openocd_board": "esp-wroom-32.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "WEMOS D1 MINI ESP32",
"upload": {
"flash_size": "4MB",
"maximum_ram_size": 327680,
"maximum_size": 4194304,
"require_upload_port": true,
"speed": 460800
},
"url": "https://www.wemos.cc",
"vendor": "WEMOS"
}
11 changes: 11 additions & 0 deletions boards/Wemos-Lolin-S3/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "Wemos Lolin S3",
"env": "Wemos-Lolin-S3",
"board": "boards/Wemos-Lolin-S3/board.json",
"image": {
"0x0": "bootloader.bin",
"0x8000": "partitions.bin",
"0x10000": "firmware.bin",
"0x310000": "littlefs.bin"
}
}
6 changes: 6 additions & 0 deletions boards/Wemos-Lolin-S3/partitions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
spiffs, data, spiffs, 0x310000,0xE0000,
coredump, data, coredump,0x3F0000,0x10000,
14 changes: 8 additions & 6 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[env]
platform = espressif32
board = az-delivery-devkit-v4
board = az-delivery-devkit-v4 # Overridden per board
framework = arduino
build_flags =
-std=gnu++2a
Expand All @@ -22,7 +22,7 @@ lib_deps =
https://github.com/martinmoene/span-lite
https://github.com/me-no-dev/ESPAsyncWebServer
https://github.com/Links2004/arduinoWebSockets
board_build.partitions = huge_app.csv
board_build.partitions = huge_app.csv # Overridden per board
board_build.filesystem = littlefs
extra_scripts =
pre:embed_version.py
Expand All @@ -37,16 +37,18 @@ monitor_speed = 115200

# https://docs.platformio.org/en/stable/boards/espressif32/wemos_d1_mini32.html
[env:Wemos-D1-Mini-ESP32]
board = wemos_d1_mini32
board = boards/Wemos-D1-Mini-ESP32/board.json
partitions = boards/Wemos-D1-Mini-ESP32/partitions.csv

# https://docs.platformio.org/en/latest/boards/espressif32/lolin_s2_mini.html
[env:Wemos-Lolin-S2-Mini]
board = lolin_s2_mini
# [env:Wemos-Lolin-S2-Mini]
# board = lolin_s2_mini

# https://docs.platformio.org/en/latest/boards/espressif32/lolin_s3.html
# SOC:
[env:Wemos-Lolin-S3]
board = lolin_s3
board = boards/Wemos-Lolin-S3/board.json
partitions = boards/Wemos-Lolin-S3/partitions.csv

# TODO:
# https://docs.platformio.org/en/latest/boards/espressif32/upesy_wroom.html#upesy-esp32-wroom-devkit
Expand Down

0 comments on commit 8bc08a5

Please sign in to comment.