Skip to content

Board-local-txt #784

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions .github/workflows/build-clang-doxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ jobs:
- uses: actions/checkout@v4
with:
repository: adafruit/ci-arduino
ref: ci-wippersnapper
ref: ci-wippersnapper-boards-local-txt
path: ci
- name: Checkout Board Definitions
uses: actions/checkout@v4
Expand Down Expand Up @@ -441,7 +441,7 @@ jobs:
run: |
pip install esptool
- name: build ESP32 platforms
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000 --boards-local-txt
- name: Check artifacts
run: |
ls examples/Wippersnapper_demo/build/*
Expand Down
17 changes: 17 additions & 0 deletions boards.local.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This is to allow providing extra defines like WS_MY_BOARD_NAME for any boards using generic module board definitions.
# Instead of the MY_BOARD_NAME suffix, it should match the unique Board ID in Wippersnapper_Boards.h, but
# uppercase with underscores for dashes. e.g. "dfrobot-beetle-esp32c3" becomes WS_DFROBOT_BEETLE_ESP32C3 with -D for define.
#
# See if the board.txt already has extra board.defines= in any menu entries, or only the basic empty board.defines=
# so for example this existing one dfrobot_romeo_esp32s3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
# then you would add a replacement entry with the existing plus additionally the new -DWS_UNIQUE_BOARD_NAME define:
# dfrobot_romeo_esp32s3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -DWS_DFROBOT_UNIQUE_BOARD_ID
#
# Do the same for the board entry in the platformio.ini file: build_flags = -DWS_YOUR_UNIQUE_BOARD_ID
#
# Note: If needed we can do a version of this file for each board build target in case boards don't have a
# unique definition in boards.txt to add an override. Then in CI pass filename with --boards-local-txt file


# DF Robot ESP32-C3 shares define with Espressif ESP32_C3 Devkit/Module, so needs unique define:
dfrobot_beetle_esp32c3.build.defines=-DWS_DFROBOT_BEETLE_ESP32C3
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ board = dfrobot_beetle_esp32c3
; Note: this board reuses a generic preprocessor define
; espressif/arduino-esp32@fcd4799c6de6eb5a5a8eba94818adf770238ecc0
; rather than creating one unique to the device.
build_flags = -DARDUINO_ESP32C3_DEV
build_flags = -DARDUINO_ESP32C3_DEV -DWS_DFROBOT_BEETLE_ESP32C3
board_build.filesystem = littlefs
board_build.partitions = min_spiffs.csv

Expand Down
7 changes: 6 additions & 1 deletion src/Wippersnapper_Boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,19 @@
#define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
#define STATUS_NEOPIXEL_NUM 1
#define USE_PSRAM ///< Board has PSRAM, use it for dynamic memory allocation
#elif defined(ARDUINO_ESP32C3_DEV)
#elif defined(WS_DFROBOT_BEETLE_ESP32C3)
// Note: this board reuses a generic preprocessor define
// espressif/arduino-esp32@fcd4799c6de6eb5a5a8eba94818adf770238ecc0
// rather than creating one unique to the device.
#define BOARD_ID "dfrobot-beetle-esp32c3"
#define USE_LITTLEFS
#define USE_STATUS_LED
#define STATUS_LED_PIN LED_BUILTIN
#elif defined(ARDUINO_ESP32C3_DEV)
#define BOARD_ID "dfrobot-beetle-esp32c3"
#define USE_LITTLEFS
#define USE_STATUS_LED
#define STATUS_LED_PIN LED_BUILTIN
#elif defined(ARDUINO_SPARKLEMOTIONMINI_ESP32)
#define BOARD_ID "sparklemotionmini-esp32"
#define USE_LITTLEFS
Expand Down
Loading