Skip to content

Commit

Permalink
Merge branch 'feature/support_esp32s2_ota' into 'master'
Browse files Browse the repository at this point in the history
feat: Added ota support for esp32-s2

See merge request application/esp-at!1561
  • Loading branch information
xcguang committed May 10, 2024
2 parents 63b9986 + 877c7e6 commit d894ef7
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_template_esp32s2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
type: string
# parameters from upstream inherit
secrets:
ESP32S2_4MB_TOKEN:
AT_OTA_TOKEN_ESP32S2_MINI:
required: false

jobs:
Expand All @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions .gitlab/ci/build_esp32s2.yml
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 2 additions & 2 deletions .gitlab/ci/build_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -

#############################
Expand Down
4 changes: 2 additions & 2 deletions components/at/private_include/at_ota_token.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion components/at/src/at_default_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d894ef7

Please sign in to comment.