Skip to content

Commit

Permalink
Merge pull request #28 from tock/update-aug-2023-wm1110
Browse files Browse the repository at this point in the history
Aug 2023: update to recent Tock, and add wm1110 dev board
  • Loading branch information
bradjc authored Sep 19, 2023
2 parents 46cdb37 + c494032 commit c0403c4
Show file tree
Hide file tree
Showing 44 changed files with 1,702 additions and 905 deletions.
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 <[email protected]>"]

[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 <[email protected]>"]
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

0 comments on commit c0403c4

Please sign in to comment.