Modify the Ruby file format and restore other file formats

pull/195/head
jameszow 8 months ago
parent 54f203b598
commit 05844fefcb

@ -20,4 +20,4 @@ path = "src/main.rs"
## Dependencies
##--------------------------------------------------------------------------------------------------
[dependencies]
[dependencies]

@ -6,18 +6,18 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -49,9 +49,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -63,9 +63,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -100,9 +100,9 @@ DOCKER_TOOLS = $(DOCKER_CMD) $(DOCKER_IMAGE)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu clippy clean readelf objdump nm check
all: $(KERNEL_BIN)

@ -6,18 +6,18 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -49,9 +49,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -63,9 +63,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -100,9 +100,9 @@ DOCKER_TOOLS = $(DOCKER_CMD) $(DOCKER_IMAGE)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu clippy clean readelf objdump nm check
all: $(KERNEL_BIN)

@ -41,7 +41,7 @@ diff -uNr 01_wait_forever/Cargo.toml 02_runtime_init/Cargo.toml
edition = "2021"
@@ -21,3 +21,7 @@
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
[dependencies]
+

@ -6,18 +6,18 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -49,9 +49,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -63,9 +63,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -103,9 +103,9 @@ DOCKER_TEST = $(DOCKER_CMD) $(DOCKER_ARG_DIR_COMMON) $(DOCKER_IMAGE)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -196,9 +196,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot
ifeq ($(QEMU_MACHINE_TYPE),) # QEMU is not supported for the board.

@ -101,9 +101,9 @@ diff -uNr 02_runtime_init/Makefile 03_hacky_hello_world/Makefile
+
+
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+## Testing targets
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+.PHONY: test test_boot
+
+ifeq ($(QEMU_MACHINE_TYPE),) # QEMU is not supported for the board.

@ -6,18 +6,18 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -49,9 +49,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -63,9 +63,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -103,9 +103,9 @@ DOCKER_TEST = $(DOCKER_CMD) $(DOCKER_ARG_DIR_COMMON) $(DOCKER_IMAGE)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -196,9 +196,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot
ifeq ($(QEMU_MACHINE_TYPE),) # QEMU is not supported for the board.

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -18,9 +18,9 @@ DEV_SERIAL ?= /dev/ttyUSB0
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -52,9 +52,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -66,9 +66,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -115,9 +115,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu miniterm clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -215,9 +215,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot
ifeq ($(QEMU_MACHINE_TYPE),) # QEMU is not supported for the board.

@ -195,7 +195,7 @@ diff -uNr 04_safe_globals/Makefile 05_drivers_gpio_uart/Makefile
+
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
@@ -88,6 +91,7 @@
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
@ -224,9 +224,9 @@ diff -uNr 04_safe_globals/Makefile 05_drivers_gpio_uart/Makefile
+
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
-.PHONY: all doc qemu clippy clean readelf objdump nm check
+.PHONY: all doc qemu miniterm clippy clean readelf objdump nm check

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -18,9 +18,9 @@ DEV_SERIAL ?= /dev/ttyUSB0
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -54,9 +54,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -68,9 +68,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -117,9 +117,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -221,9 +221,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot
ifeq ($(QEMU_MACHINE_TYPE),) # QEMU is not supported for the board.

@ -211,9 +211,9 @@ diff -uNr 05_drivers_gpio_uart/Makefile 06_uart_chainloader/Makefile
@@ -118,7 +120,7 @@
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
-.PHONY: all doc qemu miniterm clippy clean readelf objdump nm check
+.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
@ -647,9 +647,9 @@ diff -uNr 05_drivers_gpio_uart/tests/chainboot_test.rb 06_uart_chainloader/tests
+ end
+end
+
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+## Execution starts here
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+payload_path = ARGV.pop
+qemu_cmd = ARGV.join(' ')
+

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -18,9 +18,9 @@ DEV_SERIAL ?= /dev/ttyUSB0
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -52,9 +52,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -66,9 +66,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -115,9 +115,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -215,9 +215,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot
ifeq ($(QEMU_MACHINE_TYPE),) # QEMU is not supported for the board.

