Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build
target
local_cargo
Cargo.lock

2 changes: 1 addition & 1 deletion arch/bootloader_cortexm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Tock Project Developers <tock-dev@googlegroups.com>"]

[dependencies]
kernel = { git = "https://github.com/tock/tock", rev = "405417" }
kernel = { git = "https://github.com/tock/tock", rev = "2ff6868" }
#kernel = { path = "../../../tock/kernel" }

bootloader = { path = "../../bootloader" }
5 changes: 3 additions & 2 deletions arch/bootloader_cortexm/src/jumper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ impl CortexMJumper {

impl bootloader::interfaces::Jumper for CortexMJumper {
fn jump(&self, address: u32) -> ! {
use core::arch::asm;
unsafe {
asm!(
".syntax unified \n\
mov r0, {0} // The address of the payload's .vectors \n\
mov r0, {address} // The address of the payload's .vectors \n\
ldr r1, =0xe000ed08 // The address of the VTOR register (0xE000E000(SCS) + 0xD00(SCB) + 0x8(VTOR)) \n\
str r0, [r1] // Move the payload's VT address into the VTOR register \n\
ldr r1, [r0] // Move the payload's initial SP into r1 \n\
mov sp, r1 // Set our SP to that \n\
ldr r0, [r0, #4] // Load the payload's ENTRY into r0 \n\
bx r0 // Whoopee",
in(reg) address,
address = in(reg) address,
);
}
loop {}
Expand Down
1 change: 0 additions & 1 deletion arch/bootloader_cortexm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(const_fn, asm)]
#![no_std]

pub mod jumper;
324 changes: 236 additions & 88 deletions boards/Common.mk

Large diffs are not rendered by default.

181 changes: 0 additions & 181 deletions boards/clue_nrf52840-bootloader/Cargo.lock

This file was deleted.

17 changes: 9 additions & 8 deletions boards/clue_nrf52840-bootloader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ name = "clue_nrf52840-bootloader"
version = "0.1.0"
authors = ["Tock Project Developers <tock-dev@googlegroups.com>"]
build = "build.rs"
edition = "2018"
edition = "2021"

[dependencies]
cortexm4 = { git = "https://github.com/tock/tock", rev = "405417" }
capsules = { git = "https://github.com/tock/tock", rev = "405417" }
kernel = { git = "https://github.com/tock/tock", rev = "405417" }
nrf52 = { git = "https://github.com/tock/tock", rev = "405417" }
nrf52840 = { git = "https://github.com/tock/tock", rev = "405417" }
components = { git = "https://github.com/tock/tock", rev = "405417" }
nrf52_components = { git = "https://github.com/tock/tock", rev = "405417" }
cortexm4 = { git = "https://github.com/tock/tock", rev = "2ff6868" }
capsules-core = { git = "https://github.com/tock/tock", rev = "2ff6868" }
capsules-extra = { git = "https://github.com/tock/tock", rev = "2ff6868" }
kernel = { git = "https://github.com/tock/tock", rev = "2ff6868" }
nrf52 = { git = "https://github.com/tock/tock", rev = "2ff6868" }
nrf52840 = { git = "https://github.com/tock/tock", rev = "2ff6868" }
components = { git = "https://github.com/tock/tock", rev = "2ff6868" }
nrf52_components = { git = "https://github.com/tock/tock", rev = "2ff6868" }

# For Development
# cortexm4 = { path = "../../../tock/arch/cortex-m4" }
Expand Down
2 changes: 1 addition & 1 deletion boards/clue_nrf52840-bootloader/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fn main() {
println!("cargo:rerun-if-changed=../kernel_layout.ld");

let mut f = bootloader_attributes::get_file();
bootloader_attributes::write_flags(&mut f, "1.1.0", 0x36000);
bootloader_attributes::write_flags(&mut f, "1.1.3", 0x36000);
bootloader_attributes::write_attribute(&mut f, "board", "clue_nrf52840");
bootloader_attributes::write_attribute(&mut f, "arch", "cortex-m4");
bootloader_attributes::write_attribute(&mut f, "appaddr", "0x80000");
Expand Down
Loading