File tree 4 files changed +16
-1
lines changed
4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ if(CMAKE_CROSSCOMPILING)
85
85
message (STATUS "size: ${CMAKE_SIZE} ${TOOLCHAIN_PREFIX} size" )
86
86
endif ()
87
87
88
+ option (BOOTLOADER_NO_MENU "Build a bootloader that always boots" OFF )
89
+
88
90
89
91
#-----------------------------------------------------------------------------
90
92
# Create version header file
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ build/Makefile:
28
28
29
29
build-debug/Makefile :
30
30
mkdir -p build-debug
31
- cd build-debug && cmake -DCMAKE_TOOLCHAIN_FILE=arm.cmake -DCMAKE_BUILD_TYPE=DEBUG ..
31
+ cd build-debug && cmake -DCMAKE_TOOLCHAIN_FILE=arm.cmake -DCMAKE_BUILD_TYPE=DEBUG -DBOOTLOADER_NO_MENU=1 ..
32
32
$(MAKE ) -C py/bitbox02
33
33
34
34
build-build/Makefile :
@@ -77,6 +77,9 @@ bootloader-btc-development: | build
77
77
$(MAKE ) -C build bootloader-btc-development.elf
78
78
bootloader-btc-production : | build
79
79
$(MAKE ) -C build bootloader-btc-production.elf
80
+ # The debug bootloader doesn't have a menu, and always boots. Use gdb/RTT
81
+ bootloader-debug : | build-debug
82
+ $(MAKE ) -C build-debug bootloader.elf
80
83
factory-setup : | build
81
84
$(MAKE ) -C build factory-setup.elf
82
85
docs : | build
Original file line number Diff line number Diff line change @@ -445,6 +445,10 @@ if(CMAKE_CROSSCOMPILING)
445
445
target_link_libraries (${elf} PRIVATE --specs=nano.specs)
446
446
target_compile_options (${elf} PRIVATE --specs=nosys.specs)
447
447
target_link_libraries (${elf} PRIVATE --specs=nosys.specs)
448
+
449
+ if (BOOTLOADER_NO_MENU)
450
+ target_compile_definitions (${elf} PRIVATE BOOTLOADER_NO_MENU)
451
+ endif ()
448
452
endforeach (bootloader)
449
453
450
454
foreach (bootloader ${DEVDEVICE-BOOTLOADERS})
Original file line number Diff line number Diff line change @@ -962,6 +962,12 @@ void bootloader_jump(void)
962
962
963
963
_check_init (& bootdata );
964
964
965
+ #if defined(BOOTLOADER_NO_MENU )
966
+ if (((uint32_t * )FLASH_APP_START )[1 ] != 0xffffffff ) {
967
+ _binary_exec (); /* no return */
968
+ }
969
+ #endif
970
+
965
971
#if PLATFORM_BITBOX02 == 1
966
972
if (shared_data .fields .upside_down ) {
967
973
screen_rotate ();
You can’t perform that action at this time.
0 commit comments