Skip to content
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

[ESP32] CI: Build applications for C6 and H2 targets and added light-switch #28515

Merged
merged 3 commits into from
Aug 7, 2023
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
14 changes: 10 additions & 4 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,15 @@ jobs:
esp32 c3devkit all-clusters-app \
example_binaries/esp32-build/chip-all-clusters-app.elf \
/tmp/bloat_reports/

- name: Build example Pigweed App
run: scripts/examples/esp_example.sh pigweed-app sdkconfig.defaults
- name: Build example Lighting App
run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults
- name: Build example Lock App
run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults

- name: Build example Lighting App (Target:ESP32H2)
run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults.esp32h2

- name: Build example Lock App (Target:ESP32C6)
run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults.esp32c6

- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
Expand Down Expand Up @@ -156,3 +159,6 @@ jobs:

- name: Build example OTA Provider App
run: scripts/examples/esp_example.sh ota-provider-app sdkconfig.defaults

- name: Build example Light Switch App (Target:ESP32C3)
run: scripts/examples/esp_example.sh light-switch-app sdkconfig.defaults.esp32c3
35 changes: 35 additions & 0 deletions examples/light-switch-app/esp32/sdkconfig.defaults.esp32c3
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
CONFIG_IDF_TARGET="esp32c3"
CONFIG_IDF_TARGET_ESP32C3=y
CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM=y

# Default to 921600 baud when flashing and monitoring device
CONFIG_ESPTOOLPY_BAUD_921600B=y
CONFIG_ESPTOOLPY_BAUD=921600
CONFIG_ESPTOOLPY_COMPRESSED=y
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200

#enable BT
CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y

#enable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=y

# Use a custom partition table
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"

#enable lwIP route hooks
CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y
CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y

# Serial Flasher config
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"

# Enable HKDF in mbedtls
CONFIG_MBEDTLS_HKDF_C=y

# Move functions from IRAM to flash
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
3 changes: 3 additions & 0 deletions examples/lighting-app/esp32/sdkconfig.defaults.esp32h2
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
# libsodium
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y

# Serial Flasher config
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"

# NIMBLE
CONFIG_BT_ENABLED=y
Expand Down
60 changes: 60 additions & 0 deletions examples/lock-app/esp32/sdkconfig.defaults.esp32c6
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
CONFIG_IDF_TARGET="esp32c6"

# Default to 921600 baud when flashing and monitoring device
CONFIG_ESPTOOLPY_BAUD_921600B=y
CONFIG_ESPTOOLPY_BAUD=921600
CONFIG_ESPTOOLPY_COMPRESSED=y
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200

# libsodium
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y

# NIMBLE
CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_EXT_ADV=n
CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n

# Disable OpenThread
CONFIG_OPENTHREAD_ENABLED=n

# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n

# Use a custom partition table
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"

# LwIP config for OpenThread
CONFIG_LWIP_IPV6_NUM_ADDRESSES=8
CONFIG_LWIP_MULTICAST_PING=y

# mbedTLS
CONFIG_MBEDTLS_HARDWARE_AES=n
CONFIG_MBEDTLS_HARDWARE_MPI=n
CONFIG_MBEDTLS_HARDWARE_SHA=n
CONFIG_MBEDTLS_HARDWARE_ECC=y
CONFIG_MBEDTLS_CMAC_C=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE=y
CONFIG_MBEDTLS_ECJPAKE_C=y

# MDNS platform
CONFIG_USE_MINIMAL_MDNS=y
CONFIG_ENABLE_EXTENDED_DISCOVERY=y

# FreeRTOS should use legacy API
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y

# Wi-Fi Settings
CONFIG_ENABLE_WIFI_STATION=y
CONFIG_ENABLE_WIFI_AP=n
# Enable this to avoid implicit declaration of function 'esp_send_assoc_resp'
CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y

# Enable HKDF in mbedtls
CONFIG_MBEDTLS_HKDF_C=y