<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 5: inline trace giving undefined reference for other than -Og</title><link href="https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/" rel="alternate"/><link href="https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/feed.atom" rel="self"/><id>https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/</id><updated>2014-03-31T20:10:44.547000Z</updated><subtitle>Recent changes to 5: inline trace giving undefined reference for other than -Og</subtitle><entry><title>#5 inline trace giving undefined reference for other than -Og</title><link href="https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/?limit=25#dc7e" rel="alternate"/><published>2014-03-31T20:10:44.547000Z</published><updated>2014-03-31T20:10:44.547000Z</updated><author><name>Liviu Ionescu (ilg)</name><uri>https://sourceforge.net/u/ilg-ul/</uri></author><id>https://sourceforge.netb566bc901b9e30d6ae58c8531283a9eea410fa5b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;summary&lt;/strong&gt;: inline trace giving undefiend reference at over than -Og --&amp;gt; inline trace giving undefined reference for other than -Og&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#5 inline trace giving undefiend reference at over than -Og</title><link href="https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/?limit=25#85e2" rel="alternate"/><published>2014-03-29T13:19:58.552000Z</published><updated>2014-03-29T13:19:58.552000Z</updated><author><name>Liviu Ionescu (ilg)</name><uri>https://sourceforge.net/u/ilg-ul/</uri></author><id>https://sourceforge.net0cc321cd535c68f035c41041b3b1c570597994e1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;it's one more arguments in favor of macro ;) &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;as any C++ programmer can tell, except for passing configuration values and conditional compiling, I prefer to avoid macros as much as possible.&lt;/p&gt;
&lt;p&gt;in case you did not notice, I'm slowly transitioning these templates to C++ (most source files are now shared from my other project µOS++, which is a C++ project).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#5 inline trace giving undefiend reference at over than -Og</title><link href="https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/?limit=25#4a9c" rel="alternate"/><published>2014-03-29T11:59:01.861000Z</published><updated>2014-03-29T11:59:01.861000Z</updated><author><name>Liviu Ionescu (ilg)</name><uri>https://sourceforge.net/u/ilg-ul/</uri></author><id>https://sourceforge.net96d1eaa9fc19ec0f3036dbdf5e9a03a4ea59f552</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; accepted&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</summary></entry><entry><title>#5 inline trace giving undefiend reference at over than -Og</title><link href="https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/?limit=25#7c3f" rel="alternate"/><published>2014-03-29T10:20:09.753000Z</published><updated>2014-03-29T10:20:09.753000Z</updated><author><name>diabolo38</name><uri>https://sourceforge.net/u/diabolo38/</uri></author><id>https://sourceforge.net5e6bbc84f2283ac4f00030fe16d278e654c3a194</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;wrong version (copied from older eclipse open) &lt;/p&gt;
&lt;p&gt;GNU ARM C/C++ Generic Cortex-M Project Template 1.1.1.201403281421&lt;br /&gt;
&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>inline trace giving undefiend reference at over than -Og</title><link href="https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/" rel="alternate"/><published>2014-03-29T10:13:52.274000Z</published><updated>2014-03-29T10:13:52.274000Z</updated><author><name>diabolo38</name><uri>https://sourceforge.net/u/diabolo38/</uri></author><id>https://sourceforge.net3fad8b8179edfa5f4d39a002233eaf022661b984</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;eclipse kepler 8.3 sr2&lt;br /&gt;
gcc Tools ARM Embedded 4.8 2013q4&lt;br /&gt;
GNU ARM Eclipse Plug-in. Version: 0.5.5.201310221100&lt;/p&gt;
&lt;p&gt;Starting from "free stranding" cortex m4 with initial trace selected &lt;br /&gt;
remove "TRACE" from project symbols &lt;br /&gt;
go into project properties build setting &lt;br /&gt;
Set optimization to O0  (same for over o1 o2 ...) &lt;br /&gt;
build &lt;br /&gt;
We get undefined reference to "empty body" in-lined trace function &lt;/p&gt;
&lt;p&gt;/../src/main.c:47: undefined reference to &lt;code&gt;trace_puts'
../src/main.c:51: undefined reference to&lt;/code&gt;trace_printf'&lt;br /&gt;
....&lt;/p&gt;
&lt;p&gt;i believe gcc doesn't always inline function even if declare/implemented  "inline" in an header.&lt;br /&gt;
I've been told and i'm always using "static" for such header function but can't remnember exactly why. It must somehow to prevent multiple definition when the "inline" function traces appear in several .o file (not the case with these gcc version)&lt;/p&gt;
&lt;p&gt;So a possible correction it to add static qualifier in header file &lt;/p&gt;
&lt;p&gt;static inline int&lt;br /&gt;
trace_puts(const char *s &lt;strong&gt;attribute&lt;/strong&gt;((unused)))&lt;br /&gt;
{&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;it's one more arguments in favor of macro ;) &lt;br /&gt;
attached modified trace.h with static&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>inline trace giving undefiend reference at over than -Og</title><link href="https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/" rel="alternate"/><published>2014-03-29T10:13:52.274000Z</published><updated>2014-03-29T10:13:52.274000Z</updated><author><name>diabolo38</name><uri>https://sourceforge.net/u/diabolo38/</uri></author><id>https://sourceforge.netc5aa21af8c9de3b37c6c19ffdd7817a0fef74864</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ticket 5 has been modified: inline trace giving undefiend reference at over than -Og&lt;br /&gt;
Edited By: Liviu Ionescu (ilg) (ilg-ul)&lt;br /&gt;
Status updated: u'open' =&amp;gt; u'accepted'&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>inline trace giving undefined reference for other than -Og</title><link href="https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/" rel="alternate"/><published>2014-03-29T10:13:52.274000Z</published><updated>2014-03-29T10:13:52.274000Z</updated><author><name>diabolo38</name><uri>https://sourceforge.net/u/diabolo38/</uri></author><id>https://sourceforge.net6431fae4e3a1fbf23a822b017319ed6d1ffeb797</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ticket 5 has been modified: inline trace giving undefined reference for other than -Og&lt;br /&gt;
Edited By: Liviu Ionescu (ilg) (ilg-ul)&lt;br /&gt;
Summary updated: u'inline trace giving undefiend reference at over than -Og' =&amp;gt; u'inline trace giving undefined reference for other than -Og'&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>