<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30493/segger-embedded-studio-link-errors---undefined-references</link><description>First - thanks to those who answered my question about the Segger Embedded Studio code size limit. It appears to have be fixed when I switch the build configuration from &amp;quot;Internal and External&amp;quot; to just &amp;quot;Internal&amp;quot;. 
 This question may relate to the SDK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 23 Feb 2018 00:58:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30493/segger-embedded-studio-link-errors---undefined-references" /><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/121743?ContentTypeID=1</link><pubDate>Fri, 23 Feb 2018 00:58:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cc2eebc-4b65-4d50-b2e8-d3d0c623e17a</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Pleased you got it going. There are a few things in SES you &amp;lsquo;just have to know&amp;rsquo; and the flash settings stuff is rarely needed so rarely do you have to go there.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s worth looking at the project files, they are just XML anyway, they are sometimes easier to read than the GUI if you&amp;rsquo;re looking for stuff and you can edit them too, I often start projects that way.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/121741?ContentTypeID=1</link><pubDate>Thu, 22 Feb 2018 21:29:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2b728f7-9ed7-474e-8907-b162489b7545</guid><dc:creator>Mike Marks</dc:creator><description>&lt;p&gt;RK Thanks much for the help - I now have a build that links without errors. My confusion was coming from two places. &amp;nbsp;First, the flash_placement.xml I had copied to the code directory was not being used. &amp;nbsp;The Project-&amp;gt;Options-&amp;gt;Linker-&amp;gt; Section Placement File was actually pointing to a directory a couple layers down in my project source rather than where I might have expected. &amp;nbsp;Modifying that xml file with the two &amp;lt;Program Section...&amp;gt; lines in my post three above this one eliminated the four linker errors. &amp;nbsp;I can now happily build in Segger above the 32K IAR Kickstarter limit, which was my main motivation for evaluating&amp;nbsp;this tool.&lt;/p&gt;
