Fix UAVCAN bootloader builds broken by os calls from stm32_flash

Recent upsteam NuttX changes needed by PX4 added sem_[wait|post]
   in the stm32_flash driver.

   UAVCAN Bootloaders do not use the OS's scheduler etal.
   This commit nops the sem_[wait|post] with linker magic.
   Which precludes the linking the nuttx scheduler in the
   bootloader build.
This commit is contained in:
David Sidrane
2017-03-24 16:22:47 +01:00
committed by Julian Oes
parent 5c6264ae35
commit 78e2a293d2
2 changed files with 90 additions and 1 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ 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")
set(nuttx_bootloader_wrapers "-Wl,-wrap,sched_process_timer -Wl,-wrap,sem_post -Wl,-wrap,sem_wait")
add_custom_command(OUTPUT
${nuttx_startup_files}