Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add M5 Stamp S3 support #393

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
55 changes: 54 additions & 1 deletion .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ jobs:

- name: Configure configs.h for Flipper Zero WiFi Dev Board
run: |
sed -i 's/^ #define MARAUDER_M5STAMP_S3/ \/\/#define MARAUDER_M5STAMP_S3/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_M5STICKC/ \/\/#define MARAUDER_M5STICKC/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
Expand Down Expand Up @@ -237,10 +238,35 @@ jobs:
run: |
mv ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.multiboardS3.bin

- name: Configure configs.h for M5 Stamp S3 Dev Board
run: |
sed -i 's/^ #define MARAUDER_M5STICKC/ \/\/#define MARAUDER_M5STICKC/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V4/ \/\/#define MARAUDER_V4/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V6/ \/\/#define MARAUDER_V6/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_V6_1/ \/\/#define MARAUDER_V6_1/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_KIT/ \/\/#define MARAUDER_KIT/' esp32_marauder/configs.h
sed -i 's/^ #define GENERIC_ESP32/ \/\/#define GENERIC_ESP32/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
sed -i 's/^ #define ESP32_LDDB/ \/\/#define ESP32_LDDB/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_DEV_BOARD_PRO/ \/\/#define MARAUDER_DEV_BOARD_PRO/' esp32_marauder/configs.h
sed -i 's/^ \/\/#define MARAUDER_M5STAMP_S3/ #define MARAUDER_M5STAMP_S3/' esp32_marauder/configs.h

- name: Build Marauder for StampS3 Board
uses: ArminJo/[email protected]
with:
sketch-names: esp32_marauder.ino
arduino-board-fqbn: esp32:esp32:esp32s3:PartitionScheme=min_spiffs,FlashSize=8M,PSRAM=enabled
extra-arduino-cli-args: "--warnings none"

- name: Rename Marauder StampS3 bin
run: |
mv ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.ino.bin ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.stampS3.bin

- name: Configure TFT_eSPI and configs.h for OG Marauder
run: |
pwd
find /home/runner/ -name "*TFT_eSPI*"
find /home/runner/ -name "*TFT_eSPI*"
sed -i 's/^#include <User_Setup_marauder_mini.h>/\/\/#include <User_Setup_marauder_mini.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^\/\/#include <User_Setup_og_marauder.h>/#include <User_Setup_og_marauder.h>/' /home/runner/Arduino/libraries/CustomTFT_eSPI/User_Setup_Select.h
sed -i 's/^ #define MARAUDER_MINI/ \/\/#define MARAUDER_MINI/' esp32_marauder/configs.h
Expand All @@ -252,6 +278,7 @@ jobs:
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
sed -i 's/^ #define ESP32_LDDB/ \/\/#define ESP32_LDDB/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_DEV_BOARD_PRO/ \/\/#define MARAUDER_DEV_BOARD_PRO/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_M5STAMP_S3/ \/\/#define MARAUDER_M5STAMP_S3/' esp32_marauder/configs.h

- name: Build Marauder for OG Marauder
uses: ArminJo/[email protected]
Expand All @@ -277,6 +304,7 @@ jobs:
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
sed -i 's/^ #define ESP32_LDDB/ \/\/#define ESP32_LDDB/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_DEV_BOARD_PRO/ \/\/#define MARAUDER_DEV_BOARD_PRO/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_M5STAMP_S3/ \/\/#define MARAUDER_M5STAMP_S3/' esp32_marauder/configs.h

#- name: Build Marauder for v6 Marauder with arduino/compile-sketches
# uses: arduino/compile-sketches@v1
Expand Down Expand Up @@ -317,6 +345,7 @@ jobs:
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
sed -i 's/^ #define ESP32_LDDB/ \/\/#define ESP32_LDDB/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_DEV_BOARD_PRO/ \/\/#define MARAUDER_DEV_BOARD_PRO/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_M5STAMP_S3/ \/\/#define MARAUDER_M5STAMP_S3/' esp32_marauder/configs.h

