mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 00:36:01 -04:00
Merge branch 'feature/arch_build_property' into 'master'
build-system: add property for architecture (riscv/xtensa) Closes IDF-1754 See merge request espressif/esp-idf!18127
This commit is contained in:
commit
d485f6add8
@ -9,5 +9,5 @@ if(NOT BOOTLOADER_BUILD)
|
|||||||
set(legacy_reqs soc)
|
set(legacy_reqs soc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_register(REQUIRES xtensa "${legacy_reqs}"
|
idf_component_register(REQUIRES "${legacy_reqs}"
|
||||||
REQUIRED_IDF_TARGETS esp32)
|
REQUIRED_IDF_TARGETS esp32)
|
||||||
|
@ -9,5 +9,5 @@ if(NOT BOOTLOADER_BUILD)
|
|||||||
set(legacy_reqs soc)
|
set(legacy_reqs soc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_register(REQUIRES riscv "${legacy_reqs}"
|
idf_component_register(REQUIRES "${legacy_reqs}"
|
||||||
REQUIRED_IDF_TARGETS esp32c2)
|
REQUIRED_IDF_TARGETS esp32c2)
|
||||||
|
@ -9,5 +9,5 @@ if(NOT BOOTLOADER_BUILD)
|
|||||||
set(legacy_reqs soc)
|
set(legacy_reqs soc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_register(REQUIRES riscv "${legacy_reqs}"
|
idf_component_register(REQUIRES "${legacy_reqs}"
|
||||||
REQUIRED_IDF_TARGETS esp32c3)
|
REQUIRED_IDF_TARGETS esp32c3)
|
||||||
|
@ -9,5 +9,5 @@ if(NOT BOOTLOADER_BUILD)
|
|||||||
set(legacy_reqs soc)
|
set(legacy_reqs soc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_register(REQUIRES riscv "${legacy_reqs}"
|
idf_component_register(REQUIRES "${legacy_reqs}"
|
||||||
REQUIRED_IDF_TARGETS esp32h2)
|
REQUIRED_IDF_TARGETS esp32h2)
|
||||||
|
@ -9,5 +9,5 @@ if(NOT BOOTLOADER_BUILD)
|
|||||||
set(legacy_reqs soc)
|
set(legacy_reqs soc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_register(REQUIRES xtensa "${legacy_reqs}"
|
idf_component_register(REQUIRES "${legacy_reqs}"
|
||||||
REQUIRED_IDF_TARGETS esp32s2)
|
REQUIRED_IDF_TARGETS esp32s2)
|
||||||
|
@ -9,5 +9,5 @@ if(NOT BOOTLOADER_BUILD)
|
|||||||
set(legacy_reqs soc)
|
set(legacy_reqs soc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_register(REQUIRES xtensa "${legacy_reqs}"
|
idf_component_register(REQUIRES "${legacy_reqs}"
|
||||||
REQUIRED_IDF_TARGETS esp32s3)
|
REQUIRED_IDF_TARGETS esp32s3)
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
idf_build_get_property(target IDF_TARGET)
|
idf_build_get_property(target IDF_TARGET)
|
||||||
|
idf_build_get_property(arch IDF_TARGET_ARCH)
|
||||||
|
|
||||||
# should test arch here not target: IDF-1754
|
if(NOT "${arch}" STREQUAL "riscv")
|
||||||
if(NOT "${target}" STREQUAL "esp32c3" AND NOT "${target}" STREQUAL "esp32h2" AND NOT "${target}" STREQUAL "esp32c2")
|
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(BOOTLOADER_BUILD)
|
if(BOOTLOADER_BUILD)
|
||||||
set(priv_requires soc)
|
set(priv_requires soc)
|
||||||
else()
|
else()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
idf_build_get_property(target IDF_TARGET)
|
idf_build_get_property(target IDF_TARGET)
|
||||||
|
idf_build_get_property(arch IDF_TARGET_ARCH)
|
||||||
|
|
||||||
# should test arch here not target: IDF-1754
|
if(NOT "${arch}" STREQUAL "xtensa")
|
||||||
if("${target}" STREQUAL "esp32c3" OR "${target}" STREQUAL "esp32h2" OR "${target}" STREQUAL "esp32c2")
|
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -548,7 +548,7 @@ Common component requirements
|
|||||||
|
|
||||||
To avoid duplication, every component automatically requires some "common" IDF components even if they are not mentioned explicitly. Headers from these components can always be included.
|
To avoid duplication, every component automatically requires some "common" IDF components even if they are not mentioned explicitly. Headers from these components can always be included.
|
||||||
|
|
||||||
The list of common components is: cxx, newlib, freertos, esp_hw_support, heap, log, soc, hal, esp_rom, esp_common, esp_system.
|
The list of common components is: cxx, newlib, freertos, esp_hw_support, heap, log, soc, hal, esp_rom, esp_common, esp_system, xtensa/riscv.
|
||||||
|
|
||||||
Including components in the build
|
Including components in the build
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
@ -401,6 +401,15 @@ macro(idf_build_process target)
|
|||||||
|
|
||||||
idf_build_set_property(IDF_TARGET ${target})
|
idf_build_set_property(IDF_TARGET ${target})
|
||||||
|
|
||||||
|
if("${target}" STREQUAL "esp32" OR "${target}" STREQUAL "esp32s2" OR "${target}" STREQUAL "esp32s3")
|
||||||
|
idf_build_set_property(IDF_TARGET_ARCH "xtensa")
|
||||||
|
elseif("${target}" STREQUAL "linux")
|
||||||
|
# No arch specified for linux host builds at the moment
|
||||||
|
idf_build_set_property(IDF_TARGET_ARCH "")
|
||||||
|
else()
|
||||||
|
idf_build_set_property(IDF_TARGET_ARCH "riscv")
|
||||||
|
endif()
|
||||||
|
|
||||||
__build_set_default(PROJECT_DIR ${CMAKE_SOURCE_DIR})
|
__build_set_default(PROJECT_DIR ${CMAKE_SOURCE_DIR})
|
||||||
__build_set_default(PROJECT_NAME ${CMAKE_PROJECT_NAME})
|
__build_set_default(PROJECT_NAME ${CMAKE_PROJECT_NAME})
|
||||||
__build_set_default(PROJECT_VER 1)
|
__build_set_default(PROJECT_VER 1)
|
||||||
@ -415,9 +424,11 @@ macro(idf_build_process target)
|
|||||||
__build_check_python()
|
__build_check_python()
|
||||||
|
|
||||||
idf_build_get_property(target IDF_TARGET)
|
idf_build_get_property(target IDF_TARGET)
|
||||||
|
idf_build_get_property(arch IDF_TARGET_ARCH)
|
||||||
|
|
||||||
if(NOT "${target}" STREQUAL "linux")
|
if(NOT "${target}" STREQUAL "linux")
|
||||||
idf_build_set_property(__COMPONENT_REQUIRES_COMMON ${target} APPEND)
|
idf_build_set_property(__COMPONENT_REQUIRES_COMMON ${target} APPEND)
|
||||||
|
idf_build_set_property(__COMPONENT_REQUIRES_COMMON ${arch} APPEND)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Call for component manager to download dependencies for all components
|
# Call for component manager to download dependencies for all components
|
||||||
|
Loading…
Reference in New Issue
Block a user