change(build): Add a new CMake flag NON_OS_BUILD for non-FreeRTOS builds

This commit is contained in:
Laukik Hase
2024-10-16 13:32:12 +05:30
parent 12398c0f25
commit 5328dcd00c
17 changed files with 46 additions and 30 deletions

View File

@@ -1,4 +1,6 @@
idf_build_get_property(target IDF_TARGET)
idf_build_get_property(non_os_build NON_OS_BUILD)
if(${target} STREQUAL "linux")
idf_component_register(SRCS "linux/spi_flash_linux.c"
"linux/cache_utils.c"
@@ -8,7 +10,7 @@ if(${target} STREQUAL "linux")
return()
endif()
if(BOOTLOADER_BUILD OR CONFIG_APP_BUILD_TYPE_PURE_RAM_APP)
if(non_os_build OR CONFIG_APP_BUILD_TYPE_PURE_RAM_APP)
set(srcs "spi_flash_wrap.c")
set(priv_requires bootloader_support soc)
else()
@@ -70,7 +72,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU")
" -fno-inline-small-functions -fno-inline-functions-called-once")
endif()
if(NOT BOOTLOADER_BUILD AND NOT CONFIG_APP_BUILD_TYPE_PURE_RAM_APP)
if(NOT non_os_build AND NOT CONFIG_APP_BUILD_TYPE_PURE_RAM_APP)
if(CONFIG_SPIRAM)
# [refactor-todo]: requires "esp_psram" for few MMU usages in `flash_mmap.c`
# will be replaced with MMU requirements