@@ -29,57 +29,47 @@ if(get_idf_ver)
29
29
execute_process (COMMAND ${idf_ver_script} $ENV{IDF_PATH} -c major
30
30
OUTPUT_STRIP_TRAILING_WHITESPACE
31
31
OUTPUT_VARIABLE UT_IDF_VER_MAJOR)
32
+ execute_process (COMMAND ${idf_ver_script} $ENV{IDF_PATH} -c minor
33
+ OUTPUT_STRIP_TRAILING_WHITESPACE
34
+ OUTPUT_VARIABLE UT_IDF_VER_MINOR)
35
+ execute_process (COMMAND ${idf_ver_script} $ENV{IDF_PATH} -c bugfix
36
+ OUTPUT_STRIP_TRAILING_WHITESPACE
37
+ OUTPUT_VARIABLE UT_IDF_VER_BUGFIX)
32
38
else ()
33
39
message ("Skip getting IDF version. Use the latest as default." )
34
40
set (UT_IDF_VER 0xFFFFFFFF)
41
+ set (UT_IDF_VER_MAJOR 0xFF)
42
+ set (UT_IDF_VER_MINOR 0xFF)
43
+ set (UT_IDF_VER_BUGFIX 0xFF)
35
44
endif ()
36
45
37
46
configure_file (ut_idf_ver.h.in ${idf_ver_header_path} @ONLY)
38
47
include_directories (${CMAKE_CURRENT_BINARY_DIR} )
39
48
40
49
message ("IDF version is ${UT_IDF_VER} " )
41
- if (UT_IDF_VER_MAJOR STREQUAL "3" )
42
- if (CONFIG_ESP32_GCOV_ENABLE)
43
- target_compile_options (${COMPONENT_TARGET} PRIVATE --coverage)
44
- endif ()
45
-
46
- if (NOT CONFIG_GEN_UT_APP_CUSTOM_LD_FILENAME STREQUAL "" )
47
- target_linker_script(${COMPONENT_TARGET} "${CONFIG_GEN_UT_APP_CUSTOM_LD_FILENAME} " )
48
- endif ()
50
+ if (CONFIG_ESP32_GCOV_ENABLE)
51
+ target_compile_options (${COMPONENT_LIB} PRIVATE --coverage)
52
+ endif ()
49
53
50
- target_link_libraries (${COMPONENT_TARGET} "-u include_xt_highint5" )
51
- target_link_libraries (${COMPONENT_TARGET} "-u unused_func0" )
52
- target_link_libraries (${COMPONENT_TARGET} "-u unused_func1" )
53
- target_link_libraries (${COMPONENT_TARGET} "-u unused_func2" )
54
- target_link_libraries (${COMPONENT_TARGET} "-u unused_func3" )
55
- target_link_libraries (${COMPONENT_TARGET} "-u unused_func4" )
56
- target_link_libraries (${COMPONENT_TARGET} "-u unused_func5" )
57
- target_link_libraries (${COMPONENT_TARGET} "-u unused_func6" )
58
- target_link_libraries (${COMPONENT_TARGET} "-u unused_func7" )
59
- else ()
60
- if (CONFIG_ESP32_GCOV_ENABLE)
61
- target_compile_options (${COMPONENT_LIB} PRIVATE --coverage)
54
+ if (NOT CONFIG_GEN_UT_APP_CUSTOM_LD_FILENAME STREQUAL "" )
55
+ if (CONFIG_IDF_TARGET_ESP32)
56
+ target_linker_script(${COMPONENT_LIB} INTERFACE "${CONFIG_GEN_UT_APP_CUSTOM_LD_FILENAME_ESP32} " )
57
+ elseif (CONFIG_IDF_TARGET_ESP32S2)
58
+ target_linker_script(${COMPONENT_LIB} INTERFACE "${CONFIG_GEN_UT_APP_CUSTOM_LD_FILENAME_ESP32S2} " )
59
+ elseif (CONFIG_IDF_TARGET_ESP32S3)
60
+ target_linker_script(${COMPONENT_LIB} INTERFACE "${CONFIG_GEN_UT_APP_CUSTOM_LD_FILENAME_ESP32S3} " )
61
+ else ()
62
+ message (FATAL_ERROR "Custom linker not exist for this target. CMake will exit!" )
62
63
endif ()
64
+ endif ()
63
65
64
- if (NOT CONFIG_GEN_UT_APP_CUSTOM_LD_FILENAME STREQUAL "" )
65
- if (CONFIG_IDF_TARGET_ESP32)
66
- target_linker_script(${COMPONENT_LIB} INTERFACE "${CONFIG_GEN_UT_APP_CUSTOM_LD_FILENAME_ESP32} " )
67
- elseif (CONFIG_IDF_TARGET_ESP32S2)
68
- target_linker_script(${COMPONENT_LIB} INTERFACE "${CONFIG_GEN_UT_APP_CUSTOM_LD_FILENAME_ESP32S2} " )
69
- elseif (CONFIG_IDF_TARGET_ESP32S3)
70
- target_linker_script(${COMPONENT_LIB} INTERFACE "${CONFIG_GEN_UT_APP_CUSTOM_LD_FILENAME_ESP32S3} " )
71
- else ()
72
- message (FATAL_ERROR "Custom linker not exist for this target. CMake will exit!" )
73
- endif ()
74
- endif ()
66
+ target_link_libraries (${COMPONENT_LIB} INTERFACE "-u include_xt_highint5" )
67
+ target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func0" )
68
+ target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func1" )
69
+ target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func2" )
70
+ target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func3" )
71
+ target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func4" )
72
+ target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func5" )
73
+ target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func6" )
74
+ target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func7" )
75
75
76
- target_link_libraries (${COMPONENT_LIB} INTERFACE "-u include_xt_highint5" )
77
- target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func0" )
78
- target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func1" )
79
- target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func2" )
80
- target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func3" )
81
- target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func4" )
82
- target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func5" )
83
- target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func6" )
84
- target_link_libraries (${COMPONENT_LIB} INTERFACE "-u unused_func7" )
85
- endif ()
0 commit comments