<?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>Porting Keil project to SES</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43210/porting-keil-project-to-ses</link><description>Hi, 
 
 I have a pretty extensive nRF52832, SDK14.2, freertos project built and debugged using Keil MDK. 
 I&amp;#39;m trying to port this project to SES and experience some problems. 
 This is what I did - 
 
 I&amp;#39;ve used SES import wizard to import the Keil project</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Feb 2019 15:57:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43210/porting-keil-project-to-ses" /><item><title>RE: Porting Keil project to SES</title><link>https://devzone.nordicsemi.com/thread/169785?ContentTypeID=1</link><pubDate>Wed, 06 Feb 2019 15:57:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f31c350f-28f2-4124-891c-1244ef0ce2ce</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Sorry about the delay.&lt;/p&gt;
&lt;p&gt;Did you decide on using the SEGGER Linker?&lt;/p&gt;
&lt;p&gt;If so, there should be an example of how to acheive this in the link Johannes provided;&lt;br /&gt;&lt;a href="https://www.segger.com/products/development-tools/embedded-studio/technology/tools/segger-linker"&gt;https://www.segger.com/products/development-tools/embedded-studio/technology/tools/segger-linker&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Under;&lt;/p&gt;
&lt;h3&gt;4. Place Sections into Memory&lt;/h3&gt;
&lt;h3&gt;5. Put Everything Together&lt;/h3&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Porting Keil project to SES</title><link>https://devzone.nordicsemi.com/thread/168928?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 16:05:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:135746b7-d486-400d-ba9f-c57bc1e9f558</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;Thanks Joakim &amp;amp; Johannes for your super prompt answers.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve followed your instructions (was not sure about system_nrf52.c though)&lt;/p&gt;
[quote userid="18223" url="~/f/nordic-q-a/43210/porting-keil-project-to-ses/168919"]To use the SEGGER Linker in your project, keep your ses_nRF_startup.s and the ses_nRF52_vectors.s, remove the Cortex_M_Startup.s, keep SEGGER_THUMB_Startup.s and remove thumb_crt0.s[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now I see in project options&amp;gt;linker that the Segger linker is selected.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In my Keil project I&amp;#39;ve used a segment of uninitialized RAM to hold variable that should survive a reset (see screen cap in the original post).&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve followed &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/39290/ram-retention-between-system-resets-pragma-noinit-replacement"&gt;vidar&amp;#39;s guidelines&lt;/a&gt; and set the file&amp;#39;s properties and added the following statment in the code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static Scratchpad_t scratchpad  __attribute__((section(&amp;quot;NoInit&amp;quot;), zero_init));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How this should be handled in SES ?&lt;/p&gt;
&lt;p&gt;Should I manipulate the *.icf file ?&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2019_2D00_01_2D00_31-17_5F00_53_5F00_16_2D00_Window.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks again&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Porting Keil project to SES</title><link>https://devzone.nordicsemi.com/thread/168924?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 15:48:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41afdcf8-8312-4ed4-9244-4925fcb90e1b</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Thank you very much for the helpful answer!&lt;/p&gt;
&lt;p&gt;Hope that clears things up for eyalasko.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br /&gt;Joakim Jakobsen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Porting Keil project to SES</title><link>https://devzone.nordicsemi.com/thread/168919?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 15:23:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9aea3e89-c553-4483-99f5-1a2ef2f85f84</guid><dc:creator>SEGGER - Johannes</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;[quote userid="20690" url="~/f/nordic-q-a/43210/porting-keil-project-to-ses/168914"][/quote]&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t posted anything there myself, but you might need to create an account and wait for a SEGGER - Forum moderator to aprove the account before posting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You are right. Once you registered in our forum, your account needs to be activated by us. This is usually done within 24h.&lt;/p&gt;
[quote userid="27169" url="~/f/nordic-q-a/43210/porting-keil-project-to-ses"]The &amp;#39;Linker &amp;gt; Section placement file&amp;#39; option does not show in the imported project (it does show in the clean sample project)[/quote]
&lt;p&gt;Since V4.10 Embedded Studio uses the SEGGER Linker instead of the GNU Linker by default.&lt;br /&gt;You could get back to GNU Linker (and use the Section placement file etc.) by changing the Project Option Linker from &amp;quot;SEGGER&amp;quot; to &amp;quot;GNU&amp;quot;.&lt;/p&gt;
&lt;p&gt;But I would recommend to use the SEGGER Linker, especially when you have a more complex memory/placement layout.&lt;/p&gt;
&lt;p&gt;Some background on this:&lt;br /&gt;The GNU Linker has been designed for computer (Linux) applications and was then adopted for (bare metal) microcontroller applications.&lt;br /&gt;Because the memory layout and section placements on a microcontroller are more complex then on a PC, GNU Linker Scripts are usually long, complex, and not easily understood. You usually copy and paste from existing linker scripts.&lt;br /&gt;To make creation of GNU Linker Scripts simpler, Embedded Studio uses the Memory Map and Section Placement files and creates the linker scripts based on this for you.&lt;br /&gt;Recently SEGGER released its own, new Linker, which has been developed for embedded development, with all specialties of microcontrollers in mind.&lt;br /&gt;With the SEGGER Linker you can now easily write a linker script with a few lines.&lt;br /&gt;For more information and examples, have a look at &lt;a href="https://www.segger.com/products/development-tools/embedded-studio/technology/tools/segger-linker"&gt;https://www.segger.com/products/development-tools/embedded-studio/technology/tools/segger-linker&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To use the SEGGER Linker in your project, keep your ses_nRF_startup.s and the ses_nRF52_vectors.s, remove the Cortex_M_Startup.s, keep SEGGER_THUMB_Startup.s and remove thumb_crt0.s&lt;/p&gt;
&lt;p&gt;Now you should be ready to develop your project with Embedded Studio.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Johannes - SEGGER&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Porting Keil project to SES</title><link>https://devzone.nordicsemi.com/thread/168914?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 15:00:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eccf2065-5877-4cf3-94d4-595221e5f070</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;EDIT:&lt;/p&gt;
&lt;p&gt;Please see the answer from SEGGER - Johannes below.&lt;/p&gt;
&lt;p&gt;___________________________________________________________&lt;/p&gt;
&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;The first steps seem correct.&lt;/p&gt;
[quote user=""]The &amp;#39;Linker &amp;gt; Section placement file&amp;#39; option does not show in the imported project (it does show in the clean sample project)[/quote]
&lt;p&gt;&amp;nbsp;This one however, is strange. I&amp;#39;ve ported&amp;nbsp; a few projects from KEIL to SES, but I haven&amp;#39;t experienced that the options does not appear at all.&lt;/p&gt;
&lt;p&gt;You could try to manually add them to your project file;&lt;/p&gt;
&lt;p&gt;1. Open your solution in the editor: &lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-d481392c748f4011af302a63f410c7d4/linker1.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;2. Add the required data in the editor; &lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-d481392c748f4011af302a63f410c7d4/linker2.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Last, but not least, I&amp;#39;ve tried to post this thread into Segger&amp;#39;s SES forum however I can&amp;#39;t find a &amp;#39;new post&amp;#39; link/button.[/quote]
&lt;p&gt;I haven&amp;#39;t posted anything there myself, but you might need to create an account and wait for a SEGGER - Forum moderator to aprove the account before posting.&amp;nbsp;&lt;br /&gt;Maybe&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/segger-_2d00_-johannes"&gt;SEGGER - Johannes&lt;/a&gt;&amp;nbsp;can comment on this?&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>