Skip to content

Build WipperSnapper ESP32/ESP32-S2 with ESP32 Arduino core version 2.0.0 #164

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

Merged
merged 10 commits into from
Oct 4, 2021
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
87 changes: 44 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
release-wippersnapper:
name: Release WipperSnapper
runs-on: ubuntu-latest
needs: [build-samd, build-esp32, build-esp32s2]
#needs: [build-samd, build-esp32, build-esp32s2]
needs: [build-samd, build-esp32]
steps:
- name: Download build artifacts from build-platform steps
uses: actions/download-artifact@v2
Expand All @@ -28,46 +29,46 @@ jobs:
wippersnapper.*.uf2
wippersnapper.*.bin

build-esp32s2:
name: Build WipperSnapper ESP32-S2
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arduino-platform: ["funhouse_tinyusb", "magtag_tinyusb",
"metro_s2_tinyusb"]
steps:
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- uses: actions/checkout@v2
- name: Get WipperSnapper version
run: |
git fetch --prune --unshallow --tags
git describe --dirty --tags
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
- uses: actions/checkout@v2
with:
repository: brentru/ci-arduino
path: ci
- name: Install CI-Arduino
run: bash ci/actions_install.sh
- name: Install extra Arduino libraries
run: |
git clone --quiet https://github.com/brentru/Adafruit_MQTT_Library.git /home/runner/Arduino/libraries/Adafruit_MQTT_Library
- name: Build for ESP32-S2
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}
- name: Rename build artifacts to reflect the platform name
run: |
mv examples/*/build/*/Wippersnapper_demo.ino.uf2 wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
mv examples/*/build/*/Wippersnapper_demo.ino.bin wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
- name: upload build artifacts
uses: actions/upload-artifact@v2
with:
name: build-files
path: |
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
# build-esp32s2:
# name: Build WipperSnapper ESP32-S2
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# arduino-platform: ["funhouse_tinyusb", "magtag_tinyusb",
# "metro_s2_tinyusb"]
# steps:
# - uses: actions/setup-python@v1
# with:
# python-version: '3.x'
# - uses: actions/checkout@v2
# - name: Get WipperSnapper version
# run: |
# git fetch --prune --unshallow --tags
# git describe --dirty --tags
# echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
# - uses: actions/checkout@v2
# with:
# repository: brentru/ci-arduino
# path: ci
# - name: Install CI-Arduino
# run: bash ci/actions_install.sh
# - name: Install extra Arduino libraries
# run: |
# git clone --quiet https://github.com/brentru/Adafruit_MQTT_Library.git /home/runner/Arduino/libraries/Adafruit_MQTT_Library
# - name: Build for ESP32-S2
# run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}
# - name: Rename build artifacts to reflect the platform name
# run: |
# mv examples/*/build/*/Wippersnapper_demo.ino.uf2 wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
# mv examples/*/build/*/Wippersnapper_demo.ino.bin wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
# - name: upload build artifacts
# uses: actions/upload-artifact@v2
# with:
# name: build-files
# path: |
# wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
# wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin


build-esp32:
Expand All @@ -89,7 +90,7 @@ jobs:
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
- uses: actions/checkout@v2
with:
repository: adafruit/ci-arduino
repository: brentru/ci-arduino
path: ci
- name: Install CI-Arduino
run: bash ci/actions_install.sh
Expand Down Expand Up @@ -127,7 +128,7 @@ jobs:
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
- uses: actions/checkout@v2
with:
repository: adafruit/ci-arduino
repository: brentru/ci-arduino
path: ci
- name: Install CI-Arduino
run: bash ci/actions_install.sh
Expand Down
10 changes: 5 additions & 5 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name=Adafruit WipperSnapper
version=1.0.0-beta.11
name=Adafruit WipperSnapper Beta
version=1.0.0-beta.12
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=Arduino library to access WipperSnapper
paragraph=Arduino library to access WipperSnapper
sentence=Arduino library for Adafruit.io WipperSnapper
paragraph=Arduino library for Adafruit.io WipperSnapper
category=Communication
url=https://github.com/adafruit/Adafruit_IO_Arduino
architectures=*
depends=Adafruit NeoPixel, Adafruit TinyUSB Library, Adafruit SPIFlash, ArduinoJson, Adafruit DotStar, Adafruit SleepyDog Library
depends=Adafruit NeoPixel, Adafruit SPIFlash, ArduinoJson, Adafruit DotStar, Adafruit SleepyDog Library, Adafruit TinyUSB Library
2 changes: 1 addition & 1 deletion src/Wippersnapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#endif

#define WS_VERSION \
"1.0.0-beta.11" ///< WipperSnapper app. version (semver-formatted)
"1.0.0-beta.12" ///< WipperSnapper app. version (semver-formatted)

// Reserved Adafruit IO MQTT topics
#define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic
Expand Down
10 changes: 6 additions & 4 deletions src/provisioning/tinyusb/Wippersnapper_FS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
* BSD license, all text here must be included in any redistribution.
*
*/
#if defined(USE_TINYUSB)
#if defined(ARDUINO_MAGTAG29_ESP32S2) || defined(ARDUINO_METRO_ESP32S2) || defined(ARDUINO_FUNHOUSE_ESP32S2) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) || defined(ADAFRUIT_PYPORTAL)
#include "Wippersnapper_FS.h"

// On-board external flash (QSPI or SPI) macros should already
// defined in your board variant if supported
// - EXTERNAL_FLASH_USE_QSPI
Expand Down Expand Up @@ -71,7 +70,7 @@ bool setVolumeLabel() {
/**************************************************************************/
Wippersnapper_FS::Wippersnapper_FS() {
// Detach USB device during init.
USBDevice.detach();
TinyUSBDevice.detach();
// Wait for detach
delay(500);

Expand Down Expand Up @@ -186,12 +185,15 @@ void Wippersnapper_FS::initUSBMSC() {

// Set disk size, block size should be 512 regardless of spi flash page size
usb_msc.setCapacity(flash.pageSize() * flash.numPages() / 512, 512);

// MSC is ready for read/write
usb_msc.setUnitReady(true);

// init MSC
usb_msc.begin();

// re-attach the usb device
USBDevice.attach();
TinyUSBDevice.attach();
// wait for enumeration
delay(500);
}
Expand Down