<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 5: inline trace giving undefined reference for other than -Og</title><link>https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/</link><description>Recent changes to 5: inline trace giving undefined reference for other than -Og</description><atom:link href="https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 31 Mar 2014 20:10:44 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/feed.rss" rel="self" type="application/rss+xml"/><item><title>#5 inline trace giving undefined reference for other than -Og</title><link>https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/?limit=25#dc7e</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Liviu Ionescu (ilg)</dc:creator><pubDate>Mon, 31 Mar 2014 20:10:44 -0000</pubDate><guid>https://sourceforge.netb566bc901b9e30d6ae58c8531283a9eea410fa5b</guid></item><item><title>#5 inline trace giving undefiend reference at over than -Og</title><link>https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/?limit=25#85e2</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Liviu Ionescu (ilg)</dc:creator><pubDate>Sat, 29 Mar 2014 13:19:58 -0000</pubDate><guid>https://sourceforge.net0cc321cd535c68f035c41041b3b1c570597994e1</guid></item><item><title>#5 inline trace giving undefiend reference at over than -Og</title><link>https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/?limit=25#4a9c</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Liviu Ionescu (ilg)</dc:creator><pubDate>Sat, 29 Mar 2014 11:59:01 -0000</pubDate><guid>https://sourceforge.net96d1eaa9fc19ec0f3036dbdf5e9a03a4ea59f552</guid></item><item><title>#5 inline trace giving undefiend reference at over than -Og</title><link>https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/?limit=25#7c3f</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">diabolo38</dc:creator><pubDate>Sat, 29 Mar 2014 10:20:09 -0000</pubDate><guid>https://sourceforge.net5e6bbc84f2283ac4f00030fe16d278e654c3a194</guid></item><item><title>inline trace giving undefiend reference at over than -Og</title><link>https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">diabolo38</dc:creator><pubDate>Sat, 29 Mar 2014 10:13:52 -0000</pubDate><guid>https://sourceforge.net3fad8b8179edfa5f4d39a002233eaf022661b984</guid></item><item><title>inline trace giving undefiend reference at over than -Og</title><link>https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">diabolo38</dc:creator><pubDate>Sat, 29 Mar 2014 10:13:52 -0000</pubDate><guid>https://sourceforge.netc5aa21af8c9de3b37c6c19ffdd7817a0fef74864</guid></item><item><title>inline trace giving undefined reference for other than -Og</title><link>https://sourceforge.net/p/gnuarmeclipse/beta-versions/5/</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">diabolo38</dc:creator><pubDate>Sat, 29 Mar 2014 10:13:52 -0000</pubDate><guid>https://sourceforge.net6431fae4e3a1fbf23a822b017319ed6d1ffeb797</guid></item></channel></rss>