Analyzer: Invoke cargo check through Makefile

pull/54/head
Andre Richter 4 years ago
parent 0a1616d8b2
commit bf8e6c36c7
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -37,6 +37,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -50,7 +51,7 @@ DOCKER_QEMU = $(DOCKER_CMD) $(DOCKER_IMAGE)
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
.PHONY: all doc qemu clippy clean readelf objdump nm
.PHONY: all doc qemu clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -84,3 +85,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

Binary file not shown.

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -37,6 +37,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -50,7 +51,7 @@ DOCKER_QEMU = $(DOCKER_CMD) $(DOCKER_IMAGE)
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
.PHONY: all doc qemu clippy clean readelf objdump nm
.PHONY: all doc qemu clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -84,3 +85,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

Binary file not shown.

Binary file not shown.

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -37,6 +37,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -50,7 +51,7 @@ DOCKER_QEMU = $(DOCKER_CMD) $(DOCKER_IMAGE)
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
.PHONY: all doc qemu clippy clean readelf objdump nm
.PHONY: all doc qemu clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -84,3 +85,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

Binary file not shown.

Binary file not shown.

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -37,6 +37,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -50,7 +51,7 @@ DOCKER_QEMU = $(DOCKER_CMD) $(DOCKER_IMAGE)
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
.PHONY: all doc qemu clippy clean readelf objdump nm
.PHONY: all doc qemu clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -84,3 +85,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -37,6 +37,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -50,7 +51,7 @@ DOCKER_QEMU = $(DOCKER_CMD) $(DOCKER_IMAGE)
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
.PHONY: all doc qemu clippy clean readelf objdump nm
.PHONY: all doc qemu clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -84,3 +85,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

Binary file not shown.

Binary file not shown.

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -37,6 +37,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -50,7 +51,7 @@ DOCKER_QEMU = $(DOCKER_CMD) $(DOCKER_IMAGE)
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
.PHONY: all doc qemu clippy clean readelf objdump nm
.PHONY: all doc qemu clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -84,3 +85,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

Binary file not shown.

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -45,6 +45,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -68,7 +69,7 @@ endif
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
EXEC_MINIPUSH = ruby ../utils/minipush.rb
.PHONY: all doc qemu qemuasm chainboot clippy clean readelf objdump nm
.PHONY: all doc qemu qemuasm chainboot clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -108,3 +109,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

@ -127,7 +127,7 @@ diff -uNr 06_drivers_gpio_uart/Makefile 07_uart_chainloader/Makefile
endif
# Export for build.rs
@@ -45,12 +53,22 @@
@@ -46,12 +54,22 @@
DOCKER_IMAGE = rustembedded/osdev-utils
DOCKER_CMD = docker run -it --rm -v $(shell pwd):/work/tutorial -w /work/tutorial
@ -144,15 +144,15 @@ diff -uNr 06_drivers_gpio_uart/Makefile 07_uart_chainloader/Makefile
+ DOCKER_CHAINBOOT = $(DOCKER_CMD_DEV) $(DOCKER_ARG_DIR_UTILS) $(DOCKER_IMAGE)
+endif
-.PHONY: all doc qemu clippy clean readelf objdump nm
-.PHONY: all doc qemu clippy clean readelf objdump nm check
+EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
+EXEC_MINIPUSH = ruby ../utils/minipush.rb
+
+.PHONY: all doc qemu qemuasm chainboot clippy clean readelf objdump nm
+.PHONY: all doc qemu qemuasm chainboot clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@@ -63,13 +81,19 @@
@@ -64,13 +82,19 @@
$(DOC_CMD) --document-private-items --open
ifeq ($(QEMU_MACHINE_TYPE),)

Binary file not shown.

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -43,6 +43,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -66,7 +67,7 @@ endif
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
EXEC_MINIPUSH = ruby ../utils/minipush.rb
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -103,3 +104,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

@ -66,16 +66,16 @@ diff -uNr 07_uart_chainloader/Makefile 08_timestamps/Makefile
endif
# Export for build.rs
@@ -68,7 +66,7 @@
@@ -69,7 +67,7 @@
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
EXEC_MINIPUSH = ruby ../utils/minipush.rb
-.PHONY: all doc qemu qemuasm chainboot clippy clean readelf objdump nm
+.PHONY: all doc qemu chainboot clippy clean readelf objdump nm
-.PHONY: all doc qemu qemuasm chainboot clippy clean readelf objdump nm check
+.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@@ -81,18 +79,15 @@
@@ -82,18 +80,15 @@
$(DOC_CMD) --document-private-items --open
ifeq ($(QEMU_MACHINE_TYPE),)

Binary file not shown.

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -47,6 +47,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -77,7 +78,7 @@ endif
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
EXEC_MINIPUSH = ruby ../utils/minipush.rb
.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm
.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -132,3 +133,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

@ -323,7 +323,7 @@ diff -uNr 08_timestamps/Makefile 09_hw_debug_JTAG/Makefile
LINKER_FILE = src/bsp/raspberrypi/link.ld
RUSTC_MISC_ARGS = -C target-cpu=cortex-a72
endif
@@ -52,21 +56,28 @@
@@ -53,21 +57,28 @@
DOCKER_IMAGE = rustembedded/osdev-utils
DOCKER_CMD = docker run -it --rm -v $(shell pwd):/work/tutorial -w /work/tutorial
DOCKER_ARG_DIR_UTILS = -v $(shell pwd)/../utils:/work/utils
@ -348,12 +348,12 @@ diff -uNr 08_timestamps/Makefile 09_hw_debug_JTAG/Makefile
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
EXEC_MINIPUSH = ruby ../utils/minipush.rb
-.PHONY: all doc qemu chainboot clippy clean readelf objdump nm
+.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm
-.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
+.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@@ -89,6 +100,24 @@
@@ -90,6 +101,24 @@
chainboot: all
@$(DOCKER_CHAINBOOT) $(EXEC_MINIPUSH) $(DEV_SERIAL) $(OUTPUT)

