Run single application

This commit is contained in:
luojia65 2021-04-08 00:22:25 +08:00
parent b83faa7c85
commit 2541896e28
3 changed files with 7 additions and 4 deletions

View File

@ -58,4 +58,4 @@ debug: build build-user
-gdb tcp::1234 -S \
gdb:
@{{gdb}} --eval-command="file {{kernel-elf}}" --eval-command="target remote localhost:1234"
@{{gdb}} --eval-command="file {{kernel-elf}}" --eval-command="target remote localhost:1234"

View File

@ -7,8 +7,8 @@ user-bin := build-path + "tornado-user.bin"
objcopy := "rust-objcopy --binary-architecture=riscv64"
build: user
build app: (elf app)
@{{objcopy}} {{user-elf}} --strip-all -O binary {{user-bin}}
user:
@cargo build --target={{target}} --{{mode}}
elf app:
@cargo build --target {{target}} --{{mode}} --bin {{app}}

View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello world!");
}