mirror of
https://github.com/LearningOS/rust-based-os-comp2022.git
synced 2026-05-05 14:04:11 +08:00
add vscode debug support. please see https://learningos.github.io/rust-based-os-comp2022/0setup-devel-env.html#vscode for more usage details
This commit is contained in:
@@ -10,3 +10,7 @@ edition = "2018"
|
||||
lazy_static = { version = "1.4.0", features = ["spin_no_std"] }
|
||||
log = "0.4"
|
||||
riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] }
|
||||
|
||||
[profile.release]
|
||||
debug = true
|
||||
opt-level = 0
|
||||
@@ -55,4 +55,7 @@ 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
|
||||
|
||||
dbg: build
|
||||
qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S
|
||||
|
||||
.PHONY: build env kernel clean run-inner
|
||||
|
||||
@@ -3,7 +3,7 @@ use crate::trap::TrapContext;
|
||||
use lazy_static::*;
|
||||
|
||||
const USER_STACK_SIZE: usize = 4096;
|
||||
const KERNEL_STACK_SIZE: usize = 4096 * 2;
|
||||
const KERNEL_STACK_SIZE: usize = 4096 * 20;
|
||||
const MAX_APP_NUM: usize = 16;
|
||||
const APP_BASE_ADDRESS: usize = 0x80400000;
|
||||
const APP_SIZE_LIMIT: usize = 0x20000;
|
||||
|
||||
Reference in New Issue
Block a user