From ec11b943a88d45a98db07b6d6a0bdd1a2b3989cf Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Fri, 14 Oct 2016 05:52:10 -1000 Subject: [PATCH] Allow an alternate startup file independent of bootloader builds In support of bootloader builds the nuttx_v3 builds previously had a facility to set the start up files: Non Bootloader STM32 builds uses the common vectors facility in NuttX. The bootloaders use a fixed minimum set of vectors. Since other architectures my need to include a start up file or set of files, this PR allow an alternate startup file to be selected independent of if this is bootloader build. --- src/firmware/nuttx/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/firmware/nuttx/CMakeLists.txt b/src/firmware/nuttx/CMakeLists.txt index c188370bf7..ef8cefd511 100644 --- a/src/firmware/nuttx/CMakeLists.txt +++ b/src/firmware/nuttx/CMakeLists.txt @@ -31,8 +31,12 @@ set(startup_libs) if("${config_nuttx_config}" STREQUAL "bootloader") set(nuttx_ld_prefix "bootloader") - set(nuttx_startup_files ${nuttx_export_dir}/startup/${nuttx_startup_files}) set(nuttx_bootloader_wrapers "-Wl,-wrap,sched_process_timer -Wl,-wrap,sem_post -Wl,-wrap,sem_wait") +endif() + +if(NOT "${nuttx_startup_files}" STREQUAL "" ) + + set(nuttx_startup_files ${nuttx_export_dir}/startup/${nuttx_startup_files}) add_custom_command(OUTPUT ${nuttx_startup_files}