application exit error handing
This commit is contained in:
@@ -13,7 +13,7 @@ LDFLAGS += -Wl,-Bstatic,-T,$(VORTEX_RT_PATH)/linker/vx_link.ld -Wl,--gc-sections
|
||||
|
||||
PROJECT = hello
|
||||
|
||||
SRCS = hello.cpp
|
||||
SRCS = main.cpp
|
||||
|
||||
all: $(PROJECT).elf $(PROJECT).hex $(PROJECT).dump
|
||||
|
||||
@@ -27,7 +27,10 @@ $(PROJECT).elf: $(SRCS)
|
||||
$(CC) $(CFLAGS) $(SRCS) $(LDFLAGS) -o $(PROJECT).elf
|
||||
|
||||
run: $(PROJECT).hex
|
||||
(cd ../../../hw/simulate/obj_dir && ./VVortex ../../../tests/runtime/hello/$(PROJECT).hex)
|
||||
../../../hw/simulate/obj_dir/VVortex $(PROJECT).hex
|
||||
|
||||
run-simx: $(PROJECT).hex
|
||||
../../../simX/simX -a rv32i -i $(PROJECT).hex
|
||||
|
||||
.depend: $(SRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend;
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#include <stdio.h>
|
||||
|
||||
struct hello {
|
||||
int a;
|
||||
hello()
|
||||
{
|
||||
a = 55;
|
||||
}
|
||||
};
|
||||
|
||||
hello nameing;
|
||||
|
||||
int main()
|
||||
{
|
||||
nameing.a = 20;
|
||||
int b;
|
||||
printf("Passed!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
8
tests/runtime/hello/main.cpp
Normal file
8
tests/runtime/hello/main.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("Hello World!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user