mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Merge pull request #1164 from davidharrishmc/dev
Use new wsim --elf syntax in hello and gpio examples
This commit is contained in:
commit
ddb8e3dbb1
@ -2,7 +2,6 @@ TARGET = gpio
|
|||||||
|
|
||||||
$(TARGET).objdump: $(TARGET)
|
$(TARGET).objdump: $(TARGET)
|
||||||
riscv64-unknown-elf-objdump -S -D $(TARGET) > $(TARGET).objdump
|
riscv64-unknown-elf-objdump -S -D $(TARGET) > $(TARGET).objdump
|
||||||
cp $(TARGET) $(TARGET).elf
|
|
||||||
|
|
||||||
$(TARGET): $(TARGET).c Makefile
|
$(TARGET): $(TARGET).c Makefile
|
||||||
riscv64-unknown-elf-gcc -o $(TARGET) -gdwarf-2 -O\
|
riscv64-unknown-elf-gcc -o $(TARGET) -gdwarf-2 -O\
|
||||||
@ -30,4 +29,4 @@ $(TARGET): $(TARGET).c Makefile
|
|||||||
# -fno-common -fno-builtin-printf -nostartfiles -lgcc \
|
# -fno-common -fno-builtin-printf -nostartfiles -lgcc \
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(TARGET) $(TARGET).objdump
|
rm -f $(TARGET) $(TARGET).objdump* $(TARGET).memfile
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
// General-Purpose I/O (GPIO) example program illustrating compiled C code
|
// General-Purpose I/O (GPIO) example program illustrating compiled C code
|
||||||
// compile with make
|
// compile with make
|
||||||
// simulate with: wsim rv64gc hello.elf --sim verilator
|
// simulate with: wsim rv64gc --elf gpio --sim verilator
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "gpiolib.h"
|
#include "gpiolib.h"
|
||||||
|
@ -2,7 +2,6 @@ TARGET = hello
|
|||||||
|
|
||||||
$(TARGET).objdump: $(TARGET)
|
$(TARGET).objdump: $(TARGET)
|
||||||
riscv64-unknown-elf-objdump -S -D $(TARGET) > $(TARGET).objdump
|
riscv64-unknown-elf-objdump -S -D $(TARGET) > $(TARGET).objdump
|
||||||
cp $(TARGET) $(TARGET).elf
|
|
||||||
|
|
||||||
$(TARGET): $(TARGET).c Makefile
|
$(TARGET): $(TARGET).c Makefile
|
||||||
riscv64-unknown-elf-gcc -o $(TARGET) -gdwarf-2 -O\
|
riscv64-unknown-elf-gcc -o $(TARGET) -gdwarf-2 -O\
|
||||||
@ -30,4 +29,4 @@ $(TARGET): $(TARGET).c Makefile
|
|||||||
# -fno-common -fno-builtin-printf -nostartfiles -lgcc \
|
# -fno-common -fno-builtin-printf -nostartfiles -lgcc \
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(TARGET) $(TARGET).objdump
|
rm -f $(TARGET) $(TARGET).objdump* $(TARGET).memfile
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
// such that using \n\r for new lines works best.
|
// such that using \n\r for new lines works best.
|
||||||
|
|
||||||
// compile with make
|
// compile with make
|
||||||
// simulate Wally with: wsim rv64gc hello.elf --sim verilator
|
// simulate Wally with: wsim rv64gc --elf hello --sim verilator
|
||||||
// simulate in Spike with: spike hello.elf
|
// simulate in Spike with: spike hello
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user