Added command to flash only the bootloader with "make flash-bl"
This commit is contained in:
@@ -598,6 +598,12 @@ if(NOT MSVC)
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(flash-bl
|
||||
COMMAND dfu-util --alt 0 --dfuse-address 0x08000000:leave -d 0483:df11 -D bootloader.bin
|
||||
DEPENDS bootloader
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(flash-jtag
|
||||
COMMAND st-flash --reset write firmware.bin 0x8000000
|
||||
DEPENDS firmware
|
||||
|
||||
@@ -167,12 +167,13 @@ add_dependencies(bootloader ${BITMAPS_TARGET} radio_translations)
|
||||
|
||||
add_custom_command(
|
||||
TARGET bootloader POST_BUILD
|
||||
COMMAND arm-none-eabi-objcopy -O binary bootloader.elf bootloader.bin
|
||||
COMMAND arm-none-eabi-objcopy -O binary bootloader.elf ${CMAKE_BINARY_DIR}/bootloader.bin
|
||||
)
|
||||
|
||||
if(PYTHONINTERP_FOUND)
|
||||
add_custom_command(
|
||||
TARGET bootloader POST_BUILD
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/bin2lbm.py bootloader.bin bootloader.lbm
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/bin2lbm.py ${CMAKE_BINARY_DIR}/bootloader.bin bootloader.lbm
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#include "../../common/arm/stm32/bootloader/boot.h"
|
||||
#include "../../common/arm/stm32/bootloader/bin_files.h"
|
||||
|
||||
#define SELECTED_COLOR (INVERS | DEFAULT_COLOR)
|
||||
|
||||
const uint8_t __bmp_plug_usb_rle[] {
|
||||
#include "bmp_plug_usb.lbm"
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user