Address review round #2
This commit is contained in:
21
patches/tock/04-nrf52-bootloader.patch
Normal file
21
patches/tock/04-nrf52-bootloader.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff --git a/chips/nrf52/src/crt1.rs b/chips/nrf52/src/crt1.rs
|
||||
index 9703aac..281ceeb 100644
|
||||
--- a/chips/nrf52/src/crt1.rs
|
||||
+++ b/chips/nrf52/src/crt1.rs
|
||||
@@ -1,4 +1,4 @@
|
||||
-use cortexm4::{generic_isr, hard_fault_handler, nvic, svc_handler, systick_handler};
|
||||
+use cortexm4::{generic_isr, hard_fault_handler, nvic, scb, svc_handler, systick_handler};
|
||||
use tock_rt0;
|
||||
|
||||
/*
|
||||
@@ -168,5 +168,9 @@ pub unsafe extern "C" fn init() {
|
||||
tock_rt0::init_data(&mut _etext, &mut _srelocate, &mut _erelocate);
|
||||
tock_rt0::zero_bss(&mut _szero, &mut _ezero);
|
||||
|
||||
+ // Ensure that we are compatible with a bootloader.
|
||||
+ // For this we need to offset our vector table
|
||||
+ scb::set_vector_table_offset(BASE_VECTORS.as_ptr() as *const ());
|
||||
+
|
||||
nvic::enable_all();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user