forked from meshtastic/firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Seeed XIAO S3 Board (meshtastic#4850)
* feat: add seeed-xiao-s3 board defination and pins defination * chore: add SEEED XIAO S3 into mesh pb * fix: fix trunk fmt check failed * Trunk fmt variant.h * Restore automatically generated file --------- Co-authored-by: Tom Fifield <[email protected]>
- Loading branch information
1 parent
bebd2bb
commit 1293c5c
Showing
5 changed files
with
165 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"build": { | ||
"arduino": { | ||
"ldscript": "esp32s3_out.ld", | ||
"memory_type": "qio_opi" | ||
}, | ||
"core": "esp32", | ||
"extra_flags": [ | ||
"-DBOARD_HAS_PSRAM", | ||
"-DARDUINO_USB_CDC_ON_BOOT=1", | ||
"-DARDUINO_USB_MODE=0", | ||
"-DARDUINO_RUNNING_CORE=1", | ||
"-DARDUINO_EVENT_RUNNING_CORE=0" | ||
], | ||
"f_cpu": "240000000L", | ||
"f_flash": "80000000L", | ||
"flash_mode": "qio", | ||
"hwids": [["0x2886", "0x0059"]], | ||
"mcu": "esp32s3", | ||
"variant": "seeed-xiao-s3" | ||
}, | ||
"connectivity": ["wifi", "bluetooth", "lora"], | ||
"debug": { | ||
"default_tool": "esp-builtin", | ||
"onboard_tools": ["esp-builtin"], | ||
"openocd_target": "esp32s3.cfg" | ||
}, | ||
"frameworks": ["arduino", "espidf"], | ||
"name": "seeed-xiao-s3", | ||
"upload": { | ||
"flash_size": "8MB", | ||
"maximum_ram_size": 8388608, | ||
"maximum_size": 8388608, | ||
"use_1200bps_touch": true, | ||
"wait_for_upload_port": true, | ||
"require_upload_port": true, | ||
"speed": 921600 | ||
}, | ||
"url": "https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html", | ||
"vendor": "Seeed Studio" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef Pins_Arduino_h | ||
#define Pins_Arduino_h | ||
|
||
#include <stdint.h> | ||
|
||
#define USB_VID 0x2886 | ||
#define USB_PID 0x0059 | ||
|
||
// GPIO48 Reference: https://github.com/espressif/arduino-esp32/pull/8600 | ||
|
||
// The default Wire will be mapped to Screen and Sensors | ||
static const uint8_t SDA = 47; | ||
static const uint8_t SCL = 48; | ||
|
||
// Default SPI will be mapped to Radio | ||
static const uint8_t MISO = 8; | ||
static const uint8_t SCK = 7; | ||
static const uint8_t MOSI = 9; | ||
static const uint8_t SS = 41; | ||
|
||
#endif /* Pins_Arduino_h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[env:seeed-xiao-s3] | ||
extends = esp32s3_base | ||
board = seeed-xiao-s3 | ||
board_check = true | ||
board_build.mcu = esp32s3 | ||
upload_protocol = esptool | ||
upload_speed = 921600 | ||
lib_deps = | ||
${esp32s3_base.lib_deps} | ||
build_unflags = | ||
${esp32s3_base.build_unflags} | ||
-DARDUINO_USB_MODE=1 | ||
build_flags = | ||
${esp32s3_base.build_flags} -DSEEED_XIAO_S3 -I variants/seeed_xiao_s3 | ||
-DBOARD_HAS_PSRAM | ||
|
||
-DARDUINO_USB_MODE=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* | ||
▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ | ||
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌ | ||
▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌ | ||
▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ | ||
▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌ | ||
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌ | ||
▀▀▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌ ▐░▌ | ||
▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ | ||
▄▄▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌ | ||
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌ | ||
▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ | ||
▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ | ||
▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ | ||
▐░▌ ▐░▌ ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌ ▐░█▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀█░▌ | ||
▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ | ||
▐░▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄█░▌ | ||
▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ | ||
▐░▌░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌ ▀▀▀▀▀▀▀▀▀█░▌ ▀▀▀▀▀▀▀▀▀█░▌ | ||
▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ | ||
▐░▌ ▐░▌ ▄▄▄▄█░█▄▄▄▄ ▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌ | ||
▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ | ||
▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ | ||
*/ | ||
|
||
/* | ||
Board Information: https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html | ||
Expansion Board Infomation : https://www.seeedstudio.com/Seeeduino-XIAO-Expansion-board-p-4746.html | ||
L76K GPS Module Information : https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html | ||
*/ | ||
|
||
#define LED_PIN 48 | ||
#define LED_STATE_ON 1 // State when LED is lit | ||
|
||
#define BUTTON_PIN 21 // This is the Program Button | ||
#define BUTTON_NEED_PULLUP | ||
|
||
/*Warning: | ||
https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html | ||
L76K Expansion Board can not directly used, L76K Reset Pin needs to override or physically remove it, | ||
otherwise it will conflict with the SPI pins | ||
*/ | ||
// #define GPS_L76K | ||
#ifdef GPS_L76K | ||
#define GPS_RX_PIN 44 | ||
#define GPS_TX_PIN 43 | ||
#define HAS_GPS 1 | ||
#define GPS_BAUDRATE 9600 | ||
#define GPS_THREAD_INTERVAL 50 | ||
#define PIN_SERIAL1_RX PIN_GPS_TX | ||
#define PIN_SERIAL1_TX PIN_GPS_RX | ||
#define PIN_GPS_STANDBY 1 | ||
#endif | ||
|
||
// XIAO S3 Expansion board has 1.3 inch OLED Screen | ||
#define USCREEN_SSD1306 | ||
|
||
#define I2C_SDA 5 | ||
#define I2C_SCL 6 | ||
|
||
// XIAO S3 LORA module | ||
#define USE_SX1262 | ||
|
||
#define LORA_MISO 8 | ||
#define LORA_SCK 7 | ||
#define LORA_MOSI 9 | ||
#define LORA_CS 41 | ||
|
||
#define LORA_RESET 42 | ||
#define LORA_DIO1 39 | ||
|
||
#define LORA_DIO2 38 | ||
|
||
#ifdef USE_SX1262 | ||
#define SX126X_CS LORA_CS | ||
#define SX126X_DIO1 LORA_DIO1 | ||
#define SX126X_BUSY 40 | ||
#define SX126X_RESET LORA_RESET | ||
|
||
// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 | ||
#define SX126X_DIO2_AS_RF_SWITCH | ||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 | ||
#endif |