Another fix for Mike's bootloader issue

This commit is contained in:
Bertrand Songis
2016-11-15 18:35:33 +01:00
parent 89504963a5
commit d2a4ca1d12
3 changed files with 11 additions and 10 deletions
+5 -4
View File
@@ -374,13 +374,14 @@ if(NOT MSVC)
add_subdirectory(targets/${TARGET_DIR}/bootloader)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/targets/${TARGET_DIR}/bootloader)
set(FIRMWARE_DEPENDENCIES ${FIRMWARE_DEPENDENCIES} bootloader)
elseif(PCB STREQUAL SKY9X OR PCB STREQUAL 9XRPRO)
elseif(OPENRC_BOOTLOADER)
# We fetch Mike's bootloader as it is not included inside OpenTX
message(STATUS "Downloading Mike's bootloader: https://github.com/MikeBland/OpenRcBootloader/releases/download/V1.9/${BOOTLOADER}")
file(DOWNLOAD https://github.com/MikeBland/OpenRcBootloader/releases/download/V1.9/${BOOTLOADER} ${CMAKE_CURRENT_BINARY_DIR}/bootloader.lbm STATUS status)
message(STATUS "Downloading Mike's bootloader: https://github.com/MikeBland/OpenRcBootloader/releases/download/V1.9/${OPENRC_BOOTLOADER}")
file(DOWNLOAD https://github.com/MikeBland/OpenRcBootloader/releases/download/V1.9/${OPENRC_BOOTLOADER} ${CMAKE_CURRENT_BINARY_DIR}/bootloader.lbm STATUS status)
list(GET status 0 error_code)
if(error_code)
message(FATAL_ERROR "Failed to download Mike's bootloader: ${status}")
list(GET status 1 error_message)
message(FATAL_ERROR "Download failed: ${error_message}")
endif()
endif()