Another fix for Mike's bootloader issue
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ if(PCB STREQUAL 9XRPRO)
|
||||
set(FLAVOUR 9xrpro)
|
||||
set(LINKER_SCRIPT targets/sky9x/sam3s8c_flash.ld)
|
||||
set(TARGET_SRC ${TARGET_SRC} rtc_driver.cpp)
|
||||
set(BOOTLOADER bootflash8.lbm)
|
||||
set(OPENRC_BOOTLOADER bootflash8.lbm)
|
||||
elseif(PCB STREQUAL AR9X)
|
||||
add_definitions(-Dat91sam3s8 -DAR9X -DSOFTWARE_VOLUME)
|
||||
set(FLAVOUR ar9x)
|
||||
@@ -21,12 +21,12 @@ elseif(PCB STREQUAL AR9X)
|
||||
set(SRC ${SRC} ${THIRDPARTY_DIR}/xdk-asf-3.31.0/sam/drivers/twi/twi.c)
|
||||
set(TARGET_SRC ${TARGET_SRC} i2c_driver.cpp rtc_ds3231_driver.cpp)
|
||||
set(LINKER_SCRIPT targets/sky9x/sam3s8c_flash.ld)
|
||||
set(BOOTLOADER bootflash8.lbm)
|
||||
set(OPENRC_BOOTLOADER bootflash8.lbm)
|
||||
else()
|
||||
set(FLAVOUR sky9x)
|
||||
option(PCBREV "PCB Revision" REVC)
|
||||
set(TARGET_SRC ${TARGET_SRC} coproc_driver.cpp rotenc_driver.cpp rtc_driver.cpp)
|
||||
set(BOOTLOADER bootflash4.lbm)
|
||||
set(OPENRC_BOOTLOADER bootflash4.lbm)
|
||||
if(PCBREV STREQUAL REVA)
|
||||
add_definitions(-DDREVA)
|
||||
set(LINKER_SCRIPT targets/sky9x/sam3s2c_flash.ld)
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_TARANIS_H_
|
||||
#define _BOARD_TARANIS_H_
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
#include "stddef.h"
|
||||
|
||||
@@ -579,4 +579,4 @@ extern Fifo<uint8_t, TELEMETRY_FIFO_SIZE> telemetryFifo;
|
||||
extern DMAFifo<32> serial2RxFifo;
|
||||
#endif
|
||||
|
||||
#endif // _BOARD_TARANIS_H_
|
||||
#endif // _BOARD_H_
|
||||
|
||||
Reference in New Issue
Block a user