- name: Build Marauder for v6.1 Marauder
uses: ArminJo/[email protected]
Expand All @@ -342,6 +371,7 @@ jobs:
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
sed -i 's/^ #define ESP32_LDDB/ \/\/#define ESP32_LDDB/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_DEV_BOARD_PRO/ \/\/#define MARAUDER_DEV_BOARD_PRO/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_M5STAMP_S3/ \/\/#define MARAUDER_M5STAMP_S3/' esp32_marauder/configs.h

- name: Build Marauder for Marauder Kit
uses: ArminJo/[email protected]
Expand All @@ -367,6 +397,7 @@ jobs:
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
sed -i 's/^ #define ESP32_LDDB/ \/\/#define ESP32_LDDB/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_DEV_BOARD_PRO/ \/\/#define MARAUDER_DEV_BOARD_PRO/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_M5STAMP_S3/ \/\/#define MARAUDER_M5STAMP_S3/' esp32_marauder/configs.h

- name: Build Marauder for Marauder Mini
uses: ArminJo/[email protected]
Expand All @@ -390,6 +421,7 @@ jobs:
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
sed -i 's/^ \/\/#define ESP32_LDDB/ #define ESP32_LDDB/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_DEV_BOARD_PRO/ \/\/#define MARAUDER_DEV_BOARD_PRO/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_M5STAMP_S3/ \/\/#define MARAUDER_M5STAMP_S3/' esp32_marauder/configs.h

- name: Build Marauder for ESP32 LDDB
uses: ArminJo/[email protected]
Expand All @@ -413,6 +445,7 @@ jobs:
sed -i 's/^ #define MARAUDER_FLIPPER/ \/\/#define MARAUDER_FLIPPER/' esp32_marauder/configs.h
sed -i 's/^ #define ESP32_LDDB/ \/\/#define ESP32_LDDB/' esp32_marauder/configs.h
sed -i 's/^ \/\/#define MARAUDER_DEV_BOARD_PRO/ #define MARAUDER_DEV_BOARD_PRO/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_M5STAMP_S3/ \/\/#define MARAUDER_M5STAMP_S3/' esp32_marauder/configs.h

- name: Build Marauder for Marauder Dev Board Pro
uses: ArminJo/[email protected]
Expand Down Expand Up @@ -441,6 +474,7 @@ jobs:
sed -i 's/^ #define ESP32_LDDB/ \/\/#define ESP32_LDDB/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_DEV_BOARD_PRO/ \/\/#define MARAUDER_DEV_BOARD_PRO/' esp32_marauder/configs.h
sed -i 's/^ \/\/#define MARAUDER_M5STICKC/ #define MARAUDER_M5STICKC/' esp32_marauder/configs.h
sed -i 's/^ #define MARAUDER_M5STAMP_S3/ \/\/#define MARAUDER_M5STAMP_S3/' esp32_marauder/configs.h

- name: Build Marauder for Marauder M5StickC
uses: ArminJo/[email protected]
Expand Down Expand Up @@ -533,6 +567,13 @@ jobs:
name: esp32_marauder.m5stickc_plus.bin
path: ./esp32_marauder/build/esp32.esp32.m5stick-c/esp32_marauder.m5stickc_plus.bin
retention-days: 5

- name: 'Upload Marauder StampS3 Artifact'
uses: actions/upload-artifact@v3
with:
name: esp32_marauder.stampS3.bin
path: ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.stampS3.bin
retention-days: 5

- name: Create Release
id: create_release
Expand Down Expand Up @@ -677,3 +718,15 @@ jobs:
asset_name: esp32_marauder.m5stickc_plus.bin
asset_content_type: application/bin
if: github.event_name != 'pull_request'

- name: Upload StampS3 Asset
id: upload-stampS3-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.stampS3.bin
asset_name: esp32_marauder.stampS3.bin
asset_content_type: application/bin
if: github.event_name != 'pull_request'
2 changes: 1 addition & 1 deletion esp32_marauder/WiFiScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4562,4 +4562,4 @@ void WiFiScan::main(uint32_t currentTime)
packets_sent = 0;
}
}
}
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I'm not sure what happened here