&lt;p&gt;A second confusion source that held me up longer that I would have liked is that the Project-&amp;gt;Options-&amp;gt;Section Placement File indicated actually changes once the Import is done. &amp;nbsp;The imported file line was showing a file named &amp;quot;section_placement.xml&amp;quot;, and when I couldn&amp;#39;t find a file by that name I got further confused.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/121589?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2018 22:43:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:486ec7a0-0620-4322-a280-985636e71aca</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;The one being used should be in the sidebar somewhere in all the project settings. Usually it starts as the &amp;#39;generic&amp;#39; one and you can right click to import it locally into your project where it copies it and sets it as the one it&amp;#39;s going to use, you can then edit it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you head far enough into the actual build transcript you should find the command which uses the flash placement and other files to generate the linker file. Then you can see what it&amp;#39;s actually using.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/121587?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2018 21:45:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:681ebff0-e2f8-46cf-914c-d81e50b001c3</guid><dc:creator>Mike Marks</dc:creator><description>&lt;p&gt;I just tried renaming the flash_placement.xml in my project directory to &amp;quot;Old_flash_placement.xml&amp;quot;, expecting this to cause some sort of error such as &amp;quot;Can&amp;#39;t find flash placement file&amp;quot;. &amp;nbsp;I did not get any such error, but instead the link proceeds until the same four undefined reference errors from my initial post show up. &amp;nbsp;Does that imply that the flash_placement.xml file in my project directory is not getting used?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;At the risk of asking too many question, I am I correct in assuming that $(StudioDir) is the install directory for the Segger Embedded Studio and $(ProjectDir) is the directory where m y project source files live?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/121450?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2018 22:25:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86421b83-e581-4c57-bd81-ce7ee171469b</guid><dc:creator>Mike Marks</dc:creator><description>&lt;p&gt;RK - thanks for the help and referral to the previous email thread, which I have followed. &amp;nbsp;My question now is: There appears to be a flash_placement.xml which I believe I copied over from the Segger studio directory &amp;lt;targets/? and have modified slight to try and add the non-linking segments. &amp;nbsp;Per the email thread you mentioned above, I tried adding two lines&amp;nbsp;that I thought would apply to the linker undefined references for &amp;quot;_start_sdh_req_observers&amp;quot;,&amp;nbsp;&lt;span&gt;&amp;quot;_stop_sdh_req_observers&amp;quot;,&amp;nbsp;&amp;quot;_start_sdh_state_observers&amp;quot;, and&amp;nbsp;&amp;quot;_stop_sdh_state_observers&amp;quot;, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.sdh_req_observers&amp;quot; address_symbol=&amp;quot;__start_sdh_req_observers&amp;quot; end_symbol=&amp;quot;__stop_sdh_req_observers&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.sdh_state_observers&amp;quot; address_symbol=&amp;quot;__start_sdh_state_observers&amp;quot; end_symbol=&amp;quot;__stop_sdh_state_observers&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;This did not cause the link errors to go away as I had hoped. &amp;nbsp;As a sanity check, to see if lines added to my flash_placement.xml would have any effect at all, I put in the intentionally wrong line &amp;quot;&amp;lt;Intentional error here&amp;gt;&amp;quot; to see if I would get an error from it and did not, making me question if the linker placement file is getting used.&lt;/p&gt;
&lt;p&gt;In the Project-&amp;gt;Options I see a reference to a section placement file ($StudiuoDir)/targets/section_placement.xml), however when I search my Segger embedded studio file, I can&amp;#39;t find it. &amp;nbsp;Is that file used or needed? &amp;nbsp;I feel like I&amp;#39;m close, but still missing something to get this project to link.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/121142?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 23:17:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c969d22-9288-4f91-b72b-3f1a7074363d</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;This&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/12029/segger-embedded-studio---unplaced_sections-problem"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/12029/segger-embedded-studio---unplaced_sections-problem&lt;/a&gt;&amp;nbsp;is basically the canonical mail thread about fixing this, bringing flash_placement.xml into your project (ie copy it) and then modify to add the correct entries. Then also modify the assembler to do the copies.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I wish Nordic hadn&amp;#39;t used the very IAR/Keil specific way of magically creating sections, but they did, and it means a ton of work for people not using them.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/121136?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 21:50:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b39f8a65-1f76-4006-9b4c-f289162cc302</guid><dc:creator>Mike Marks</dc:creator><description>&lt;p&gt;Would adding sections using Project Edit Option -&amp;gt; Linker -&amp;gt; Section Placement Segments have the same effect as modifying the XML file you mentioned? &amp;nbsp;Something tells me the issue involves the SDK, but only because the symbols that aren&amp;#39;t getting seen at the link are of the format &amp;quot;sdh_..._observers&amp;quot;. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I did try adding one segment to the Section Placements Segments hoping it would at least eliminate the first of the link errors I listed, but it did not. &amp;nbsp; Thanks for the help; I feel like I&amp;#39;m beating my head up on this and it&amp;#39;s taking way longer than it should to port a project that compiles successfully on IAR to SES. &amp;nbsp;Maybe I&amp;#39;m not finding the correct posts if this problem has occurred before.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/121103?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 14:48:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f0aacb5-8464-4381-ae92-ab50f60f555a</guid><dc:creator>Mike Marks</dc:creator><description>&lt;p&gt;When I search the project directory, I find several instances of Makefile, as well as makefiles with the extension .common, .posix, and .windows. &amp;nbsp;I assume the relevant makefiles when I use the internal build configuration are those in the /components/toolchain/gcc directory.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The issue I&amp;#39;m having is probably related to section variables. &amp;nbsp;In the Nordic-supplied source file, I notice the following lines:&lt;/p&gt;
&lt;p&gt;// Create section &amp;quot;sdh_req_observers&amp;quot;.&lt;br /&gt;NRF_SECTION_SET_DEF(sdh_req_observers, nrf_sdh_req_observer_t, NRF_SDH_REQ_OBSERVER_PRIO_LEVELS);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This somehow creates a section sdh_req_observers, which does indeed show up in the map file after building externally with the IAR. &amp;nbsp;When I try building internally, the link errors listed in my initial question above show up, and I assume that no map file gets created because these&amp;nbsp;are linker errors and the linker therefore never completes successfully.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/121085?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 13:46:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8eb6d14b-ddb8-47aa-b4c4-9adcb3db97de</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;I do not quite understand what you mean by &amp;quot;which project file is the makefile?&amp;quot; Often makefiles are used for the GCC toolchain, but instead SES has its own project file (ending in .emProject) which is really an xml file containing include paths, files, defines, options, etc.&lt;/p&gt;
&lt;p&gt;For makefiles it is not uncommon that one Makefile includes another (or even several other) Makefiles.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/121017?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 20:04:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dea01d7-9af7-4a3d-b152-9382e06f7781</guid><dc:creator>Mike Marks</dc:creator><description>&lt;p&gt;I think your suggestion to look at section variables is going to lead me to the fix. &amp;nbsp;I have not gotten a compile yet, but I do notice that&amp;nbsp;sdh_req_observers (one of the undefined reference errors) is in a section called sdh_req_observers that is created using the NRF_SECTION_SET_DEF call in nrf_sdh.c. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;On more basic level for someone new to the Segger Embedded Studio, which project file is the makefile? &amp;nbsp;When I browse the project directory, there are numerous files with the name Makefile.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/120904?ContentTypeID=1</link><pubDate>Wed, 14 Feb 2018 21:19:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a78fba0-9dc6-4d52-aff4-c74a2e7effe0</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;put &amp;quot;section variables segger embedded&amp;quot; into the search box and that will give you a mixed bag of posts, some of which explain how section variables work and how you need to add extra sections to the linker script and load code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regrettably section variables are one of those things which IAR&amp;#39;s auto-section-creation makes work out of the box so someone used them a couple of years ago. They are a pain however under gcc and other non IAR&amp;nbsp; toolchains which require them added to the ld script (for gcc) or the xml file which generates the ld script for SES/crossworks and also, since they have defined initial values, a chunk of code to the loader stub to populate them.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t seen nor thought up a better solution to this for SES.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/120900?ContentTypeID=1</link><pubDate>Wed, 14 Feb 2018 18:23:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b6b5736-2494-460f-8e51-70238830cc4a</guid><dc:creator>Mike Marks</dc:creator><description>&lt;p&gt;Thanks for the reply. &amp;nbsp;I tried to use the build menu and select Clean for both this project name and then Solution (which appears to be there for all projects) and rebuilt. &amp;nbsp;The same four undefined references show up at the link step.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio Link Errors - Undefined References</title><link>https://devzone.nordicsemi.com/thread/120898?ContentTypeID=1</link><pubDate>Wed, 14 Feb 2018 18:02:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f2fbc31-ca31-47bf-8776-f7e7ea4c7072</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am not that familiar with porting projects from IAR to SES, but may it be that you still have old object files laying around so now you try to link object files from IAR with object files from SES?&lt;/p&gt;
&lt;p&gt;If so, cleaning the solution should get rid of the old object files so that you can do a clean build using the SES toolchain.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>