mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2025-01-18 21:17:14 +04:00
Bump Rust to nightly-2022-04-11 && support debugging in release mode
This commit is contained in:
parent
3b7c4b1cdc
commit
ca1d7a07b8
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,6 +6,7 @@ os/src/linker.ld
|
|||||||
os/last-*
|
os/last-*
|
||||||
os/Cargo.lock
|
os/Cargo.lock
|
||||||
os/last-*
|
os/last-*
|
||||||
|
os/.gdb_history
|
||||||
user/target/*
|
user/target/*
|
||||||
user/.idea/*
|
user/.idea/*
|
||||||
user/Cargo.lock
|
user/Cargo.lock
|
||||||
|
@ -8,4 +8,7 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
spin = "0.7.0"
|
spin = "0.7.0"
|
||||||
lazy_static = { version = "1.4.0", features = ["spin_no_std"] }
|
lazy_static = { version = "1.4.0", features = ["spin_no_std"] }
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
debug = true
|
||||||
|
@ -22,3 +22,6 @@ easy-fs = { path = "../easy-fs" }
|
|||||||
[features]
|
[features]
|
||||||
board_qemu = []
|
board_qemu = []
|
||||||
board_k210 = []
|
board_k210 = []
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
debug = true
|
||||||
|
14
os/Makefile
14
os/Makefile
@ -14,6 +14,11 @@ SBI ?= rustsbi
|
|||||||
BOOTLOADER := ../bootloader/$(SBI)-$(BOARD).bin
|
BOOTLOADER := ../bootloader/$(SBI)-$(BOARD).bin
|
||||||
K210_BOOTLOADER_SIZE := 131072
|
K210_BOOTLOADER_SIZE := 131072
|
||||||
|
|
||||||
|
# Building mode argument
|
||||||
|
ifeq ($(MODE), release)
|
||||||
|
MODE_ARG := --release
|
||||||
|
endif
|
||||||
|
|
||||||
# KERNEL ENTRY
|
# KERNEL ENTRY
|
||||||
ifeq ($(BOARD), qemu)
|
ifeq ($(BOARD), qemu)
|
||||||
KERNEL_ENTRY_PA := 0x80200000
|
KERNEL_ENTRY_PA := 0x80200000
|
||||||
@ -106,4 +111,11 @@ debug: build
|
|||||||
tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \
|
tmux split-window -h "riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'" && \
|
||||||
tmux -2 attach-session -d
|
tmux -2 attach-session -d
|
||||||
|
|
||||||
.PHONY: build env kernel clean disasm disasm-vim run-inner switch-check fs-img
|
|
||||||
|
gdbserver: build
|
||||||
|
@qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S
|
||||||
|
|
||||||
|
gdbclient:
|
||||||
|
@riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'
|
||||||
|
|
||||||
|
.PHONY: build env kernel clean disasm disasm-vim run-inner switch-check fs-img gdbserver gdbclient
|
||||||
|
@ -1 +1 @@
|
|||||||
nightly-2022-01-19
|
nightly-2022-04-11
|
||||||
|
@ -10,3 +10,6 @@ edition = "2018"
|
|||||||
buddy_system_allocator = "0.6"
|
buddy_system_allocator = "0.6"
|
||||||
bitflags = "1.2.1"
|
bitflags = "1.2.1"
|
||||||
riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] }
|
riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] }
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
debug = true
|
||||||
|
Loading…
Reference in New Issue
Block a user