2 changes: 1 addition & 1 deletion esp32_marauder/WiFiScan.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,4 +374,4 @@ class WiFiScan
static void wifiSnifferCallback(void* buf, wifi_promiscuous_pkt_type_t type);
static void addPacket(wifi_promiscuous_pkt_t *snifferPacket, int len);
};
#endif
#endif
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well...

38 changes: 37 additions & 1 deletion esp32_marauder/configs.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
//#define WRITE_PACKETS_SERIAL

//// BOARD TARGETS
//#define MARAUDER_M5STAMP_S3
//#define MARAUDER_M5STICKC
//#define MARAUDER_MINI
//#define MARAUDER_V4
Expand All @@ -25,6 +26,22 @@
#define MARAUDER_VERSION "v0.13.5"

//// BOARD FEATURES
#ifdef MARAUDER_M5STAMP_S3
//#define FLIPPER_ZERO_HAT
//#define HAS_BATTERY
//#define HAS_BT
//#define HAS_BUTTONS
#define HAS_NEOPIXEL_LED
//#define HAS_PWR_MGMT
//#define HAS_SCREEN
#define HAS_GPS
#ifndef WRITE_PACKETS_SERIAL
#define HAS_SD
#define USE_SD
#endif
//#define HAS_TEMP_SENSOR
#endif

#ifdef MARAUDER_M5STICKC
//#define FLIPPER_ZERO_HAT
#define HAS_BATTERY
Expand Down Expand Up @@ -670,6 +687,10 @@
#define SD_CS -1
#endif

#ifdef MARAUDER_M5STAMP_S3
#define SD_CS 10
#endif

#ifdef MARAUDER_FLIPPER
#define SD_CS 10
#endif
Expand Down Expand Up @@ -731,6 +752,8 @@
#define MEM_LOWER_LIM 20000
#elif defined(MARAUDER_FLIPPER)
#define MEM_LOWER_LIM 20000
#elif defined(MARAUDER_M5STAMP_S3)
#define MEM_LOWER_LIM 20000
#elif defined(ESP32_LDDB)
#define MEM_LOWER_LIM 20000
#elif defined(MARAUDER_DEV_BOARD_PRO)
Expand All @@ -743,7 +766,9 @@
//// NEOPIXEL STUFF
#ifdef HAS_NEOPIXEL_LED

#if defined(ESP32_LDDB)
#if defined(MARAUDER_M5STAMP_S3)
#define PIN 21
#elif defined(ESP32_LDDB)
#define PIN 17
#elif defined(MARAUDER_DEV_BOARD_PRO)
#define PIN 16
Expand Down Expand Up @@ -778,6 +803,8 @@
#define MAX_HTML_SIZE 20000
#elif defined(MARAUDER_FLIPPER)
#define MAX_HTML_SIZE 20000
#elif defined(MARAUDER_M5STAMP_S3)
#define MAX_HTML_SIZE 20000
#elif defined(ESP32_LDDB)
#define MAX_HTML_SIZE 20000
#elif defined(MARAUDER_DEV_BOARD_PRO)
Expand Down Expand Up @@ -825,6 +852,15 @@
#define GPS_TX 9
#define GPS_RX 21
#define mac_history_len 512
#elif defined(MARAUDER_M5STAMP_S3)
#ifdef WRITE_PACKETS_SERIAL
#define GPS_SOFTWARE_SERIAL
#else
#define GPS_SERIAL_INDEX 1
#endif
#define GPS_TX 9
#define GPS_RX 21
#define mac_history_len 512
#elif defined(MARAUDER_M5STICKC)
#define GPS_SERIAL_INDEX 1
#define GPS_TX 33
Expand Down
8 changes: 4 additions & 4 deletions esp32_marauder/esp32_marauder.ino
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ void setup()
#endif

backlightOff();
#if BATTERY_ANALOG_ON == 1
pinMode(BATTERY_PIN, OUTPUT);
pinMode(CHARGING_PIN, INPUT);
#endif
#if BATTERY_ANALOG_ON == 1
pinMode(BATTERY_PIN, OUTPUT);
pinMode(CHARGING_PIN, INPUT);
#endif

// Preset SPI CS pins to avoid bus conflicts
#ifdef HAS_SCREEN
Expand Down