refactoring fixes
This commit is contained in:
28
runtime/tests/nlTest/Makefile
Normal file
28
runtime/tests/nlTest/Makefile
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
COMP = /opt/riscv/bin/riscv32-unknown-elf-gcc
|
||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
||||
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../../startup/vx_link.ld -ffreestanding -nostartfiles -nostdlib
|
||||
|
||||
DMP = /opt/riscv/bin/riscv32-unknown-elf-objdump
|
||||
CPY = /opt/riscv/bin/riscv32-unknown-elf-objcopy
|
||||
|
||||
|
||||
NEWLIB = ../../newlib/newlib.c ../../newlib/newlib_notimp.c ../../newlib/newlib.s
|
||||
VX_STR = ../../startup/vx_start.S
|
||||
VX_INT = ../../intrinsics/vx_intrinsics.s
|
||||
VX_IO = ../../io/vx_io.s ../../io/vx_io.c
|
||||
VX_API = ../../vx_api/vx_api.c
|
||||
VX_FIO = ../../fileio/fileio.s
|
||||
|
||||
VX_MAIN = ./vx_nl_main.c
|
||||
|
||||
all: HEX DUMP ELF
|
||||
|
||||
DUMP: ELF
|
||||
$(DMP) -D vx_nl_main.elf > vx_nl_main.dump
|
||||
|
||||
HEX: ELF
|
||||
$(CPY) -O ihex vx_nl_main.elf vx_nl_main.hex
|
||||
|
||||
ELF:
|
||||
$(COMP) $(CC_FLAGS) $(VX_STR) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_MAIN) /opt/riscv/riscv32-unknown-elf/lib/libc.a /opt/riscv/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc -o vx_nl_main.elf
|
||||
33
runtime/tests/nlTest/vx_nl_main.c
Normal file
33
runtime/tests/nlTest/vx_nl_main.c
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
#include "../../intrinsics/vx_intrinsics.h"
|
||||
#include "../../io/vx_io.h"
|
||||
#include "../common/tests.h"
|
||||
#include "../../vx_api/vx_api.h"
|
||||
#include "../../fileio/fileio.h"
|
||||
|
||||
// #include <utlist.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
// Newlib
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
// Main is called with all threads active of warp 0
|
||||
vx_tmc(1);
|
||||
|
||||
|
||||
printf("printf: Newlib Main %d\n", 456);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
76173
runtime/tests/nlTest/vx_nl_main.dump
Normal file
76173
runtime/tests/nlTest/vx_nl_main.dump
Normal file
File diff suppressed because it is too large
Load Diff
BIN
runtime/tests/nlTest/vx_nl_main.elf
Normal file
BIN
runtime/tests/nlTest/vx_nl_main.elf
Normal file
Binary file not shown.
4675
runtime/tests/nlTest/vx_nl_main.hex
Normal file
4675
runtime/tests/nlTest/vx_nl_main.hex
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user