2019-04-06 21:08:09 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2020-02-25 18:42:00 +08:00
|
|
|
if(NOT DEFINED ZEPHYR_BASE)
|
2019-04-23 02:39:48 +08:00
|
|
|
message(FATAL_ERROR "ZEPHYR_BASE not set")
|
|
|
|
endif()
|
|
|
|
|
2020-02-25 18:42:00 +08:00
|
|
|
include (${ZEPHYR_BASE}/cmake/boards.cmake)
|
2019-04-06 21:08:09 +08:00
|
|
|
|
2017-10-27 21:43:34 +08:00
|
|
|
get_filename_component(generator ${CMAKE_MAKE_PROGRAM} NAME)
|
2020-02-25 18:42:00 +08:00
|
|
|
if(${generator} STREQUAL ninja)
|
|
|
|
set(verbose "-v")
|
|
|
|
else()
|
|
|
|
set(verbose "VERBOSE=1")
|
|
|
|
endif()
|
2017-10-27 21:43:34 +08:00
|
|
|
|
2018-09-28 00:10:22 +08:00
|
|
|
string(REPLACE " " ";" BOARD_ROOT "${BOARD_ROOT_SPACE_SEPARATED}")
|
2019-01-14 23:11:15 +08:00
|
|
|
string(REPLACE " " ";" SHIELD_LIST "${SHIELD_LIST_SPACE_SEPARATED}")
|
2017-10-27 21:43:34 +08:00
|
|
|
|
|
|
|
message("Cleaning targets:")
|
|
|
|
message(" clean - Remove most generated files but keep configuration and backup files")
|
|
|
|
message(" pristine - Remove all files in the build directory")
|
|
|
|
message("")
|
|
|
|
message("Configuration targets:")
|
|
|
|
message("")
|
2018-05-02 10:16:28 +08:00
|
|
|
message(" menuconfig - Update configuration using an interactive configuration interface")
|
2017-10-27 21:43:34 +08:00
|
|
|
message("")
|
|
|
|
message("Other generic targets:")
|
|
|
|
message(" all - Build a zephyr application")
|
|
|
|
message(" run - Build a zephyr application and run it if the board supports emulation")
|
|
|
|
message(" flash - Build and flash an application")
|
|
|
|
message(" debug - Build and debug an application using GDB")
|
|
|
|
message(" debugserver - Build and start a GDB server (port 1234 for Qemu targets)")
|
|
|
|
message(" ram_report - Build and create RAM usage report")
|
|
|
|
message(" rom_report - Build and create ROM usage report")
|
|
|
|
message(" usage - Display this text")
|
|
|
|
message("")
|
|
|
|
message("Supported Boards:")
|
|
|
|
message("")
|
|
|
|
message(" To generate project files for one of the supported boards below, run:")
|
|
|
|
message("")
|
2019-01-14 23:11:15 +08:00
|
|
|
message(" $ cmake -DBOARD=<BOARD NAME> [-DSHIELD=<SHIELD NAME>] -Bpath/to/build_dir -Hpath/to/source_dir")
|
2017-10-27 21:43:34 +08:00
|
|
|
message("")
|
|
|
|
message(" or")
|
|
|
|
message("")
|
|
|
|
message(" $ export BOARD=<BOARD NAME>")
|
2019-01-14 23:11:15 +08:00
|
|
|
message(" $ export SHIELD=<SHIELD NAME> #optional")
|
2017-10-27 21:43:34 +08:00
|
|
|
message(" $ cmake -Bpath/to/build_dir -Hpath/to/source_dir")
|
|
|
|
message("")
|
2019-04-23 02:39:48 +08:00
|
|
|
dump_all_boards("" " ")
|
2017-10-27 21:43:34 +08:00
|
|
|
message("")
|
2019-01-14 23:11:15 +08:00
|
|
|
message("Supported Shields:")
|
|
|
|
message("")
|
|
|
|
foreach(shield ${SHIELD_LIST})
|
|
|
|
message(" ${shield}")
|
|
|
|
endforeach()
|
|
|
|
message("")
|
2017-10-27 21:43:34 +08:00
|
|
|
message("Build flags:")
|
|
|
|
message("")
|
2020-02-25 18:42:00 +08:00
|
|
|
message(" ${generator} ${verbose} [targets] verbose build")
|
2017-10-27 21:43:34 +08:00
|
|
|
message(" cmake -DW=n Enable extra gcc checks, n=1,2,3 where")
|
2018-12-19 17:40:57 +08:00
|
|
|
message(" 1: warnings which may be relevant and do not occur too often")
|
|
|
|
message(" 2: warnings which occur quite often but may still be relevant")
|
|
|
|
message(" 3: more obscure warnings, can most likely be ignored")
|
|
|
|
message(" Multiple levels can be combined with W=12 or W=123")
|