diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 9095bfe82..bf6adc604 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -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 @@ -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/* diff --git a/boards.local.txt b/boards.local.txt new file mode 100644 index 000000000..5d13334ab --- /dev/null +++ b/boards.local.txt @@ -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 \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 8ac09ee84..56747d796 100644 --- a/platformio.ini +++ b/platformio.ini @@ -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 diff --git a/src/Wippersnapper_Boards.h b/src/Wippersnapper_Boards.h index 642513e2c..8b0324f92 100644 --- a/src/Wippersnapper_Boards.h +++ b/src/Wippersnapper_Boards.h @@ -186,7 +186,7 @@ #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. @@ -194,6 +194,11 @@ #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