<p>laforge would like Hoernchen to <strong>review</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/simtrace2/+/23609">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">firmware: do not allow undefined symbols<br><br>For some reason undefined symbols were downgraded to warnings, which<br>means building a firmware that calls missing functions  (= address zero)<br>was perfectly fine, which of course made development more exciting....<br><br>This applies to builtins, too, printf of one char gets downgraded to<br>putchar, which we don't have, so disable builtins.<br><br>Change-Id: I492f41ad4162b9d07b1881ae4aed019db2dff8b5<br>---<br>M firmware/Makefile<br>M firmware/libboard/common/source/board_lowlevel.c<br>2 files changed, 7 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/09/23609/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/firmware/Makefile b/firmware/Makefile</span><br><span>index ccf5843..cc40673 100644</span><br><span>--- a/firmware/Makefile</span><br><span>+++ b/firmware/Makefile</span><br><span>@@ -164,14 +164,14 @@</span><br><span> # -mlong-calls  -Wall</span><br><span> #CFLAGS += -save-temps -fverbose-asm</span><br><span> #CFLAGS += -Wa,-a,-ad</span><br><span style="color: hsl(0, 100%, 40%);">-CFLAGS += -D__ARM</span><br><span style="color: hsl(120, 100%, 40%);">+CFLAGS += -D__ARM -fno-builtin</span><br><span> CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb # -mfix-cortex-m3-ldrd</span><br><span> CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -DTRACE_LEVEL=$(TRACE_LEVEL) -DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE)</span><br><span> CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"</span><br><span> CFLAGS += -DBOARD=\"$(BOARD)\" -DBOARD_$(BOARD)</span><br><span> CFLAGS += -DAPPLICATION=\"$(APP)\" -DAPPLICATION_$(APP)</span><br><span> ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D__ASSEMBLY__</span><br><span style="color: hsl(0, 100%, 40%);">-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)</span><br><span style="color: hsl(120, 100%, 40%);">+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)</span><br><span> #LD_OPTIONAL=-Wl,--print-gc-sections -Wl,--stats</span><br><span> </span><br><span> # Append BIN directories to output filename</span><br><span>diff --git a/firmware/libboard/common/source/board_lowlevel.c b/firmware/libboard/common/source/board_lowlevel.c</span><br><span>index b4d7d32..1ddbcba 100644</span><br><span>--- a/firmware/libboard/common/source/board_lowlevel.c</span><br><span>+++ b/firmware/libboard/common/source/board_lowlevel.c</span><br><span>@@ -218,3 +218,8 @@</span><br><span>         do {</span><br><span>         } while ((jiffies - jiffies_start) < msecs);</span><br><span> }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void abort() {</span><br><span style="color: hsl(120, 100%, 40%);">+        NVIC_SystemReset();</span><br><span style="color: hsl(120, 100%, 40%);">+   while(1) {};</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/simtrace2/+/23609">change 23609</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/simtrace2/+/23609"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: simtrace2 </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I492f41ad4162b9d07b1881ae4aed019db2dff8b5 </div>
<div style="display:none"> Gerrit-Change-Number: 23609 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>