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()
|
|
|
|
|
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
|
|
|
|
|
|
|
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("")
|
boards/shields: re-work handling in cmake and west
Remove the boards and shields lists from the 'usage' target output.
That might have been readable at some point long ago in Zephyr's
history, when only a few boards were available, but right now it's
obscuring the high level targets we really want 'usage' to print.
Instead, add 'boards' and 'shields' targets which the user can run to
get those lists, and reference them from the 'usage' output. This
makes 'usage' squintable again. We use the new list_boards.py script
from the 'boards' target.
Reference the 'help' target from 'usage' as well, and drop the
recommendation that people run '--target help' from the 'west build
--help' output for the 'west build --target' option. The canonical
place to look is 'usage' now.
Use the new list_boards.py code from 'west boards' as well, which
allows us to add the board's directory as a format string key, in
addition to its name and architecture.
Keep west-completion.bash up to date. While doing that, I noticed that
a bunch of references to this file refer to a stale location, so fix
those too.
Finally, the 'usage' output is what we print for a failed board or
shield lookup, so that needs to be updated also. Handle that by
invoking boards.cmake and a new shields.cmake in CMake script mode to
print the relevant output.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-12-10 07:53:00 +08:00
|
|
|
message("Kconfig targets:")
|
|
|
|
message(" menuconfig - Update .config using a console-based interface")
|
|
|
|
message(" guiconfig - Update .config using a graphical 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")
|
boards/shields: re-work handling in cmake and west
Remove the boards and shields lists from the 'usage' target output.
That might have been readable at some point long ago in Zephyr's
history, when only a few boards were available, but right now it's
obscuring the high level targets we really want 'usage' to print.
Instead, add 'boards' and 'shields' targets which the user can run to
get those lists, and reference them from the 'usage' output. This
makes 'usage' squintable again. We use the new list_boards.py script
from the 'boards' target.
Reference the 'help' target from 'usage' as well, and drop the
recommendation that people run '--target help' from the 'west build
--help' output for the 'west build --target' option. The canonical
place to look is 'usage' now.
Use the new list_boards.py code from 'west boards' as well, which
allows us to add the board's directory as a format string key, in
addition to its name and architecture.
Keep west-completion.bash up to date. While doing that, I noticed that
a bunch of references to this file refer to a stale location, so fix
those too.
Finally, the 'usage' output is what we print for a failed board or
shield lookup, so that needs to be updated also. Handle that by
invoking boards.cmake and a new shields.cmake in CMake script mode to
print the relevant output.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-12-10 07:53:00 +08:00
|
|
|
message(" flash - Run \"west flash\"")
|
|
|
|
message(" debug - Run \"west debug\"")
|
|
|
|
message(" debugserver - Run \"west debugserver\" (or start GDB server on port 1234 for QEMU targets)")
|
|
|
|
message(" attach - Run \"west attach\"")
|
2024-08-26 21:07:11 +08:00
|
|
|
message(" pahole - Report struct padding (requires the pahole program)")
|
|
|
|
message(" puncover - Local web server to view RAM, ROM and stack usage (requires puncover pip module)")
|
2017-10-27 21:43:34 +08:00
|
|
|
message(" ram_report - Build and create RAM usage report")
|
|
|
|
message(" rom_report - Build and create ROM usage report")
|
2024-08-26 21:07:11 +08:00
|
|
|
message(" footprint - Create JSON RAM/ROM usage report in the build directory")
|
2023-11-03 20:29:42 +08:00
|
|
|
message(" initlevels - Display the initialization sequence")
|
boards/shields: re-work handling in cmake and west
Remove the boards and shields lists from the 'usage' target output.
That might have been readable at some point long ago in Zephyr's
history, when only a few boards were available, but right now it's
obscuring the high level targets we really want 'usage' to print.
Instead, add 'boards' and 'shields' targets which the user can run to
get those lists, and reference them from the 'usage' output. This
makes 'usage' squintable again. We use the new list_boards.py script
from the 'boards' target.
Reference the 'help' target from 'usage' as well, and drop the
recommendation that people run '--target help' from the 'west build
--help' output for the 'west build --target' option. The canonical
place to look is 'usage' now.
Use the new list_boards.py code from 'west boards' as well, which
allows us to add the board's directory as a format string key, in
addition to its name and architecture.
Keep west-completion.bash up to date. While doing that, I noticed that
a bunch of references to this file refer to a stale location, so fix
those too.
Finally, the 'usage' output is what we print for a failed board or
shield lookup, so that needs to be updated also. Handle that by
invoking boards.cmake and a new shields.cmake in CMake script mode to
print the relevant output.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-12-10 07:53:00 +08:00
|
|
|
message(" boards - Display supported boards")
|
|
|
|
message(" shields - Display supported shields")
|
2017-10-27 21:43:34 +08:00
|
|
|
message(" usage - Display this text")
|
cmake: New target which generates a sort of development kit for llext
Loadable extensions need access to Zephyr (and Zephyr application)
includes and some CFLAGS to be properly built. This patch adds a new
target, `llext-edk`, which generates a tar file with those includes and
flags that can be loaded from cmake and make files.
A Zephyr application willing to expose some API to extensions it loads
only need to add the include directories describing such APIs to the
Zephyr ones via zephyr_include_directories() CMake call.
A new Kconfig option, CONFIG_LLEXT_EDK_NAME allows one to control some
aspects of the generated file, which enables some customization - think
of an application called ACME, willing to have a ACME_EXTENSION_KIT or
something.
All EDK Kconfig options are behind CONFIG_LLEXT_EDK, which doesn't
depend on LLEXT directly - so that EDK features can be leveraged by
downstream variations of loadable extensions.
Also, each arch may need different compiler flags for extensions: those
are handled by the `LLEXT_CFLAGS` cmake flag. An example is set for GCC
ARM.
Finally, EDK throughout this patch means Extension Development Kit,
which is a bad name, but at least doesn't conflict with SDK.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-01-19 12:28:46 +08:00
|
|
|
message(" llext-edk - Build the Linkable Loadable Extension (LLEXT) Extension Development Kit (EDK)")
|
boards/shields: re-work handling in cmake and west
Remove the boards and shields lists from the 'usage' target output.
That might have been readable at some point long ago in Zephyr's
history, when only a few boards were available, but right now it's
obscuring the high level targets we really want 'usage' to print.
Instead, add 'boards' and 'shields' targets which the user can run to
get those lists, and reference them from the 'usage' output. This
makes 'usage' squintable again. We use the new list_boards.py script
from the 'boards' target.
Reference the 'help' target from 'usage' as well, and drop the
recommendation that people run '--target help' from the 'west build
--help' output for the 'west build --target' option. The canonical
place to look is 'usage' now.
Use the new list_boards.py code from 'west boards' as well, which
allows us to add the board's directory as a format string key, in
addition to its name and architecture.
Keep west-completion.bash up to date. While doing that, I noticed that
a bunch of references to this file refer to a stale location, so fix
those too.
Finally, the 'usage' output is what we print for a failed board or
shield lookup, so that needs to be updated also. Handle that by
invoking boards.cmake and a new shields.cmake in CMake script mode to
print the relevant output.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-12-10 07:53:00 +08:00
|
|
|
message(" help - Display all build system targets")
|
2019-01-14 23:11:15 +08:00
|
|
|
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")
|