fixed Makefile errors

This commit is contained in:
mariusmonton 2019-01-13 18:20:02 +01:00
parent 52953bc8de
commit 64030a7cc3
6 changed files with 11 additions and 10 deletions

View File

@ -2,14 +2,14 @@ TARGET = trace
TARGET_ARCH=riscv32
CC = riscv32-unknown-linux-gnu-gcc
CC = riscv32-unknown-elf-gcc
# compiling flags here
#CFLAGS = -Wall -I. -O0 -nostartfiles -march=rv32i -mabi=ilp32
CFLAGS = -Wall -I. -O0 -nostdlib -march=rv32i -mabi=ilp32 --entry main
#CFLAGS = -Wall -I. -O0 -nodefaultlibs -march=rv32i -mabi=ilp32
LINKER = riscv32-unknown-linux-gnu-gcc
LINKER = riscv32-unknown-elf-gcc
# linking flags here
LFLAGS = -I. --entry main
LIBS = $(EXTRA_LIBS)

View File

@ -1,7 +1,7 @@
#define TRACE (*(unsigned char *)0x40000000)
void main(void) {
int main(void) {
TRACE = 'H';
TRACE = 'e';

View File

@ -2,14 +2,14 @@ TARGET = trace2
TARGET_ARCH=riscv32
CC = riscv32-unknown-linux-gnu-gcc
CC = riscv32-unknown-elf-gcc
# compiling flags here
#CFLAGS = -Wall -I. -O0 -nostartfiles -march=rv32i -mabi=ilp32
CFLAGS = -Wall -I. -O0 -nostdlib -march=rv32i -mabi=ilp32 --entry main
#CFLAGS = -Wall -I. -O0 -nodefaultlibs -march=rv32i -mabi=ilp32
LINKER = riscv32-unknown-linux-gnu-gcc
LINKER = riscv32-unknown-elf-gcc
# linking flags here
LFLAGS = -I. --entry main
LIBS = $(EXTRA_LIBS)

View File

@ -1,7 +1,7 @@
#define TRACE (*(unsigned char *)0x40000000)
void main(void) {
int main(void) {
int i;
for(i=0;i<10;i++) {
TRACE = 'a' + i;

View File

@ -2,14 +2,14 @@ TARGET = trace3
TARGET_ARCH=riscv32
CC = riscv32-unknown-linux-gnu-gcc
CC = riscv32-unknown-elf-gcc
# compiling flags here
#CFLAGS = -Wall -I. -O0 -nostartfiles -march=rv32i -mabi=ilp32
CFLAGS = -Wall -I. -O0 -nostdlib -march=rv32i -mabi=ilp32 --entry main
#CFLAGS = -Wall -I. -O0 -nodefaultlibs -march=rv32i -mabi=ilp32
LINKER = riscv32-unknown-linux-gnu-gcc
LINKER = riscv32-unknown-elf-gcc
# linking flags here
LFLAGS = -I. --entry main
LIBS = $(EXTRA_LIBS)

View File

@ -1,12 +1,13 @@
#define TRACE (*(unsigned char *)0x40000000)
void main(void) {
int main(void) {
char msg[] = "abcdefg\n";
int i;
for (i=0; i<5; i++) {
TRACE = msg[i];
}
asm volatile ("rdcycle t0");
asm volatile ("rdtime t4");
asm volatile ("ecall");
}