@ -961,9 +961,9 @@ diff -uNr 06_uart_chainloader/tests/chainboot_test.rb 07_timestamps/tests/chainb
- end
-end
-
-## -------------------------------------------------------------------------------------------------
-##--------------------------------------------------------------------------------------------------
-## Execution starts here
-## -------------------------------------------------------------------------------------------------
-##--------------------------------------------------------------------------------------------------
-payload_path = ARGV.pop
-qemu_cmd = ARGV.join(' ')
-

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -18,9 +18,9 @@ DEV_SERIAL ?= /dev/ttyUSB0
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -56,9 +56,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -70,9 +70,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -126,9 +126,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -226,9 +226,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -255,9 +255,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot
ifeq ($(QEMU_MACHINE_TYPE),) # QEMU is not supported for the board.

@ -368,9 +368,9 @@ diff -uNr 07_timestamps/Makefile 08_hw_debug_JTAG/Makefile
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+## Debugging targets
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+.PHONY: jtagboot openocd gdb gdb-opt0
+
+## ------------------------------------------------------------------------------
@ -397,9 +397,9 @@ diff -uNr 07_timestamps/Makefile 08_hw_debug_JTAG/Makefile
+
+
+
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
diff -uNr 07_timestamps/src/bsp/raspberrypi/driver.rs 08_hw_debug_JTAG/src/bsp/raspberrypi/driver.rs
--- 07_timestamps/src/bsp/raspberrypi/driver.rs

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -18,9 +18,9 @@ DEV_SERIAL ?= /dev/ttyUSB0
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -56,9 +56,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -70,9 +70,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -126,9 +126,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -226,9 +226,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -255,9 +255,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot
ifeq ($(QEMU_MACHINE_TYPE),) # QEMU is not supported for the board.

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -18,9 +18,9 @@ DEV_SERIAL ?= /dev/ttyUSB0
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -56,9 +56,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -70,9 +70,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -126,9 +126,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -226,9 +226,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -255,9 +255,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot
ifeq ($(QEMU_MACHINE_TYPE),) # QEMU is not supported for the board.

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -18,9 +18,9 @@ DEV_SERIAL ?= /dev/ttyUSB0
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -56,9 +56,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -70,9 +70,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -126,9 +126,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -226,9 +226,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -255,9 +255,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot
ifeq ($(QEMU_MACHINE_TYPE),) # QEMU is not supported for the board.

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -25,9 +25,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -65,9 +65,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = kernel/Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -79,9 +79,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -136,9 +136,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -238,9 +238,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -267,9 +267,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot test_unit test_integration
test_unit test_integration: FEATURES += --features test_build

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -25,9 +25,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -65,9 +65,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = kernel/Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -79,9 +79,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -136,9 +136,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -238,9 +238,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -267,9 +267,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot test_unit test_integration
test_unit test_integration: FEATURES += --features test_build

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -25,9 +25,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -65,9 +65,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = kernel/Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -79,9 +79,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -136,9 +136,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -238,9 +238,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -267,9 +267,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot test_unit test_integration
test_unit test_integration: FEATURES += --features test_build

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -25,9 +25,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -65,9 +65,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = kernel/Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -89,9 +89,9 @@ KERNEL_ELF = $(KERNEL_ELF_TTABLES)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -147,9 +147,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -257,9 +257,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -286,9 +286,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot test_unit test_integration
test_unit test_integration: FEATURES += --features test_build

@ -10,9 +10,9 @@ bsp_rpi3 = ["tock-registers"]
bsp_rpi4 = ["tock-registers"]
test_build = ["qemu-exit"]
## -------------------------------------------------------------------------------------------------
##-------------------------------------------------------------------------------------------------
## Dependencies
## -------------------------------------------------------------------------------------------------
##-------------------------------------------------------------------------------------------------
[dependencies]
test-types = { path = "../libraries/test-types" }
@ -25,9 +25,9 @@ qemu-exit = { version = "3.x.x", optional = true }
[target.'cfg(target_arch = "aarch64")'.dependencies]
aarch64-cpu = { version = "9.x.x" }
## -------------------------------------------------------------------------------------------------
##-------------------------------------------------------------------------------------------------
## Testing
## -------------------------------------------------------------------------------------------------
##-------------------------------------------------------------------------------------------------
[dev-dependencies]
test-macros = { path = "../libraries/test-macros" }

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -25,9 +25,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -65,9 +65,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = kernel/Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -89,9 +89,9 @@ KERNEL_ELF = $(KERNEL_ELF_TTABLES)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -147,9 +147,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -257,9 +257,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -286,9 +286,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot test_unit test_integration
test_unit test_integration: FEATURES += --features test_build

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -25,9 +25,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -65,9 +65,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = kernel/Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -106,9 +106,9 @@ KERNEL_ELF = $(KERNEL_ELF_TTABLES_SYMS)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -164,9 +164,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -281,9 +281,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -310,9 +310,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot test_unit test_integration
test_unit test_integration: FEATURES += --features test_build

