cmake remove circular linking and reorganize

- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
This commit is contained in:
Daniel Agar
2018-04-29 21:48:54 -04:00
parent a8bc3d187f
commit ea3acb7121
576 changed files with 1406 additions and 2014 deletions
@@ -43,5 +43,6 @@ if (NOT ${LABEL} STREQUAL "bootloader")
)
endif()
px4_add_library(board_stm32 ${SRCS})
add_dependencies(board_stm32 nuttx_build)
add_library(drivers_boards_common_arch ${SRCS})
add_dependencies(drivers_boards_common_arch prebuild_targets)
target_link_libraries(drivers_boards_common_arch PRIVATE nuttx_arch)
@@ -79,7 +79,10 @@ void board_system_reset(int status)
#if defined(BOARD_HAS_ON_RESET)
board_on_reset(status);
#endif
#ifdef CONFIG_BOARDCTL_RESET
board_reset(status);
#endif
while (1);
}