Skip to content

Commit 5990002

Browse files
authored
Merge pull request #615 from adafruit/add-adafruit-feather-esp32c6
Add Adafruit Feather ESP32-C6
2 parents 12ea607 + 5c4dda0 commit 5990002

12 files changed

+178
-18
lines changed

.github/workflows/build-clang-doxy.yml

Lines changed: 117 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ jobs:
223223
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
224224
225225
build-esp32:
226-
name: Build WipperSnapper ESP32, ESP32-C3
226+
name: Build WipperSnapper ESP32, ESP32-Cx
227227
runs-on: ubuntu-latest
228228
strategy:
229229
fail-fast: false
@@ -235,11 +235,14 @@ jobs:
235235
"feather_esp32_v2",
236236
"itsybitsy_esp32",
237237
"wippersnapper_qtpy_esp32c3",
238+
"wippersnapper_feather_esp32c6",
238239
]
239240
include:
240241
- offset: "0x1000"
241242
- offset: "0x0"
242243
arduino-platform: "wippersnapper_qtpy_esp32c3"
244+
- offset: "0x0"
245+
arduino-platform: "wippersnapper_feather_esp32c6"
243246
steps:
244247
- uses: actions/setup-python@v4
245248
with:
@@ -610,6 +613,119 @@ jobs:
610613
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
611614
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
612615
616+
build-esp32-dev:
617+
name: Build WipperSnapper ESP32/Cx DEV BUILDS
618+
runs-on: ubuntu-latest
619+
strategy:
620+
fail-fast: false
621+
matrix:
622+
arduino-platform:
623+
[
624+
"wippersnapper_feather_esp32c6_debug",
625+
]
626+
include:
627+
- offset: "0x1000"
628+
- offset: "0x0"
629+
arduino-platform: "wippersnapper_feather_esp32c6_debug"
630+
steps:
631+
- uses: actions/setup-python@v4
632+
with:
633+
python-version: "3.x"
634+
- uses: actions/checkout@v4
635+
- name: Get WipperSnapper version
636+
run: |
637+
git fetch --prune --unshallow --tags
638+
git describe --dirty --tags
639+
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
640+
- uses: actions/checkout@v4
641+
with:
642+
repository: adafruit/ci-arduino
643+
path: ci
644+
- name: Checkout Board Definitions
645+
uses: actions/checkout@v4
646+
with:
647+
repository: adafruit/Wippersnapper_Boards
648+
path: ws-boards
649+
- name: Install CI-Arduino
650+
run: bash ci/actions_install.sh
651+
- name: Install extra Arduino libraries
652+
run: |
653+
git clone --quiet https://github.com/milesburton/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
654+
git clone --quiet https://github.com/pstolarz/OneWireNg.git /home/runner/Arduino/libraries/OneWireNg
655+
- name: Download and install stable Nanopb
656+
run: |
657+
# Download and extract nanopb
658+
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
659+
tar -xf nanopb-0.4.8.tar.gz
660+
# Copy files to WipperSnapper's src/nanopb directory
661+
cp nanopb/pb_common.* nanopb/pb_encode.* nanopb/pb_decode.* src/nanopb
662+
mv nanopb/pb.h src/nanopb/nanopb.pb.h
663+
- name: Install Dependencies
664+
run: |
665+
pip3 install esptool
666+
- name: build ESP32 platforms
667+
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
668+
- name: Check artifacts
669+
run: |
670+
ls examples/wippersnapper_debug/build/*
671+
- name: Rename build artifacts to reflect the platform name
672+
run: |
673+
mv examples/wippersnapper_debug/build/*/wippersnapper_debug.ino.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bin
674+
mv examples/wippersnapper_debug/build/*/wippersnapper_debug.ino.elf wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.elf
675+
mv examples/wippersnapper_debug/build/*/wippersnapper_debug.ino.map wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.map
676+
mv examples/wippersnapper_debug/build/*/wippersnapper_debug.ino.bootloader.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bootloader.bin
677+
mv examples/wippersnapper_debug/build/*/wippersnapper_debug.ino.partitions.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.partitions.bin
678+
- name: Check boot_app0 file existence (esp32 built from core, not-source)
679+
id: check_files
680+
uses: andstor/file-existence-action@v2
681+
with:
682+
files: "/home/runner/.arduino15/packages/esp32/hardware/esp32/*/tools/partitions/boot_app0.bin"
683+
- name: boot_app0 file from arduino-cli core
684+
if: steps.check_files.outputs.files_exists == 'true'
685+
run: mv /home/runner/.arduino15/packages/esp32/hardware/esp32/*/tools/partitions/boot_app0.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.boot_app0.bin
686+
- name: boot_app0 file from esp32 source bsp
687+
if: steps.check_files.outputs.files_exists == 'false'
688+
run: mv /home/runner/Arduino/hardware/espressif/esp32/tools/partitions/boot_app0.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.boot_app0.bin
689+
- name: Get Board Flash Parameters
690+
id: get_board_json
691+
run: |
692+
board_name=${{ matrix.arduino-platform }}
693+
# Remove '_noota' suffix if present
694+
board_name=${board_name%_noota}
695+
# Remove '_debug' suffix if present
696+
board_name=${board_name%_debug}
697+
# Remove 'wippersnapper_' prefix if present
698+
board_name=${board_name#wippersnapper_}
699+
content=$(cat ws-boards/boards/${board_name//_/-}/definition.json)
700+
{
701+
echo 'boardJson<<EOF'
702+
echo $content
703+
echo EOF
704+
} >> "$GITHUB_OUTPUT"
705+
- name: Create combined binary using Esptool merge_bin
706+
run: |
707+
echo ${{ steps.get_board_json.outputs.boardJson }}
708+
echo ${{ fromJson(steps.get_board_json.outputs.boardJson) }}
709+
python3 -m esptool --chip ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.chip}} merge_bin \
710+
--flash_mode ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashMode}} \
711+
--flash_freq ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashFreq}} \
712+
--flash_size ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashSize}} \
713+
-o wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.combined.bin \
714+
${{ matrix.offset }} wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bootloader.bin \
715+
0x8000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.partitions.bin \
716+
0xe000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.boot_app0.bin \
717+
0x10000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bin
718+
- name: Zip build artifacts
719+
run: |
720+
zip -r wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.zip wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.*
721+
- name: upload build artifacts zip
722+
uses: actions/upload-artifact@v3
723+
with:
724+
name: build-files-dev
725+
path: |
726+
wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.zip
727+
728+
613729
clang_and_doxy:
614730
runs-on: ubuntu-latest
615731
needs:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Adafruit WipperSnapper
2-
version=1.0.0-beta.88
2+
version=1.0.0-alpha.89
33
author=Adafruit
44
maintainer=Adafruit <adafruitio@adafruit.com>
55
sentence=Arduino application for Adafruit.io WipperSnapper

platformio.ini

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ lib_deps =
7070
adafruit/Adafruit TouchScreen
7171
adafruit/Adafruit MQTT Library
7272
bblanchon/ArduinoJson
73-
https://github.com/PaulStoffregen/OneWire.git
73+
https://github.com/pstolarz/OneWireNg.git
7474
https://github.com/milesburton/Arduino-Temperature-Control-Library.git
7575
https://github.com/Sensirion/arduino-sht.git
7676
https://github.com/Sensirion/arduino-i2c-scd4x.git
@@ -81,14 +81,16 @@ lib_deps =
8181

8282
; Common build environment for ESP32 platform
8383
[common:esp32]
84-
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.03/platform-espressif32.zip
85-
lib_ignore = WiFiNINA, WiFi101
84+
; platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip
85+
; This is needed for Adafruit Feather C6 in platformio (until 51.03.05):
86+
platform = https://github.com/pioarduino/platform-espressif32#develop
87+
lib_ignore = WiFiNINA, WiFi101, OneWire
8688
monitor_filters = esp32_exception_decoder, time
8789

8890
; Common build environment for ESP8266 platform
8991
[common:esp8266]
9092
platform = espressif8266
91-
lib_ignore = WiFiNINA, WiFi101, Adafruit TinyUSB Library
93+
lib_ignore = WiFiNINA, WiFi101, Adafruit TinyUSB Library, OneWire
9294

9395
; Common build environment for Atmel/Microchip SAMDx platform
9496
[common:atsamd]
@@ -98,6 +100,7 @@ platform_packages =
98100
platformio/tool-jlink@^1.78811.0
99101
lib_ldf_mode = deep
100102
lib_archive = no ; debug timer issues see https://community.platformio.org/t/choose-usb-stack-as-tiny-usb/22451/5
103+
lib_ignore = OneWire
101104

102105
[common:rp2040]
103106
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
@@ -110,7 +113,7 @@ board_build.core = earlephilhower
110113
board_build.filesystem_size = 0.5m
111114
build_flags = -DUSE_TINYUSB
112115
; Once https://github.com/platformio/platformio-core > 6.1.11 these can be removed
113-
lib_ignore = WiFiNINA, WiFi101, Adafruit Zero DMA Library
116+
lib_ignore = WiFiNINA, WiFi101, Adafruit Zero DMA Library, OneWire
114117
lib_compat_mode = soft ; can be strict once pio detects SleepyDog on RP2040
115118

116119

@@ -142,6 +145,35 @@ board = adafruit_itsybitsy_esp32
142145
build_flags = -DARDUINO_ADAFRUIT_ITSYBITSY_ESP32
143146
board_build.filesystem = littlefs
144147

148+
; Adafruit ESP32 Feather C6
149+
[env:adafruit_feather_esp32c6_4mbflash_nopsram]
150+
extends = common:esp32
151+
board = adafruit_feather_esp32c6
152+
build_flags =
153+
-DARDUINO_ADAFRUIT_FEATHER_ESP32C6
154+
-DARDUINO_USB_CDC_ON_BOOT=1
155+
-DCORE_DEBUG_LEVEL=3
156+
board_build.filesystem = littlefs
157+
board_build.partitions = min_spiffs.csv
158+
159+
; Espressif ESP32-C6 4MB NO PSRAM esp32-c6-devkitm-1
160+
[env:espressif_esp32-c6-devkitm-1]
161+
extends = common:esp32
162+
board = esp32-c6-devkitm-1
163+
build_type = debug
164+
build_flags =
165+
-DARDUINO_ESPRESSIF_ESP32C6_DEVKITM_1
166+
-DARDUINO_ADAFRUIT_FEATHER_ESP32C6
167+
-DNDEBUG=1
168+
-DDEBUG=1
169+
-DESP_LOG_LEVEL=5
170+
-DARDUINO_CORE_DEBUG_LEVEL=5
171+
-DARDUINO_DEBUG_LEVEL=5
172+
-DARDUINO_LOG_LEVEL=5
173+
-DCORE_DEBUG_LEVEL=5
174+
-DARDUHAL_LOG_LEVEL=5
175+
board_build.filesystem = littlefs
176+
board_build.partitions = min_spiffs.csv
145177

146178
; Adafruit Feather ESP32-S2
147179
[env:featheresp32s2]
@@ -259,7 +291,7 @@ extra_scripts = pre:rename_usb_config.py
259291
extends = common:esp32
260292
board = esp32-s3-devkitc-1
261293
build_type = debug
262-
build_flags =
294+
build_flags =
263295
-DUSE_TINYUSB=1
264296
-DARDUINO_ESPRESSIF_ESP32S3_DEVKITC_1_N8
265297
-DNDEBUG=1
@@ -308,13 +340,13 @@ monitor_port = auto
308340
; debug_init_break = tbreak clearConfiguration
309341
lib_ignore = USBHost
310342
build_flags = -DUSE_TINYUSB
311-
-D__SAMD51J20A__
312-
-DCRYSTALLESS
313-
-DADAFRUIT_PYPORTAL_M4_TITANO
314-
-D__SAMD51__
315-
-D__FPU_PRESENT
316-
-DARM_MATH_CM4
317-
-mfloat-abi=hard
343+
-D__SAMD51J20A__
344+
-DCRYSTALLESS
345+
-DADAFRUIT_PYPORTAL_M4_TITANO
346+
-D__SAMD51__
347+
-D__FPU_PRESENT
348+
-DARM_MATH_CM4
349+
-mfloat-abi=hard
318350
-mfpu=fpv4-sp-d16
319351
-DCORE_DEBUG_LEVEL=5
320352
-DARDUINO_USB_CDC_ON_BOOT=1
@@ -384,4 +416,3 @@ build_flags =
384416
; ; No USB stack
385417
; build_flags = -DPIO_FRAMEWORK_ARDUINO_NO_USB
386418
; -DPIO_FRAMEWORK_ARDUINO_ENABLE_IPV6
387-

src/Wippersnapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
#endif
143143

144144
#define WS_VERSION \
145-
"1.0.0-beta.88" ///< WipperSnapper app. version (semver-formatted)
145+
"1.0.0-alpha.89" ///< WipperSnapper app. version (semver-formatted)
146146

147147
// Reserved Adafruit IO MQTT topics
148148
#define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic

0 commit comments

Comments
 (0)