From d60ffd8eea7ede509db5db196e322064074e6d61 Mon Sep 17 00:00:00 2001 From: Yanghao Hua Date: Sat, 27 Apr 2019 12:37:35 +0200 Subject: [PATCH 1/2] fix firmware/sections.lds section size alignment on 4 bytes --- Makefile | 5 +++-- firmware/sections.lds | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a005920..3fd3aad 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,14 @@ +RISCV_PATH = /opt/riscv32i/bin RISCV_GNU_TOOLCHAIN_GIT_REVISION = 411d134 -RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX = /opt/riscv32 +RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX = $(RISCV_PATH) SHELL = bash TEST_OBJS = $(addsuffix .o,$(basename $(wildcard tests/*.S))) FIRMWARE_OBJS = firmware/start.o firmware/irq.o firmware/print.o firmware/sieve.o firmware/multest.o firmware/stats.o GCC_WARNS = -Werror -Wall -Wextra -Wshadow -Wundef -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings GCC_WARNS += -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -pedantic # -Wconversion -TOOLCHAIN_PREFIX = $(RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX)i/bin/riscv32-unknown-elf- +TOOLCHAIN_PREFIX = $(RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX)/riscv32-unknown-elf- COMPRESSED_ISA = C # Add things like "export http_proxy=... https_proxy=..." here diff --git a/firmware/sections.lds b/firmware/sections.lds index 948814b..e1eb79f 100644 --- a/firmware/sections.lds +++ b/firmware/sections.lds @@ -20,5 +20,6 @@ SECTIONS { *(.text); *(*); end = .; + . = ALIGN(4); } > mem } From cf69d4da58b416648fb93cc3a7d53fc1a01a566a Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 28 Apr 2019 10:32:23 +0200 Subject: [PATCH 2/2] Undo Makefile changes Signed-off-by: Clifford Wolf --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3fd3aad..a005920 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,13 @@ -RISCV_PATH = /opt/riscv32i/bin RISCV_GNU_TOOLCHAIN_GIT_REVISION = 411d134 -RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX = $(RISCV_PATH) +RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX = /opt/riscv32 SHELL = bash TEST_OBJS = $(addsuffix .o,$(basename $(wildcard tests/*.S))) FIRMWARE_OBJS = firmware/start.o firmware/irq.o firmware/print.o firmware/sieve.o firmware/multest.o firmware/stats.o GCC_WARNS = -Werror -Wall -Wextra -Wshadow -Wundef -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings GCC_WARNS += -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes -pedantic # -Wconversion -TOOLCHAIN_PREFIX = $(RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX)/riscv32-unknown-elf- +TOOLCHAIN_PREFIX = $(RISCV_GNU_TOOLCHAIN_INSTALL_PREFIX)i/bin/riscv32-unknown-elf- COMPRESSED_ISA = C # Add things like "export http_proxy=... https_proxy=..." here