summaryrefslogtreecommitdiff
path: root/software
diff options
context:
space:
mode:
authorMegan Wachs <megan@sifive.com>2016-08-01 10:07:07 -0700
committerMegan Wachs <megan@sifive.com>2016-08-01 11:35:34 -0700
commitb80083544c12351a969a1ce7be83c88707db73e4 (patch)
treeb30c60f84368c8319a7f4beeb6834c84b776285f /software
parent51bca217eabfcc90d21924241250eca63b860a91 (diff)
Bump Tool versions
- Remove duplicate GDB - Update target name to freedom-e300
Diffstat (limited to 'software')
-rw-r--r--software/shared/Makefile.shared3
l---------software/shared/link.lds1
-rw-r--r--software/shared/syscall.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/software/shared/Makefile.shared b/software/shared/Makefile.shared
index 5817826..70550a0 100644
--- a/software/shared/Makefile.shared
+++ b/software/shared/Makefile.shared
@@ -8,7 +8,8 @@ C_SRCS += $(SHARED_DIR)/init.c
C_SRCS += $(SHARED_DIR)/syscall.c
C_SRCS += $(SHARED_DIR)/drivers_sifive/plic.c
-LINKER_SCRIPT := $(SHARED_DIR)/link.lds
+PLATFORM ?= freedom-e300
+LINKER_SCRIPT := $(SWDIR)/../riscv-tests/debug/targets/$(PLATFORM)/link.lds
HEADERS += $(SHARED_DIR)/*.h
C_SRCS += $(TARGET).c
diff --git a/software/shared/link.lds b/software/shared/link.lds
deleted file mode 120000
index 013b6cb..0000000
--- a/software/shared/link.lds
+++ /dev/null
@@ -1 +0,0 @@
-../../riscv-tests/debug/targets/m2gl_m2s/link.lds \ No newline at end of file
diff --git a/software/shared/syscall.c b/software/shared/syscall.c
index 2e4199f..1acb88f 100644
--- a/software/shared/syscall.c
+++ b/software/shared/syscall.c
@@ -46,7 +46,7 @@ void _exit(int code)
write(STDERR_FILENO, message, strlen(message));
write_hex(STDERR_FILENO, code);
- while (1);
+ while (1){};
}
@@ -192,11 +192,11 @@ ssize_t write(int fd, const void* ptr, size_t len)
for (jj = 0; jj < len; jj++){
- while ((*uart_tx_count) < 1);
+ while ((*uart_tx_count) < 1){};
*uart_tx = current[jj];
if (current[jj] == '\n'){
- while ((*uart_tx_count) < 1);
+ while ((*uart_tx_count) < 1){};
*uart_tx = '\r';
}
}