diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bae7e83..2363f54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,29 +11,34 @@ on: jobs: build: + # Project setup dominates vs. actual per-configuration build times, so + # just run twister for all boards instead of splitting into separate jobs. + # strategy: + # matrix: + # board: + # [ + # esp_wrover_kit/esp32/procpu, + # esp32s3_devkitm/esp32s3/procpu, + # esp32s3_devkitc/esp32s3/procpu, + # esp32c3_devkitm, + # ] runs-on: ubuntu-latest - container: - # Zephyr toolchain from here: - # https://github.com/zephyrproject-rtos/docker-image/pkgs/container/ci - image: ghcr.io/zephyrproject-rtos/ci:v0.26.6 - env: - # Tell cmake where to find the zephyr sdk - CMAKE_PREFIX_PATH: /opt/toolchains - steps: - - name: Checkout code + - name: ☑️ Checkout uses: actions/checkout@v4 with: - path: zephyr-workspace/zephyr-esp32-example + path: zephyr-esp32-example - - name: ♻️ Initialize Zephyr Workspace - # Set up the Zephyr workspace and install the Python dependencies - run: | - cd zephyr-workspace - rm -rf .west - west init -l zephyr-esp32-example - west update --narrow -o=--depth=1 - west blobs fetch hal_espressif + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.11 + + - name: ♻️ Setup Zephyr project + uses: zephyrproject-rtos/action-zephyr-setup@v1 + with: + app-path: zephyr-esp32-example + toolchains: riscv64-zephyr-elf:xtensa-espressif_esp32_zephyr-elf:xtensa-espressif_esp32s3_zephyr-elf - name: 💾 Cache ~/.cache/ccache uses: actions/cache@v3 @@ -43,27 +48,19 @@ jobs: restore-keys: | ccache-v1-${{ runner.os }}- - - name: 🔨 Build Project + - name: 🌪️ Run twister run: | - cd zephyr-workspace - ccache -z - - west build --sysbuild \ - --pristine=always \ - --board=esp32s3_devkitm/esp32s3/procpu zephyr-esp32-example \ - -- \ - -DCONFIG_MEMFAULT_PROJECT_KEY=\"1234\" - - west build --sysbuild \ - --pristine=always \ - --board=esp32s3_devkitc/esp32s3/procpu zephyr-esp32-example \ - -- \ - -DCONFIG_MEMFAULT_PROJECT_KEY=\"1234\" + # not part of action-zephyr-setup + west blobs fetch hal_espressif - west build --sysbuild \ - --pristine=always \ - --board=esp32c3_devkitm zephyr-esp32-example \ - -- \ - -DCONFIG_MEMFAULT_PROJECT_KEY=\"1234\" + zephyr/scripts/twister --testsuite-root zephyr-esp32-example ccache -sv + + - name: 🎨 Upload artifacts + uses: actions/upload-artifact@v4 + if: ${{ always() }} + with: + name: twister-artifacts + path: | + twister-out/**/*.log diff --git a/boards/esp32s3_devkitc_esp32s3_procpu.conf b/boards/esp32s3_devkitc_esp32s3_procpu.conf index 893cecd..56fd230 100644 --- a/boards/esp32s3_devkitc_esp32s3_procpu.conf +++ b/boards/esp32s3_devkitc_esp32s3_procpu.conf @@ -1,5 +1,3 @@ -CONFIG_NET_LOG=y - # Enable external SPI RAM CONFIG_SPI=y CONFIG_ESP_SPIRAM=y diff --git a/boards/esp32s3_devkitc_esp32s3_procpu.overlay b/boards/esp32s3_devkitc_esp32s3_procpu.overlay index b417db0..44eee6f 100644 --- a/boards/esp32s3_devkitc_esp32s3_procpu.overlay +++ b/boards/esp32s3_devkitc_esp32s3_procpu.overlay @@ -11,3 +11,8 @@ &coretemp { status = "okay"; }; + +/* 2MB psram. This assumes target board is the ESP32-S3-DevKitC-1-N8R2 */ +&psram0 { + size = ; +}; diff --git a/boards/esp32s3_devkitm_esp32s3_procpu.conf b/boards/esp32s3_devkitm_esp32s3_procpu.conf index b5fb2e3..e69de29 100644 --- a/boards/esp32s3_devkitm_esp32s3_procpu.conf +++ b/boards/esp32s3_devkitm_esp32s3_procpu.conf @@ -1 +0,0 @@ -CONFIG_NET_LOG=y diff --git a/boards/esp_wrover_kit_procpu.conf b/boards/esp_wrover_kit_procpu.conf new file mode 100644 index 0000000..e69de29 diff --git a/boards/esp_wrover_kit_procpu.overlay b/boards/esp_wrover_kit_procpu.overlay new file mode 100644 index 0000000..d342be1 --- /dev/null +++ b/boards/esp_wrover_kit_procpu.overlay @@ -0,0 +1,3 @@ +&wifi { + status = "okay"; +}; diff --git a/sample.yaml b/sample.yaml index a199e23..6687d33 100644 --- a/sample.yaml +++ b/sample.yaml @@ -1,43 +1,18 @@ common: - harness: net - tags: - - net - - wifi + tags: memfault + platform_allow: + - esp_wrover_kit/esp32/procpu + - esp32s3_devkitm/esp32s3/procpu + - esp32s3_devkitc/esp32s3/procpu + - esp32c3_devkitm sample: - description: Test wifi driver and APIs functionality - name: WiFi sample app + description: Memfault Zephyr ESP32 Example + name: zephyr-esp32-example tests: - sample.net.wifi: - platform_allow: - - cc3220sf_launchxl - - disco_l475_iot1 - - reel_board - integration_platforms: - - cc3220sf_launchxl - sample.net.wifi.mikroe_wifi_bt_click: - extra_args: SHIELD=mikroe_wifi_bt_click_mikrobus - platform_allow: lpcxpresso55s69_cpu0 - sample.net.wifi.esp_8266: - extra_args: SHIELD=esp_8266 - platform_allow: sam4e_xpro - sample.net.wifi.esp_8266_arduino: - extra_args: SHIELD=esp_8266_arduino - platform_allow: - - frdm_k64f - - disco_l475_iot1 - integration_platforms: - - frdm_k64f - sample.net.wifi.inventek_eswifi_arduino_uart: - extra_args: SHIELD=inventek_eswifi_arduino_uart - platform_allow: - - frdm_k64f - - nucleo_f767zi - integration_platforms: - - frdm_k64f - sample.net.wifi.inventek_eswifi_arduino_spi: - extra_args: SHIELD=inventek_eswifi_arduino_spi - platform_allow: - - frdm_k64f - - nucleo_f767zi - integration_platforms: - - frdm_k64f + sample.build: + build_only: true + extra_configs: + - CONFIG_MEMFAULT_PROJECT_KEY="dummy" + # when building with a symlinked test Memfault SDK module, need to disable + # the meta build output, otherwise it will fail as post-link. + - CONFIG_BUILD_OUTPUT_META=n diff --git a/west.yml b/west.yml index adff06f..5488704 100644 --- a/west.yml +++ b/west.yml @@ -2,7 +2,7 @@ manifest: projects: - name: zephyr url: https://github.com/zephyrproject-rtos/zephyr - revision: v4.0.0 + revision: v4.1.0 import: # Limit the Zephyr modules to the required set name-allowlist: @@ -13,4 +13,5 @@ manifest: - name: memfault-firmware-sdk url: https://github.com/memfault/memfault-firmware-sdk path: modules/lib/memfault-firmware-sdk - revision: 1.17.0 + # Temporarily use a fork with ESP32 support, until 1.26.0 is released + revision: noahp/1.25.0+esp32-support