@ -465,9 +465,9 @@ diff -uNr 16_virtual_mem_part4_higher_half_kernel/kernel_symbols/Cargo.toml 17_k
+default = []
+generated_symbols_available = []
+
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+## Dependencies
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+
+[dependencies]
+debug-symbol-types = { path = "../libraries/debug-symbol-types" }
@ -524,9 +524,9 @@ diff -uNr 16_virtual_mem_part4_higher_half_kernel/kernel_symbols.mk 17_kernel_sy
+include ../common/format.mk
+include ../common/docker.mk
+
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+## Check for input variables that need be exported by the calling Makefile
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+ifndef KERNEL_SYMBOLS_TOOL_PATH
+$(error KERNEL_SYMBOLS_TOOL_PATH is not set)
+endif
@ -545,9 +545,9 @@ diff -uNr 16_virtual_mem_part4_higher_half_kernel/kernel_symbols.mk 17_kernel_sy
+
+
+
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+## Targets and Prerequisites
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+KERNEL_SYMBOLS_MANIFEST = kernel_symbols/Cargo.toml
+KERNEL_SYMBOLS_LINKER_SCRIPT = kernel_symbols/kernel_symbols.ld
+
@ -562,9 +562,9 @@ diff -uNr 16_virtual_mem_part4_higher_half_kernel/kernel_symbols.mk 17_kernel_sy
+
+
+
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+## Command building blocks
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+GET_SYMBOLS_SECTION_VIRT_ADDR = $(DOCKER_TOOLS) $(EXEC_SYMBOLS_TOOL) \
+ --get_symbols_section_virt_addr $(KERNEL_SYMBOLS_OUTPUT_ELF)
+
@ -595,9 +595,9 @@ diff -uNr 16_virtual_mem_part4_higher_half_kernel/kernel_symbols.mk 17_kernel_sy
+
+
+
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+## Targets
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+.PHONY: all symbols measure_time_start measure_time_finish
+
+all: measure_time_start symbols measure_time_finish

@ -5,9 +5,9 @@
include ../common/format.mk
include ../common/docker.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Check for input variables that need be exported by the calling Makefile
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
ifndef KERNEL_SYMBOLS_TOOL_PATH
$(error KERNEL_SYMBOLS_TOOL_PATH is not set)
endif
@ -26,9 +26,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_SYMBOLS_MANIFEST = kernel_symbols/Cargo.toml
KERNEL_SYMBOLS_LINKER_SCRIPT = kernel_symbols/kernel_symbols.ld
@ -43,9 +43,9 @@ export KERNEL_SYMBOLS_DEMANGLED_RS
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
GET_SYMBOLS_SECTION_VIRT_ADDR = $(DOCKER_TOOLS) $(EXEC_SYMBOLS_TOOL) \
--get_symbols_section_virt_addr $(KERNEL_SYMBOLS_OUTPUT_ELF)
@ -76,9 +76,9 @@ DOCKER_TOOLS = $(DOCKER_CMD) $(DOCKER_IMAGE)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all symbols measure_time_start measure_time_finish
all: measure_time_start symbols measure_time_finish

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -25,9 +25,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -65,9 +65,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = kernel/Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -106,9 +106,9 @@ KERNEL_ELF = $(KERNEL_ELF_TTABLES_SYMS)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -166,9 +166,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -283,9 +283,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -311,9 +311,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot test_unit test_integration
test_unit test_integration: FEATURES += --features test_build

