ver: print PX4_BOARD_LABEL for 'ver all'

This commit is contained in:
Beat Küng 2021-11-11 10:43:41 +01:00 committed by Daniel Agar
parent dbacdedad1
commit fdf8461452
3 changed files with 12 additions and 0 deletions

View File

@ -79,6 +79,7 @@ add_library(version version.c)
target_compile_definitions(version
PUBLIC
PX4_BOARD_NAME="${PX4_BOARD_NAME}"
PX4_BOARD_LABEL="${PX4_BOARD_LABEL}"
PRIVATE
BUILD_URI=${BUILD_URI}
)

View File

@ -56,6 +56,14 @@ static inline const char *px4_board_name(void)
return PX4_BOARD_NAME;
}
/**
* get the board build target variant
*/
static inline const char *px4_board_target_label(void)
{
return PX4_BOARD_LABEL;
}
/**
* get the board sub type
*/

View File

@ -217,6 +217,9 @@ int ver_main(int argc, char *argv[])
}
if (show_all) {
printf("Build variant: %s\n", px4_board_target_label());
}
if (show_all || !strncmp(argv[1], sz_ver_gcc_str, sizeof(sz_ver_gcc_str))) {
printf("Toolchain: %s, %s\n", px4_toolchain_name(), px4_toolchain_version());