remove BOARD_NAME from board_config.h and set automatically

This commit is contained in:
Daniel Agar
2018-11-26 14:40:14 -08:00
committed by David Sidrane
parent 2d052c02fa
commit ec4c9da253
34 changed files with 32 additions and 63 deletions
+10 -1
View File
@@ -75,7 +75,16 @@ if (DEFINED ENV{BUILD_URI})
endif()
add_library(version version.c)
target_compile_definitions(version PRIVATE BUILD_URI=${BUILD_URI})
string(TOUPPER "${PX4_BOARD}" PX4_BOARD_NAME)
target_compile_definitions(version
PUBLIC
PX4_BOARD_NAME="${PX4_BOARD_NAME}"
PRIVATE
BUILD_URI=${BUILD_URI}
)
target_link_libraries(version PRIVATE git_ver)
target_link_libraries(version PRIVATE drivers_board)
add_dependencies(version prebuild_targets)
+1 -10
View File
@@ -47,15 +47,6 @@
#include <systemlib/px4_macros.h>
#include <stdint.h>
/* The preferred method for publishing a board name is to
* define it in board_config.h as BOARD_NAME
*/
#ifndef BOARD_NAME
# error "board_config.h must define BOARD_NAME"
#endif
__BEGIN_DECLS
/**
@@ -63,7 +54,7 @@ __BEGIN_DECLS
*/
static inline const char *px4_board_name(void)
{
return BOARD_NAME;
return PX4_BOARD_NAME;
}
/**
+1
View File
@@ -95,6 +95,7 @@ px4_add_module(
DEPENDS
mixer
version
git_uavcan
+1
View File
@@ -79,6 +79,7 @@ px4_add_module(
DEPENDS
drivers_bootloaders
git_uavcan
version
# within libuavcan
libuavcan_dsdlc
+1
View File
@@ -78,6 +78,7 @@ px4_add_module(
DEPENDS
drivers_bootloaders
git_uavcan
version
# within libuavcan
libuavcan_dsdlc
+1
View File
@@ -101,4 +101,5 @@ px4_add_module(
git_ecl
ecl_geo_lookup # TODO: move this
pwm_limit
version
)