@ -1039,9 +1039,9 @@ diff -uNr 17_kernel_symbols/kernel/tests/05_backtrace_sanity.rb 18_backtrace/ker
+ end
+end
+
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+## Test registration
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+def subtest_collection
+ [PanicBacktraceTest.new, BacktraceCorrectnessTest.new]
+end
@ -1106,9 +1106,9 @@ diff -uNr 17_kernel_symbols/kernel/tests/06_backtrace_invalid_frame.rb 18_backtr
+ end
+end
+
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+## Test registration
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+def subtest_collection
+ [InvalidFramePointerTest.new]
+end
@ -1174,9 +1174,9 @@ diff -uNr 17_kernel_symbols/kernel/tests/07_backtrace_invalid_link.rb 18_backtra
+ end
+end
+
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+## Test registration
+## -------------------------------------------------------------------------------------------------
+##--------------------------------------------------------------------------------------------------
+def subtest_collection
+ [InvalidLinkTest.new]
+end

@ -5,9 +5,9 @@
include ../common/format.mk
include ../common/docker.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Check for input variables that need be exported by the calling Makefile
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
ifndef KERNEL_SYMBOLS_TOOL_PATH
$(error KERNEL_SYMBOLS_TOOL_PATH is not set)
endif
@ -26,9 +26,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_SYMBOLS_MANIFEST = kernel_symbols/Cargo.toml
KERNEL_SYMBOLS_LINKER_SCRIPT = kernel_symbols/kernel_symbols.ld
@ -43,9 +43,9 @@ export KERNEL_SYMBOLS_DEMANGLED_RS
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
GET_SYMBOLS_SECTION_VIRT_ADDR = $(DOCKER_TOOLS) $(EXEC_SYMBOLS_TOOL) \
--get_symbols_section_virt_addr $(KERNEL_SYMBOLS_OUTPUT_ELF)
@ -76,9 +76,9 @@ DOCKER_TOOLS = $(DOCKER_CMD) $(DOCKER_IMAGE)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all symbols measure_time_start measure_time_finish
all: measure_time_start symbols measure_time_finish

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -30,9 +30,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -70,9 +70,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = kernel/Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP)_$(DEBUG_PRINTS).build_config
@ -111,9 +111,9 @@ KERNEL_ELF = $(KERNEL_ELF_TTABLES_SYMS)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -171,9 +171,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -288,9 +288,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -316,9 +316,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot test_unit test_integration
test_unit test_integration: FEATURES += --features test_build

@ -1439,7 +1439,7 @@ diff -uNr 18_backtrace/Makefile 19_kernel_heap/Makefile
ifdef TEST
TEST_ARG = --test $(TEST)
@@ -70,7 +75,7 @@
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = kernel/Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
-LAST_BUILD_CONFIG = target/$(BSP).build_config

@ -5,9 +5,9 @@
include ../common/format.mk
include ../common/docker.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Check for input variables that need be exported by the calling Makefile
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
ifndef KERNEL_SYMBOLS_TOOL_PATH
$(error KERNEL_SYMBOLS_TOOL_PATH is not set)
endif
@ -26,9 +26,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_SYMBOLS_MANIFEST = kernel_symbols/Cargo.toml
KERNEL_SYMBOLS_LINKER_SCRIPT = kernel_symbols/kernel_symbols.ld
@ -43,9 +43,9 @@ export KERNEL_SYMBOLS_DEMANGLED_RS
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
GET_SYMBOLS_SECTION_VIRT_ADDR = $(DOCKER_TOOLS) $(EXEC_SYMBOLS_TOOL) \
--get_symbols_section_virt_addr $(KERNEL_SYMBOLS_OUTPUT_ELF)
@ -76,9 +76,9 @@ DOCKER_TOOLS = $(DOCKER_CMD) $(DOCKER_IMAGE)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all symbols measure_time_start measure_time_finish
all: measure_time_start symbols measure_time_finish

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -30,9 +30,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -70,9 +70,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = kernel/Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP)_$(DEBUG_PRINTS).build_config
@ -111,9 +111,9 @@ KERNEL_ELF = $(KERNEL_ELF_TTABLES_SYMS)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -171,9 +171,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -288,9 +288,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Debugging targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: jtagboot openocd gdb gdb-opt0
## ------------------------------------------------------------------------------
@ -316,9 +316,9 @@ gdb gdb-opt0: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot test_unit test_integration
test_unit test_integration: FEATURES += --features test_build

