From 877c7e69bbcbb0f847e5bb153026b56f2163fd86 Mon Sep 17 00:00:00 2001 From: Chen Wu Date: Fri, 10 May 2024 14:37:20 +0800 Subject: [PATCH] feat: Added ota support for esp32-s2 --- .github/workflows/build_template_esp32s2.yml | 6 +++--- .github/workflows/main.yml | 6 +++--- .gitlab/ci/build_esp32s2.yml | 8 ++++---- .gitlab/ci/build_template.yml | 4 ++-- components/at/private_include/at_ota_token.h | 4 ++-- components/at/src/at_default_config.c | 2 +- .../raw_data/factory_param/factory_param_data.csv | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build_template_esp32s2.yml b/.github/workflows/build_template_esp32s2.yml index 5d6018a0..fba983e4 100644 --- a/.github/workflows/build_template_esp32s2.yml +++ b/.github/workflows/build_template_esp32s2.yml @@ -12,7 +12,7 @@ on: type: string # parameters from upstream inherit secrets: - ESP32S2_4MB_TOKEN: + AT_OTA_TOKEN_ESP32S2_MINI: required: false jobs: @@ -33,8 +33,8 @@ jobs: cd components/at/private_include rm -f at_ota_token.h echo -e "#pragma once" >> at_ota_token.h - echo -e "#define CONFIG_ESP_AT_OTA_TOKEN_ESP32S2_4MB \"${{ secrets.ESP32S2_4MB_TOKEN }}\"" >> at_ota_token.h - echo -e "#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32S2_4MB \"${{ secrets.ESP32S2_4MB_TOKEN }}\"" >> at_ota_token.h + echo -e "#define CONFIG_ESP_AT_OTA_TOKEN_ESP32S2_MINI \"${{ secrets.AT_OTA_TOKEN_ESP32S2_MINI }}\"" >> at_ota_token.h + echo -e "#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32S2_MINI \"${{ secrets.AT_OTA_TOKEN_ESP32S2_MINI }}\"" >> at_ota_token.h cd - - name: Install ESP-IDF environment variables run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d5e5e538..6e17543c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -122,9 +122,9 @@ jobs: artifacts_name: esp32c6-4MB-at secrets: inherit - build-esp32s2-4mb-at: + build-esp32s2-mini-at: uses: ./.github/workflows/build_template_esp32s2.yml with: - module_name: ESP32S2-4MB - artifacts_name: esp32s2-4MB-at + module_name: MINI + artifacts_name: esp32s2-mini-at secrets: inherit diff --git a/.gitlab/ci/build_esp32s2.yml b/.gitlab/ci/build_esp32s2.yml index a0beecd8..855d2be6 100644 --- a/.gitlab/ci/build_esp32s2.yml +++ b/.gitlab/ci/build_esp32s2.yml @@ -1,16 +1,16 @@ # Build ESP32-S2 AT Firmwares -esp32s2_4mb_at: +esp32s2_mini_at: extends: - .build_template_esp32s2 - .rules:build:build_project variables: - MODULE_NAME: "ESP32S2-4MB" + MODULE_NAME: "MINI" -esp32s2_4mb_at_tat_debug: +esp32s2_mini_at_tat_debug: extends: - .build_template_esp32s2 - .before_script_enable_at_debugs - .rules:build:build_project_on_protected variables: - MODULE_NAME: "ESP32S2-4MB" + MODULE_NAME: "MINI" diff --git a/.gitlab/ci/build_template.yml b/.gitlab/ci/build_template.yml index 70ae97ce..5ea879b9 100644 --- a/.gitlab/ci/build_template.yml +++ b/.gitlab/ci/build_template.yml @@ -102,8 +102,8 @@ .setup_tokens_esp32s2: &setup_tokens_esp32s2 - cd components/at/private_include - rm -f at_ota_token.h - - echo -e "#define CONFIG_ESP_AT_OTA_TOKEN_ESP32S2_4MB \"$ESP32S2_4MB_TOKEN\"" >> at_ota_token.h - - echo -e "#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32S2_4MB \"$ESP32S2_4MB_TOKEN\"" >> at_ota_token.h + - echo -e "#define CONFIG_ESP_AT_OTA_TOKEN_ESP32S2_MINI \"$AT_OTA_TOKEN_ESP32S2_MINI\"" >> at_ota_token.h + - echo -e "#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32S2_MINI \"$AT_OTA_TOKEN_ESP32S2_MINI\"" >> at_ota_token.h - cd - ############################# diff --git a/components/at/private_include/at_ota_token.h b/components/at/private_include/at_ota_token.h index 33c4e1f3..8a72f859 100644 --- a/components/at/private_include/at_ota_token.h +++ b/components/at/private_include/at_ota_token.h @@ -41,6 +41,6 @@ #define CONFIG_ESP_AT_OTA_TOKEN_ESP32C6_4MB CONFIG_ESP_AT_OTA_TOKEN_DEFAULT #define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32C6_4MB CONFIG_ESP_AT_OTA_SSL_TOKEN_DEFAULT #elif defined(CONFIG_IDF_TARGET_ESP32S2) -#define CONFIG_ESP_AT_OTA_TOKEN_ESP32S2_4MB CONFIG_ESP_AT_OTA_TOKEN_DEFAULT -#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32S2_4MB CONFIG_ESP_AT_OTA_SSL_TOKEN_DEFAULT +#define CONFIG_ESP_AT_OTA_TOKEN_ESP32S2_MINI CONFIG_ESP_AT_OTA_TOKEN_DEFAULT +#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32S2_MINI CONFIG_ESP_AT_OTA_SSL_TOKEN_DEFAULT #endif diff --git a/components/at/src/at_default_config.c b/components/at/src/at_default_config.c index 9e61f90f..22a8e7a7 100644 --- a/components/at/src/at_default_config.c +++ b/components/at/src/at_default_config.c @@ -53,7 +53,7 @@ static const esp_at_module_info_t esp_at_module_info[] = { #endif #if defined(CONFIG_IDF_TARGET_ESP32S2) - {"ESP32S2-4MB", CONFIG_ESP_AT_OTA_TOKEN_ESP32S2_4MB, CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32S2_4MB}, + {"MINI", CONFIG_ESP_AT_OTA_TOKEN_ESP32S2_MINI, CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32S2_MINI}, #endif }; diff --git a/components/customized_partitions/raw_data/factory_param/factory_param_data.csv b/components/customized_partitions/raw_data/factory_param/factory_param_data.csv index 6aed0c88..f74f58e2 100644 --- a/components/customized_partitions/raw_data/factory_param/factory_param_data.csv +++ b/components/customized_partitions/raw_data/factory_param/factory_param_data.csv @@ -13,4 +13,4 @@ PLATFORM_ESP32C2,ESP32C2-2MB,"single Wi-Fi, 2MB, TX:7 RX:6",4,78,1,1,13,CN,11520 PLATFORM_ESP32C2,ESP32C2-4MB,"Wi-Fi + BluFi, 4MB, TX:7 RX:6",4,78,1,1,13,CN,115200,7,6,5,4 PLATFORM_ESP32C2,ESP32C2-BLE-2MB,"single BLE, 2MB, TX:7 RX:6",4,78,1,1,13,CN,115200,7,6,5,4 PLATFORM_ESP32C6,ESP32C6-4MB,"TX:7 RX:6",4,78,1,1,13,CN,115200,7,6,5,4 -PLATFORM_ESP32S2,ESP32S2-4MB,"TX:17 RX:21",4,78,1,1,13,CN,115200,17,21,20,19 +PLATFORM_ESP32S2,MINI,"TX:17 RX:21",4,78,1,1,13,CN,115200,17,21,20,19