diff --git a/pong/Cargo.lock b/pong/Cargo.lock index 90a90c7..647f02e 100644 --- a/pong/Cargo.lock +++ b/pong/Cargo.lock @@ -15,19 +15,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" [[package]] -name = "lw-riscv" +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pong" version = "0.1.0" dependencies = [ "riscv", "riscv-rt", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "proc-macro2" version = "1.0.92" diff --git a/pong/Cargo.toml b/pong/Cargo.toml index dcf0e86..712d85f 100644 --- a/pong/Cargo.toml +++ b/pong/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "lw-riscv" +name = "pong" version = "0.1.0" edition = "2021" diff --git a/pong/Makefile b/pong/Makefile index ec9f05f..f2911b6 100644 --- a/pong/Makefile +++ b/pong/Makefile @@ -1,15 +1,20 @@ +NAME=pong + default: extract build: cargo build --release extract: build - riscv32-elf-objcopy -O binary --only-section=.text target/riscv32i-unknown-none-elf/release/lw-riscv ~/text.bin - riscv32-elf-objcopy -O binary --only-section=.rodata target/riscv32i-unknown-none-elf/release/lw-riscv ~/rodata.bin + riscv32-elf-objcopy -O binary --only-section=.text "target/riscv32i-unknown-none-elf/release/${NAME}" ~/text.bin + riscv32-elf-objcopy -O binary --only-section=.rodata "target/riscv32i-unknown-none-elf/release/${NAME}" ~/rodata.bin size: extract cargo size --release -- -A +disassemble: build + riscv32-elf-objdump -Cd "target/riscv32i-unknown-none-elf/release/${NAME}" | less + clean: cargo clean rm text.bin