[freertos] add freertos firmware
Change-Id: I4158d66d9b5fc444e28287f55e79ac24e0a1666f
This commit is contained in:
29
freertos/cvitek/scripts/ParseConfiguration.cmake
Normal file
29
freertos/cvitek/scripts/ParseConfiguration.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
function(ParseConfiguration DotConfigFile)
|
||||
if (NOT EXISTS ${DotConfigFile})
|
||||
message(FATAL_ERROR
|
||||
"${DotConfigFile} not exist,
|
||||
please source build/envsetup_soc.sh and defconfig relative board_defconfig")
|
||||
endif()
|
||||
file(READ "${DotConfigFile}" DotConfig)
|
||||
string(REPLACE "\\\n" "" DotConfig ${DotConfig})
|
||||
string(REPLACE "\n" ";" DotConfLines ${DotConfig})
|
||||
list(REMOVE_ITEM DotConfLines "")
|
||||
foreach(configline ${DotConfLines})
|
||||
string(REPLACE "=" ";" line_split ${configline})
|
||||
list(LENGTH line_split count)
|
||||
if (count LESS 2)
|
||||
continue()
|
||||
endif()
|
||||
list(GET line_split -1 value)
|
||||
string(STRIP ${value} value)
|
||||
separate_arguments(value)
|
||||
list(REMOVE_AT line_split -1)
|
||||
foreach(conf_name ${line_split})
|
||||
set(${conf_name} ${value} PARENT_SCOPE)
|
||||
message("${conf_name}=${value}")
|
||||
# add_definitions(-D${conf_name}=${value} )
|
||||
endforeach()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user