@ -11,9 +11,9 @@ bsp_rpi3 = ["tock-registers"]
bsp_rpi4 = ["tock-registers"]
test_build = ["qemu-exit"]
## -------------------------------------------------------------------------------------------------
##-------------------------------------------------------------------------------------------------
## Dependencies
## -------------------------------------------------------------------------------------------------
##-------------------------------------------------------------------------------------------------
[dependencies]
test-types = { path = "../libraries/test-types" }
@ -28,9 +28,9 @@ qemu-exit = { version = "3.x.x", optional = true }
[target.'cfg(target_arch = "aarch64")'.dependencies]
aarch64-cpu = { version = "9.x.x" }
## -------------------------------------------------------------------------------------------------
##-------------------------------------------------------------------------------------------------
## Testing
## -------------------------------------------------------------------------------------------------
##-------------------------------------------------------------------------------------------------
[dev-dependencies]
test-macros = { path = "../libraries/test-macros" }

@ -5,9 +5,9 @@
include ../common/format.mk
include ../common/docker.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Check for input variables that need be exported by the calling Makefile
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
ifndef KERNEL_SYMBOLS_TOOL_PATH
$(error KERNEL_SYMBOLS_TOOL_PATH is not set)
endif
@ -26,9 +26,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_SYMBOLS_MANIFEST = kernel_symbols/Cargo.toml
KERNEL_SYMBOLS_LINKER_SCRIPT = kernel_symbols/kernel_symbols.ld
@ -43,9 +43,9 @@ export KERNEL_SYMBOLS_DEMANGLED_RS
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
GET_SYMBOLS_SECTION_VIRT_ADDR = $(DOCKER_TOOLS) $(EXEC_SYMBOLS_TOOL) \
--get_symbols_section_virt_addr $(KERNEL_SYMBOLS_OUTPUT_ELF)
@ -76,9 +76,9 @@ DOCKER_TOOLS = $(DOCKER_CMD) $(DOCKER_IMAGE)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all symbols measure_time_start measure_time_finish
all: measure_time_start symbols measure_time_finish

@ -16,9 +16,9 @@ bsp_rpi4 = ["tock-registers"]
name = "kernel"
path = "src/main.rs"
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Dependencies
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
[dependencies]

@ -6,9 +6,9 @@ include ../common/docker.mk
include ../common/format.mk
include ../common/operating_system.mk
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Optional, user-provided configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
# Default to the RPi3.
BSP ?= rpi3
@ -18,9 +18,9 @@ DEV_SERIAL ?= /dev/ttyUSB0
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## BSP-specific configuration values
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
QEMU_MISSING_STRING = "This board is not yet supported for QEMU."
ifeq ($(BSP),rpi3)
@ -52,9 +52,9 @@ export LD_SCRIPT_PATH
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets and Prerequisites
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
KERNEL_MANIFEST = Cargo.toml
KERNEL_LINKER_SCRIPT = kernel.ld
LAST_BUILD_CONFIG = target/$(BSP).build_config
@ -66,9 +66,9 @@ KERNEL_ELF_DEPS = $(filter-out %: ,$(file < $(KERNEL_ELF).d)) $(KERNEL_MANIFEST)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Command building blocks
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
RUSTFLAGS = $(RUSTC_MISC_ARGS) \
-C link-arg=--library-path=$(LD_SCRIPT_PATH) \
-C link-arg=--script=$(KERNEL_LINKER_SCRIPT)
@ -115,9 +115,9 @@ endif
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all: $(KERNEL_BIN)
@ -215,9 +215,9 @@ nm: $(KERNEL_ELF)
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
## Testing targets
## -------------------------------------------------------------------------------------------------
##--------------------------------------------------------------------------------------------------
.PHONY: test test_boot
ifeq ($(QEMU_MACHINE_TYPE),) # QEMU is not supported for the board.

Loading…
Cancel
Save