123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- include(${ZEPHYR_BASE}/cmake/toolchain/zephyr/host-tools.cmake)
- find_program(
- DTC
- dtc
- )
- if(DTC)
-
- set(MIN_DTC_VERSION 1.4.6)
- execute_process(
- COMMAND
- ${DTC} --version
- OUTPUT_VARIABLE dtc_version_output
- ERROR_VARIABLE dtc_error_output
- RESULT_VARIABLE dtc_status
- )
- if(${dtc_status} EQUAL 0)
- string(REGEX MATCH "Version: DTC ([0-9]+[.][0-9]+[.][0-9]+).*" out_var ${dtc_version_output})
-
-
-
- if(${CMAKE_MATCH_1} VERSION_GREATER ${MIN_DTC_VERSION})
- message(STATUS "Found dtc: ${DTC} (found suitable version \"${CMAKE_MATCH_1}\", minimum required is \"${MIN_DTC_VERSION}\")")
- else()
- message(WARNING
- "Could NOT find dtc: Found unsuitable version \"${CMAKE_MATCH_1}\", but required is at least \"${MIN_DTC_VERSION}\" (found ${DTC}). Optional devicetree error checking with dtc will not be performed.")
- set(DTC DTC-NOTFOUND)
- endif()
- else()
- message(WARNING
- "Could NOT find working dtc: Found dtc (${DTC}), but failed to load with:\n ${dtc_error_output}")
- set(DTC DTC-NOTFOUND)
- endif()
- endif()
- find_program(
- GPERF
- gperf
- )
- find_program(
- OPENOCD
- openocd
- )
- find_program(
- BOSSAC
- bossac
- )
- find_program(
- IMGTOOL
- imgtool
- )
|