This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orgHello Hoernchen,
I'd like you to do a code review. Please visit
https://gerrit.osmocom.org/c/simtrace2/+/23609
to review the following change.
Change subject: firmware: do not allow undefined symbols
......................................................................
firmware: do not allow undefined symbols
For some reason undefined symbols were downgraded to warnings, which
means building a firmware that calls missing functions (= address zero)
was perfectly fine, which of course made development more exciting....
This applies to builtins, too, printf of one char gets downgraded to
putchar, which we don't have, so disable builtins.
Change-Id: I492f41ad4162b9d07b1881ae4aed019db2dff8b5
---
M firmware/Makefile
M firmware/libboard/common/source/board_lowlevel.c
2 files changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/09/23609/1
diff --git a/firmware/Makefile b/firmware/Makefile
index ccf5843..cc40673 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -164,14 +164,14 @@
# -mlong-calls -Wall
#CFLAGS += -save-temps -fverbose-asm
#CFLAGS += -Wa,-a,-ad
-CFLAGS += -D__ARM
+CFLAGS += -D__ARM -fno-builtin
CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb # -mfix-cortex-m3-ldrd
CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL) -DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE)
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
CFLAGS += -DBOARD=\"$(BOARD)\" -DBOARD_$(BOARD)
CFLAGS += -DAPPLICATION=\"$(APP)\" -DAPPLICATION_$(APP)
ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__
-LDFLAGS = -mcpu=cortex-m3 -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=ResetException -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--print-memory-usage $(LIB)
+LDFLAGS = -mcpu=cortex-m3 -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=ResetException -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--print-memory-usage -Wl,--no-undefined $(LIB)
#LD_OPTIONAL=-Wl,--print-gc-sections -Wl,--stats
# Append BIN directories to output filename
diff --git a/firmware/libboard/common/source/board_lowlevel.c b/firmware/libboard/common/source/board_lowlevel.c
index b4d7d32..1ddbcba 100644
--- a/firmware/libboard/common/source/board_lowlevel.c
+++ b/firmware/libboard/common/source/board_lowlevel.c
@@ -218,3 +218,8 @@
do {
} while ((jiffies - jiffies_start) < msecs);
}
+
+void abort() {
+ NVIC_SystemReset();
+ while(1) {};
+}
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/23609
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I492f41ad4162b9d07b1881ae4aed019db2dff8b5
Gerrit-Change-Number: 23609
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210404/4d7189d5/attachment.htm>