Skip to content

Commit

Permalink
[ESP32] CI: Build applications for C6 and H2 targets and added light-…
Browse files Browse the repository at this point in the history
…switch (#28515)

* [ESP32] CI: Build applications for C6 and H2 targets and added light-swich

* Its a 4M flash device

* Enable CONFIG_MBEDTLS_HKDF_C for C6
  • Loading branch information
shubhamdp authored and pull[bot] committed Oct 10, 2023
1 parent e839c48 commit 8ce285b
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 4 deletions.
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

0 comments on commit 8ce285b

Please sign in to comment.