bootloader: Never auto-start the application in the intermediate bootloader.
authorTilman Sauerbeck <tilman@code-monkey.de>
Sun, 8 Dec 2019 17:20:04 +0000 (18:20 +0100)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sun, 5 Jan 2020 19:38:11 +0000 (20:38 +0100)
Instead, we now always enter bootloader operation. I think this has
less potential of bricking a device in case you don't press PTE24
fast enough after installing the intermediate bootloader.

src/bootloader/main.rs

index 52a14738f62e0008d6ad4cc95b362432ab0f6170..a5fe9832d30a7cf6d18ed9ca3e130e5477818163 100644 (file)
@@ -65,6 +65,12 @@ unsafe fn application_missing() -> bool {
     first_app_word.read() == 0xffffffff
 }
 
+#[cfg(bootloader_type = "intermediate")]
+fn bootloader_requested() -> bool {
+    true
+}
+
+#[cfg(bootloader_type = "final")]
 fn bootloader_requested() -> bool {
     let start_ticks = systick::now();