Binary file not shown.

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -47,6 +47,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -77,7 +78,7 @@ endif
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
EXEC_MINIPUSH = ruby ../utils/minipush.rb
.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm
.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -132,3 +133,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

Binary file not shown.

Binary file not shown.

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -47,6 +47,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -77,7 +78,7 @@ endif
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
EXEC_MINIPUSH = ruby ../utils/minipush.rb
.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm
.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -132,3 +133,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

Binary file not shown.

Binary file not shown.

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -47,6 +47,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -77,7 +78,7 @@ endif
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
EXEC_MINIPUSH = ruby ../utils/minipush.rb
.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm
.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -132,3 +133,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -60,6 +60,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
TEST_CMD = cargo test $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
@ -93,7 +94,7 @@ endif
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
EXEC_MINIPUSH = ruby ../utils/minipush.rb
.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm test
.PHONY: all doc qemu test chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -163,3 +164,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

@ -853,15 +853,15 @@ diff -uNr 12_exceptions_part1_groundwork/Makefile 13_integrated_testing/Makefile
RUSTFLAGS = -C link-arg=-T$(LINKER_FILE) $(RUSTC_MISC_ARGS)
RUSTFLAGS_PEDANTIC = $(RUSTFLAGS) -D warnings -D missing_docs
@@ -47,6 +60,7 @@
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
@@ -48,6 +61,7 @@
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
+TEST_CMD = cargo test $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@@ -54,18 +68,20 @@
@@ -55,18 +69,20 @@
KERNEL_ELF = target/$(TARGET)/release/kernel
DOCKER_IMAGE = rustembedded/osdev-utils
@ -886,16 +886,16 @@ diff -uNr 12_exceptions_part1_groundwork/Makefile 13_integrated_testing/Makefile
DOCKER_CHAINBOOT = $(DOCKER_CMD_DEV) $(DOCKER_ARG_DIR_UTILS) $(DOCKER_IMAGE)
DOCKER_JTAGBOOT = $(DOCKER_CMD_DEV) $(DOCKER_ARG_DIR_UTILS) $(DOCKER_ARG_DIR_JTAG) $(DOCKER_IMAGE)
@@ -77,7 +93,7 @@
@@ -78,7 +94,7 @@
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
EXEC_MINIPUSH = ruby ../utils/minipush.rb
-.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm
+.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm test
-.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm check
+.PHONY: all doc qemu test chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@@ -90,11 +106,26 @@
@@ -91,11 +107,26 @@
$(DOC_CMD) --document-private-items --open
ifeq ($(QEMU_MACHINE_TYPE),)

Binary file not shown.

Binary file not shown.

@ -3,11 +3,8 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"make",
"check"
]
}

@ -61,6 +61,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
TEST_CMD = cargo test $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
@ -94,7 +95,7 @@ endif
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
EXEC_MINIPUSH = ruby ../utils/minipush.rb
.PHONY: all doc qemu chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm test
.PHONY: all doc qemu test chainboot jtagboot openocd gdb gdb-opt0 clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -166,3 +167,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

@ -773,7 +773,7 @@ diff -uNr 13_integrated_testing/Makefile 14_exceptions_part2_peripheral_IRQs/Mak
--release
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
@@ -105,6 +106,7 @@
@@ -106,6 +107,7 @@
doc:
$(DOC_CMD) --document-private-items --open
@ -781,7 +781,7 @@ diff -uNr 13_integrated_testing/Makefile 14_exceptions_part2_peripheral_IRQs/Mak
ifeq ($(QEMU_MACHINE_TYPE),)
qemu test:
@echo $(QEMU_MISSING_STRING)
@@ -121,6 +123,7 @@
@@ -122,6 +124,7 @@
endef
export KERNEL_TEST_RUNNER

@ -3,11 +3,11 @@
"editor.rulers": [
100
],
"rust-analyzer.cargoFeatures.features": [
"bsp_rpi3"
],
"rust-analyzer.cargo-watch.allTargets": false,
"rust-analyzer.cargo-watch.arguments": [
"--target=aarch64-unknown-none-softfloat"
"rust-analyzer.checkOnSave.overrideCommand": [
"cargo",
"check",
"--message-format=json",
"--target=aarch64-unknown-none-softfloat",
"--features=bsp_rpi3"
]
}
}

@ -43,6 +43,7 @@ COMPILER_ARGS = --target=$(TARGET) \
RUSTC_CMD = cargo rustc $(COMPILER_ARGS)
DOC_CMD = cargo doc $(COMPILER_ARGS)
CLIPPY_CMD = cargo clippy $(COMPILER_ARGS)
CHECK_CMD = cargo check $(COMPILER_ARGS)
OBJCOPY_CMD = rust-objcopy \
--strip-all \
-O binary
@ -66,7 +67,7 @@ endif
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
EXEC_MINIPUSH = ruby ../utils/minipush.rb
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm
.PHONY: all doc qemu chainboot clippy clean readelf objdump nm check
all:
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(RUSTC_CMD)
@ -103,3 +104,7 @@ objdump: all
nm: all
rust-nm --demangle --print-size $(KERNEL_ELF) | sort
# For rust-analyzer
check:
@RUSTFLAGS="$(RUSTFLAGS)" $(CHECK_CMD) --message-format=json

Binary file not shown.
Loading…
Cancel
Save