feat(esp_tee): Support for ESP-TEE - tools directory

This commit is contained in:
Laukik Hase
2024-07-01 17:17:36 +05:30
parent e51d2c1da3
commit 420810ee77
5 changed files with 40 additions and 23 deletions

View File

@@ -111,6 +111,7 @@
/components/esp_rom/ @esp-idf-codeowners/system @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi /components/esp_rom/ @esp-idf-codeowners/system @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi
/components/esp_security/ @esp-idf-codeowners/security /components/esp_security/ @esp-idf-codeowners/security
/components/esp_system/ @esp-idf-codeowners/system /components/esp_system/ @esp-idf-codeowners/system
/components/esp_tee/ @esp-idf-codeowners/security
/components/esp_timer/ @esp-idf-codeowners/system /components/esp_timer/ @esp-idf-codeowners/system
/components/esp-tls/ @esp-idf-codeowners/app-utilities /components/esp-tls/ @esp-idf-codeowners/app-utilities
/components/esp_vfs_*/ @esp-idf-codeowners/storage /components/esp_vfs_*/ @esp-idf-codeowners/storage

View File

@@ -13,29 +13,7 @@ endif()
# Add the following build specifications here, since these seem to be dependent # Add the following build specifications here, since these seem to be dependent
# on config values on the root Kconfig. # on config values on the root Kconfig.
if(NOT BOOTLOADER_BUILD) if(BOOTLOADER_BUILD)
if(CONFIG_COMPILER_OPTIMIZATION_SIZE)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
list(APPEND compile_options "-Oz")
else()
list(APPEND compile_options "-Os")
endif()
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
list(APPEND compile_options "-freorder-blocks")
endif()
elseif(CONFIG_COMPILER_OPTIMIZATION_DEBUG)
list(APPEND compile_options "-Og")
if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT CONFIG_IDF_TARGET_LINUX)
list(APPEND compile_options "-fno-shrink-wrap") # Disable shrink-wrapping to reduce binary size
endif()
elseif(CONFIG_COMPILER_OPTIMIZATION_NONE)
list(APPEND compile_options "-O0")
elseif(CONFIG_COMPILER_OPTIMIZATION_PERF)
list(APPEND compile_options "-O2")
endif()
else() # BOOTLOADER_BUILD
if(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE) if(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE)
if(CMAKE_C_COMPILER_ID MATCHES "Clang") if(CMAKE_C_COMPILER_ID MATCHES "Clang")
@@ -57,6 +35,37 @@ else() # BOOTLOADER_BUILD
list(APPEND compile_options "-O2") list(APPEND compile_options "-O2")
endif() endif()
elseif(ESP_TEE_BUILD)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
list(APPEND compile_options "-Oz")
else()
list(APPEND compile_options "-Os")
list(APPEND compile_options "-freorder-blocks")
endif()
else()
if(CONFIG_COMPILER_OPTIMIZATION_SIZE)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
list(APPEND compile_options "-Oz")
else()
list(APPEND compile_options "-Os")
endif()
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
list(APPEND compile_options "-freorder-blocks")
endif()
elseif(CONFIG_COMPILER_OPTIMIZATION_DEBUG)
list(APPEND compile_options "-Og")
if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT CONFIG_IDF_TARGET_LINUX)
list(APPEND compile_options "-fno-shrink-wrap") # Disable shrink-wrapping to reduce binary size
endif()
elseif(CONFIG_COMPILER_OPTIMIZATION_NONE)
list(APPEND compile_options "-O0")
elseif(CONFIG_COMPILER_OPTIMIZATION_PERF)
list(APPEND compile_options "-O2")
endif()
endif() endif()
if(CONFIG_COMPILER_CXX_EXCEPTIONS) if(CONFIG_COMPILER_CXX_EXCEPTIONS)

View File

@@ -30,6 +30,8 @@ TYPE_PATTERNS_DICT = {
ArtifactType.MAP_AND_ELF_FILES: [ ArtifactType.MAP_AND_ELF_FILES: [
'**/build*/bootloader/*.map', '**/build*/bootloader/*.map',
'**/build*/bootloader/*.elf', '**/build*/bootloader/*.elf',
'**/build*/esp_tee/*.map',
'**/build*/esp_tee/*.elf',
'**/build*/*.map', '**/build*/*.map',
'**/build*/*.elf', '**/build*/*.elf',
], ],
@@ -37,6 +39,7 @@ TYPE_PATTERNS_DICT = {
f'**/build*/{DEFAULT_BUILD_LOG_FILENAME}', f'**/build*/{DEFAULT_BUILD_LOG_FILENAME}',
'**/build*/*.bin', '**/build*/*.bin',
'**/build*/bootloader/*.bin', '**/build*/bootloader/*.bin',
'**/build*/esp_tee/*.bin',
'**/build*/partition_table/*.bin', '**/build*/partition_table/*.bin',
'**/build*/flasher_args.json', '**/build*/flasher_args.json',
'**/build*/flash_project_args', '**/build*/flash_project_args',

View File

@@ -45,6 +45,8 @@ class AppUploader(AppDownloader):
ArtifactType.MAP_AND_ELF_FILES: [ ArtifactType.MAP_AND_ELF_FILES: [
'bootloader/*.map', 'bootloader/*.map',
'bootloader/*.elf', 'bootloader/*.elf',
'esp_tee/*.map',
'esp_tee/*.elf',
'*.map', '*.map',
'*.elf', '*.elf',
'gdbinit/*', 'gdbinit/*',
@@ -52,6 +54,7 @@ class AppUploader(AppDownloader):
ArtifactType.BUILD_DIR_WITHOUT_MAP_AND_ELF_FILES: [ ArtifactType.BUILD_DIR_WITHOUT_MAP_AND_ELF_FILES: [
'*.bin', '*.bin',
'bootloader/*.bin', 'bootloader/*.bin',
'esp_tee/*.bin',
'partition_table/*.bin', 'partition_table/*.bin',
'flasher_args.json', 'flasher_args.json',
'flash_project_args', 'flash_project_args',

View File

@@ -525,6 +525,7 @@ macro(idf_build_process target)
idf_build_set_property(BOOTLOADER_BUILD "${BOOTLOADER_BUILD}") idf_build_set_property(BOOTLOADER_BUILD "${BOOTLOADER_BUILD}")
idf_build_set_property(NON_OS_BUILD "${NON_OS_BUILD}") idf_build_set_property(NON_OS_BUILD "${NON_OS_BUILD}")
idf_build_set_property(ESP_TEE_BUILD "${ESP_TEE_BUILD}")
idf_build_set_property(IDF_TOOLCHAIN "${IDF_TOOLCHAIN}") idf_build_set_property(IDF_TOOLCHAIN "${IDF_TOOLCHAIN}")