projects
/
gps-watch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b98183
)
bootloader: Jump to application code after serial communication is done.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 7 Jul 2019 07:57:47 +0000
(09:57 +0200)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 5 Jan 2020 19:38:11 +0000
(20:38 +0100)
src/bootloader/main.rs
patch
|
blob
|
history
diff --git
a/src/bootloader/main.rs
b/src/bootloader/main.rs
index f54b4bcea02d8dbf161bf9f50fefb31e4a140699..d83702e734c5369c31cbabd84d6174e7aff12825 100644
(file)
--- a/
src/bootloader/main.rs
+++ b/
src/bootloader/main.rs
@@
-33,6
+33,10
@@
mod bootloader;
use common::clock;
use common::usb_serial;
+extern {
+ fn jump_to_application(address: u32);
+}
+
const APPLICATION_ADDR: u32 = 0x0;
#[no_mangle]
@@
-44,8
+48,9
@@
pub unsafe extern fn main() {
let mut b = bootloader::Bootloader::new();
- loop {
- b.run();
+ while b.run() {
}
}
+
+ jump_to_application(__application_addr);
}