This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move port and extra components directory to a common location shared by
all boards. Remove mbedTLS port files and use ESP-IDF provided files. Changes in CMakeLists for mbedTLS to support ESP32-S2.
- Loading branch information
1 parent
3136da5
commit cc5530d
Showing
101 changed files
with
170 additions
and
7,075 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
vendors/espressif/boards/components/esp_http_server/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Nothing to do, esp_http_server component can not be supported with FreeRTOS TCP stack |
2 changes: 2 additions & 0 deletions
2
vendors/espressif/boards/components/esp_http_server/component.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Nothing to do, esp_http_server component can not be supported with FreeRTOS TCP stack | ||
COMPONENT_CONFIG_ONLY := 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
...ds/esp32/components/freertos/component.mk → ...f/boards/components/freertos/component.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
101 changes: 101 additions & 0 deletions
101
vendors/espressif/boards/components/mbedtls/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
idf_component_register() | ||
|
||
set(FREERTOS_COMPONENT_DIR "${CMAKE_CURRENT_LIST_DIR}/../freertos") | ||
set(MBEDTLS_DIR "${AFR_VENDORS_DIR}/espressif/esp-idf/components/mbedtls") | ||
|
||
string(FIND "${AFR_BOARD_NAME}" "esp32s2" SOC_NAME_ESP32S2) | ||
string(FIND "${AFR_BOARD_NAME}" "esp32" SOC_NAME_ESP32) | ||
|
||
if (NOT(${SOC_NAME_ESP32S2} EQUAL -1)) | ||
set(SOC_NAME "esp32s2") | ||
elseif(NOT($SOC_NAME_ESP32) EQUAL -1) | ||
set(SOC_NAME "esp32") | ||
endif() | ||
|
||
target_compile_options( | ||
afr_3rdparty_mbedtls | ||
PUBLIC | ||
${IDF_COMPILE_OPTIONS} | ||
$<$<COMPILE_LANGUAGE:C>:${IDF_C_COMPILE_OPTIONS}> | ||
$<$<COMPILE_LANGUAGE:CXX>:${IDF_CXX_COMPILE_OPTIONS}> | ||
"-Wno-maybe-uninitialized" | ||
) | ||
|
||
set( | ||
include_dirs | ||
${IDF_INCLUDE_DIRECTORIES} | ||
${MBEDTLS_DIR}/port/include | ||
"${AFR_VENDORS_DIR}/espressif/esp-idf/components/xtensa/include" | ||
"${AFR_VENDORS_DIR}/espressif/esp-idf/components/soc/soc/include" | ||
) | ||
|
||
if("${SOC_NAME}" STREQUAL "esp32s2") | ||
list(APPEND include_dirs | ||
"${AFR_VENDORS_DIR}/espressif/esp-idf/components/soc/src/esp32s2/include" | ||
"${AFR_VENDORS_DIR}/espressif/esp-idf/components/esp32s2/include" | ||
) | ||
else() | ||
list(APPEND include_dirs | ||
"${AFR_VENDORS_DIR}/espressif/esp-idf/components/soc/src/esp32/include" | ||
) | ||
endif() | ||
|
||
target_include_directories( | ||
afr_3rdparty_mbedtls | ||
BEFORE | ||
PRIVATE | ||
"${AFR_VENDORS_DIR}/espressif/esp-idf/components/vfs/include" | ||
"${AFR_VENDORS_DIR}/espressif/esp-idf/components/soc/soc/include/soc" | ||
${FREERTOS_COMPONENT_DIR}/include | ||
PUBLIC | ||
${include_dirs} | ||
) | ||
|
||
set( | ||
mbedtls_srcs | ||
"${MBEDTLS_DIR}/port/esp_bignum.c" | ||
"${MBEDTLS_DIR}/port/esp_mem.c" | ||
"${MBEDTLS_DIR}/port/esp_hardware.c" | ||
"${MBEDTLS_DIR}/port/mbedtls_debug.c" | ||
"${MBEDTLS_DIR}/port/esp_aes_xts.c" | ||
) | ||
|
||
if("${SOC_NAME}" STREQUAL "esp32s2") | ||
list(APPEND mbedtls_srcs | ||
"${MBEDTLS_DIR}/port/esp32s2/aes.c" | ||
"${MBEDTLS_DIR}/port/esp32s2/sha.c" | ||
"${MBEDTLS_DIR}/port/esp32s2/bignum.c" | ||
"${MBEDTLS_DIR}/port/esp32s2/esp_sha1.c" | ||
"${MBEDTLS_DIR}/port/esp32s2/esp_sha512.c" | ||
"${MBEDTLS_DIR}/port/esp32s2/esp_sha256.c" | ||
"${AFR_VENDORS_DIR}/espressif/esp-idf/components/esp32s2/esp_crypto_lock.c" | ||
) | ||
else() | ||
list(APPEND mbedtls_srcs | ||
"${MBEDTLS_DIR}/port/esp32/aes.c" | ||
"${MBEDTLS_DIR}/port/esp32/sha.c" | ||
"${MBEDTLS_DIR}/port/esp32/bignum.c" | ||
"${MBEDTLS_DIR}/port/esp32/esp_sha1.c" | ||
"${MBEDTLS_DIR}/port/esp32/esp_sha512.c" | ||
"${MBEDTLS_DIR}/port/esp32/esp_sha256.c" | ||
) | ||
endif() | ||
|
||
target_sources( | ||
afr_3rdparty_mbedtls | ||
PUBLIC | ||
${mbedtls_srcs} | ||
) | ||
|
||
target_compile_definitions( | ||
afr_3rdparty_mbedtls | ||
PUBLIC | ||
${IDF_COMPILE_DEFINITIONS} | ||
-DMBEDTLS_CONFIG_FILE="${MBEDTLS_DIR}/port/include/mbedtls/esp_config.h" | ||
) | ||
|
||
target_link_libraries( | ||
${COMPONENT_TARGET} | ||
INTERFACE | ||
afr_3rdparty_mbedtls | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
vendors/espressif/boards/components/mbedtls/Makefile.projbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Anyone compiling mbedTLS code needs the name of the | ||
# alternative config file | ||
MBEDTLS_DIR := ../../../esp-idf/components/mbedtls/port/include | ||
CPPFLAGS += -DMBEDTLS_CONFIG_FILE='"$(MBEDTLS_DIR)/mbedtls/esp_config.h"' | ||
|
9 changes: 5 additions & 4 deletions
9
...rds/esp32/components/mbedtls/component.mk → ...if/boards/components/mbedtls/component.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Nothing to do, protocomm component can not be supported with FreeRTOS TCP stack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Nothing to do, protocomm component can not be supported with FreeRTOS TCP stack | ||
COMPONENT_CONFIG_ONLY := 1 |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...32/components/secure_sockets/component.mk → ...ds/components/secure_sockets/component.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
vendors/espressif/boards/components/wifi_provisioning/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Nothing to do, wifi_provisioning component can not be supported with FreeRTOS TCP stack |
2 changes: 2 additions & 0 deletions
2
vendors/espressif/boards/components/wifi_provisioning/component.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Nothing to do, wifi_provisioning component can not be supported with FreeRTOS TCP stack | ||
COMPONENT_CONFIG_ONLY := 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 0 additions & 54 deletions
54
vendors/espressif/boards/esp32/components/mbedtls/CMakeLists.txt
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
vendors/espressif/boards/esp32/components/mbedtls/Makefile.projbuild
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.