mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-24 10:26:25 +04:00
Bump Rust to nightly-2022-04-11 && support dubugging in release mode
This commit is contained in:
parent
3bc09a651e
commit
1205a81f35
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ os/src/link_app.S
|
||||
os/src/linker.ld
|
||||
os/last-*
|
||||
os/Cargo.lock
|
||||
os/.gdb_history
|
||||
user/build
|
||||
user/target/*
|
||||
user/.idea/*
|
||||
|
@ -15,4 +15,7 @@ xmas-elf = "0.7.0"
|
||||
|
||||
[features]
|
||||
board_qemu = []
|
||||
board_k210 = []
|
||||
board_k210 = []
|
||||
|
||||
[profile.release]
|
||||
debug = true
|
||||
|
13
os/Makefile
13
os/Makefile
@ -11,6 +11,11 @@ SBI ?= rustsbi
|
||||
BOOTLOADER := ../bootloader/$(SBI)-$(BOARD).bin
|
||||
K210_BOOTLOADER_SIZE := 131072
|
||||
|
||||
# Building mode argument
|
||||
ifeq ($(MODE), release)
|
||||
MODE_ARG := --release
|
||||
endif
|
||||
|
||||
# KERNEL ENTRY
|
||||
ifeq ($(BOARD), qemu)
|
||||
KERNEL_ENTRY_PA := 0x80200000
|
||||
@ -92,4 +97,10 @@ 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 -2 attach-session -d
|
||||
|
||||
.PHONY: build env kernel clean disasm disasm-vim run-inner switch-check
|
||||
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 gdbserver gdbclient
|
||||
|
@ -1 +1 @@
|
||||
nightly-2022-01-19
|
||||
nightly-2022-04-11
|
||||
|
@ -7,4 +7,7 @@ edition = "2018"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
buddy_system_allocator = "0.6"
|
||||
buddy_system_allocator = "0.6"
|
||||
|
||||
[profile.release]
|
||||
debug = true
|
||||
|
Loading…
Reference in New Issue
Block a user