diff --git a/bootloader/rustsbi-k210.bin b/bootloader/rustsbi-k210.bin index 158bfa4c..c53ed1fc 100755 Binary files a/bootloader/rustsbi-k210.bin and b/bootloader/rustsbi-k210.bin differ diff --git a/bootloader/rustsbi-qemu.bin b/bootloader/rustsbi-qemu.bin index 76e0e59e..ddbf336a 100755 Binary files a/bootloader/rustsbi-qemu.bin and b/bootloader/rustsbi-qemu.bin differ diff --git a/os/Cargo.toml b/os/Cargo.toml index b6770dc1..8f463bac 100644 --- a/os/Cargo.toml +++ b/os/Cargo.toml @@ -7,3 +7,6 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] + +[profile.release] +debug = true diff --git a/os/Makefile b/os/Makefile index c51f5928..d17939b4 100644 --- a/os/Makefile +++ b/os/Makefile @@ -1,6 +1,6 @@ # Building TARGET := riscv64gc-unknown-none-elf -MODE := debug +MODE ?= debug KERNEL_ELF := target/$(TARGET)/$(MODE)/os KERNEL_BIN := $(KERNEL_ELF).bin DISASM_TMP := target/$(TARGET)/$(MODE)/asm @@ -100,6 +100,7 @@ gdbserver: build @qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S gdbclient: + @echo $(KERNEL_ELF) @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 +.PHONY: build env kernel clean disasm disasm-vim run-inner switch-check gdbserver gdbclient