Sync with upstream Tock to have reproducible builds.
This commit is contained in:
18
boards/nordic/nrf52840_dongle_dfu/Cargo.toml
Normal file
18
boards/nordic/nrf52840_dongle_dfu/Cargo.toml
Normal file
@@ -0,0 +1,18 @@
|
||||
[package]
|
||||
name = "nrf52840_dongle_dfu"
|
||||
version = "0.1.0"
|
||||
authors = ["Tock Project Developers <tock-dev@googlegroups.com>"]
|
||||
build = "build.rs"
|
||||
edition = "2018"
|
||||
|
||||
[[bin]]
|
||||
path = "../nrf52840_dongle/src/main.rs"
|
||||
name = "nrf52840_dongle_dfu"
|
||||
|
||||
[dependencies]
|
||||
components = { path = "../../components" }
|
||||
cortexm4 = { path = "../../../arch/cortex-m4" }
|
||||
capsules = { path = "../../../capsules" }
|
||||
kernel = { path = "../../../kernel" }
|
||||
nrf52840 = { path = "../../../chips/nrf52840" }
|
||||
nrf52dk_base = { path = "../nrf52dk_base" }
|
||||
29
boards/nordic/nrf52840_dongle_dfu/Makefile
Normal file
29
boards/nordic/nrf52840_dongle_dfu/Makefile
Normal file
@@ -0,0 +1,29 @@
|
||||
# Makefile for building the tock kernel for the nRF development kit
|
||||
|
||||
TOCK_ARCH=cortex-m4
|
||||
TARGET=thumbv7em-none-eabi
|
||||
PLATFORM=nrf52840_dongle_dfu
|
||||
|
||||
include ../../Makefile.common
|
||||
|
||||
TOCKLOADER=tockloader
|
||||
|
||||
# Where in the nrf52 flash to load the kernel with `tockloader`
|
||||
KERNEL_ADDRESS=0x01000
|
||||
|
||||
# Upload programs over uart with tockloader
|
||||
ifdef PORT
|
||||
TOCKLOADER_GENERAL_FLAGS += --port $(PORT)
|
||||
endif
|
||||
|
||||
TOCKLOADER_JTAG_FLAGS = --jlink --arch $(TOCK_ARCH) --board $(PLATFORM) --page-size 4096 --jlink-device nrf52840_xxaa
|
||||
|
||||
# Upload the kernel over JTAG
|
||||
.PHONY: flash
|
||||
flash: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/$(PLATFORM).bin
|
||||
$(TOCKLOADER) $(TOCKLOADER_GENERAL_FLAGS) flash --address $(KERNEL_ADDRESS) $(TOCKLOADER_JTAG_FLAGS) $<
|
||||
|
||||
# Upload the kernel over serial/bootloader
|
||||
.PHONY: program
|
||||
program: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/$(PLATFORM).hex
|
||||
$(error Cannot program nRF52 Dongle over USB. Use \`make flash\` and JTAG)
|
||||
4
boards/nordic/nrf52840_dongle_dfu/build.rs
Normal file
4
boards/nordic/nrf52840_dongle_dfu/build.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
fn main() {
|
||||
println!("cargo:rerun-if-changed=layout.ld");
|
||||
println!("cargo:rerun-if-changed=../../kernel_layout.ld");
|
||||
}
|
||||
10
boards/nordic/nrf52840_dongle_dfu/layout.ld
Normal file
10
boards/nordic/nrf52840_dongle_dfu/layout.ld
Normal file
@@ -0,0 +1,10 @@
|
||||
MEMORY
|
||||
{
|
||||
rom (rx) : ORIGIN = 0x00001000, LENGTH = 188K
|
||||
prog (rx) : ORIGIN = 0x00030000, LENGTH = 832K
|
||||
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 256K
|
||||
}
|
||||
|
||||
MPU_MIN_ALIGN = 8K;
|
||||
|
||||
INCLUDE ../../kernel_layout.ld
|
||||
Reference in New Issue
Block a user