-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from ToolmanP/main
lab5: migrate to new architecture
- Loading branch information
Showing
408 changed files
with
11,434 additions
and
6,167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CompileFlags: | ||
CompilationDatabase: ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "QEMU (cppdbg)", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/build/kernel.img", | ||
"args": [], | ||
"cwd": "${workspaceFolder}", | ||
"environment": [], | ||
"externalConsole": false, | ||
"stopAtEntry": true, | ||
"stopAtConnect": true, | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
}, | ||
], | ||
"MIMode": "gdb", | ||
"targetArchitecture": "arm64", | ||
"miDebuggerServerAddress": "localhost:1234", | ||
"miDebuggerPath": "/usr/local/bin/gdb", | ||
"preLaunchTask": "Setup QEMU" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"clangd.arguments": [ | ||
"--compile-commands-dir=./" | ||
], | ||
"debug.allowBreakpointsEverywhere": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Setup QEMU", | ||
"type": "shell", | ||
"isBackground": true, | ||
"command": "make qemu-gdb", | ||
"problemMatcher": { | ||
"pattern": { | ||
"regexp": "^\\[QEMU\\] Waiting for GDB Connection" | ||
}, | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": "^\\[QEMU\\] Waiting for GDB Connection", | ||
"endsPattern": "^\\[QEMU\\] Waiting for GDB Connection", | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,4 @@ | ||
LAB := 5 | ||
TIMEOUT := 120 | ||
|
||
V := @ | ||
PROJECT_DIR := . | ||
BUILD_DIR := $(PROJECT_DIR)/build | ||
KERNEL_IMG := $(BUILD_DIR)/kernel.img | ||
QEMU := qemu-system-aarch64 | ||
_QEMU := $(PROJECT_DIR)/scripts/qemu/qemu_wrapper.sh $(QEMU) | ||
QEMU_GDB_PORT := 1234 | ||
QEMU_OPTS := -machine raspi3b -nographic -serial mon:stdio -m size=1G -kernel $(KERNEL_IMG) | ||
GDB := gdb-multiarch | ||
CHBUILD := $(PROJECT_DIR)/chbuild | ||
|
||
.PHONY: all | ||
all: build | ||
|
||
.PHONY: defconfig build clean distclean | ||
|
||
defconfig: | ||
$(V)$(CHBUILD) defconfig | ||
|
||
build: | ||
$(V)test -f $(PROJECT_DIR)/.config || $(CHBUILD) defconfig | ||
$(V)$(CHBUILD) build | ||
|
||
clean: | ||
$(V)$(CHBUILD) clean | ||
|
||
distclean: | ||
$(V)$(CHBUILD) distclean | ||
|
||
.PHONY: qemu qemu-gdb gdb | ||
|
||
qemu: | ||
$(V)$(_QEMU) $(QEMU_OPTS) | ||
|
||
qemu-gdb: | ||
$(V)$(_QEMU) -S -gdb tcp::$(QEMU_GDB_PORT) $(QEMU_OPTS) | ||
|
||
gdb: | ||
$(V)$(GDB) -x $(PROJECT_DIR)/.gdbinit | ||
|
||
.PHONY: grade | ||
|
||
grade: | ||
$(V)test -f $(PROJECT_DIR)/.config && cp $(PROJECT_DIR)/.config $(PROJECT_DIR)/.config.bak || true | ||
$(V)$(PROJECT_DIR)/scripts/grade/lab$(LAB).sh | ||
$(V)test -f $(PROJECT_DIR)/.config.bak && mv $(PROJECT_DIR)/.config.bak $(PROJECT_DIR)/.config || true | ||
include $(CURDIR)/../Scripts/lab.mk |
Oops, something went wrong.