[sw] update makefiles

This commit is contained in:
stnolting 2022-08-20 17:36:17 +02:00
parent c76f98f296
commit 2bec76e0dc
3 changed files with 4 additions and 10 deletions

View file

@ -125,7 +125,7 @@ IMAGE_GEN = $(NEORV32_EXG_PATH)/image_gen
# Compiler & linker flags
CC_OPTS = -march=$(MARCH) -mabi=$(MABI) $(EFFORT) -Wall -ffunction-sections -fdata-sections -nostartfiles -mno-fdiv
CC_OPTS += -Wl,--gc-sections -lm -lc -lgcc -lc
CC_OPTS += -Wl,--gc-sections -lm -lc -lgcc -lc -Wl,--no-warn-rwx-segments
CC_OPTS += $(USER_FLAGS)

View file

@ -49,9 +49,6 @@ ASM_INC ?= -I .
# Optimization
EFFORT ?= -Os
# Compiler toolchain
RISCV_PREFIX ?= riscv32-unknown-elf-
# CPU architecture and ABI
MARCH ?= rv32i
MABI ?= ilp32
@ -61,7 +58,6 @@ USER_FLAGS ?=
# *****************************************************************************
# -----------------------------------------------------------------------------
# FreeRTOS
# -----------------------------------------------------------------------------

View file

@ -7,7 +7,7 @@
# ********************************************************************************************* #
# BSD 3-Clause License #
# #
# Copyright (c) 2021, Stephan Nolting. All rights reserved. #
# Copyright (c) 2022, Stephan Nolting. All rights reserved. #
# #
# Redistribution and use in source and binary forms, with or without modification, are #
# permitted provided that the following conditions are met: #
@ -111,16 +111,14 @@ OBJCOPY = $(RISCV_PREFIX)objcopy
SIZE = $(RISCV_PREFIX)size
# Host native compiler
CC_X86 = g++ -Wall -O -g
CC_X86 = gcc -Wall -O -g
# NEORV32 executable image generator
IMAGE_GEN = $(NEORV32_EXG_PATH)/image_gen
# Compiler & linker flags
CC_OPTS = -march=$(MARCH) -mabi=$(MABI) $(EFFORT) -Wall -ffunction-sections -fdata-sections -nostartfiles -mno-fdiv
CC_OPTS += -Wl,--gc-sections -lm -lc -lgcc -lc
# This accelerates instruction fetch after branches when C extension is enabled (irrelevant when C extension is disabled)
CC_OPTS += -falign-functions=4 -falign-labels=4 -falign-loops=4 -falign-jumps=4
CC_OPTS += -Wl,--gc-sections -lm -lc -lgcc -lc -Wl,--no-warn-rwx-segments
CC_OPTS += $(USER_FLAGS)