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 @@ -435,6 +435,10 @@ if(CMAKE_CROSSCOMPILING)
435
435
target_link_libraries (${elf} PRIVATE --specs=nano.specs)
436
436
target_compile_options (${elf} PRIVATE --specs=nosys.specs)
437
437
target_link_libraries (${elf} PRIVATE --specs=nosys.specs)
438
+
439
+ if (BOOTLOADER_NO_MENU)
440
+ target_compile_definitions (${elf} PRIVATE BOOTLOADER_NO_MENU)
441
+ endif ()
438
442
endforeach (bootloader)
439
443
440
444
foreach (bootloader ${DEVDEVICE-BOOTLOADERS})
Original file line number Diff line number Diff line change @@ -963,6 +963,12 @@ void bootloader_jump(void)
963
963
964
964
_check_init (& bootdata );
965
965
966
+ #if defined(BOOTLOADER_NO_MENU )
967
+ if (((uint32_t * )FLASH_APP_START )[1 ] != 0xffffffff ) {
968
+ _binary_exec (); /* no return */
969
+ }
970
+ #endif
971
+
966
972
#if PLATFORM_BITBOX02 == 1
967
973
if (shared_data .fields .upside_down ) {
968
974
screen_rotate ();
You can’t perform that action at this time.
0 commit comments