<?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>Link static library to Segger IDE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32434/link-static-library-to-segger-ide</link><description>Hello. I compiled with gcc a static library which consists nrf hardware drivers . Now other person from project want to use it in SEGGER IDE as it is now supported by nordic. Should there be any problem with that ? I know segger is using gcc underneath</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Mar 2018 08:00:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32434/link-static-library-to-segger-ide" /><item><title>RE: Link static library to Segger IDE</title><link>https://devzone.nordicsemi.com/thread/124912?ContentTypeID=1</link><pubDate>Mon, 19 Mar 2018 08:00:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c82214c-f85a-40de-bacf-d7efb8ad6370</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;d recommend that you use a flash_placement.xml file from a SDK example similar to yours. If you use BLE, use one of the ble_app_* example&amp;#39;s flash_placement.xml.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Is there anything else needed to get the library to be compiled with all project?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hard to say without having a build output, but generally; adding the library and the (optional) API includes to it should be fine.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;br /&gt;Can you please confirm that what I did, so compiling a static library under gcc with makefile rules taken from sdk and then using it in segger is fine?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, you can compile in GCC, and use this library in Segger Embedded Studio.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link static library to Segger IDE</title><link>https://devzone.nordicsemi.com/thread/124749?ContentTypeID=1</link><pubDate>Fri, 16 Mar 2018 11:48:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d5e5306-7d18-49f9-88b7-f47315d76195</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Thank you.&lt;br /&gt;&lt;br /&gt;For compiling library I used Makefile from sdk. I compiled all files to build sample app, then excluded main.o and build the library from other files. For my example I took a .ld file as is from a sdk examples and then added needed sections. My example is working when I compile with gcc using modified Makefile from SDK. Now I want to use this library in Segger IDE but I know I need to update linker script. Here I understand I need to either modify flash_placement.xml or try manual linker script option.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The library file was added like any .c file. Is there anything else needed to get the library to be compiled with all project? I will give you exact logs later but it was complaining about undefined reference to the API functions.&lt;br /&gt;&lt;br /&gt;Can you please confirm that what I did, so compiling a static library under gcc with makefile rules taken from sdk and then using it in segger is fine?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Link static library to Segger IDE</title><link>https://devzone.nordicsemi.com/thread/124738?ContentTypeID=1</link><pubDate>Fri, 16 Mar 2018 11:08:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af76bde3-ac21-4900-8ea5-ea0e8abd0ffe</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I compiled with gcc a static library which consists nrf hardware drivers . Now other person from project want to use it in SEGGER IDE as it is now supported by nordic. Should there be any problem with that ? I know segger is using gcc underneath so there souldnt be any problem right ?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;How did you add the library?&lt;/p&gt;
&lt;p&gt;You can add it directly to the project, like adding a .c file (this is done in the DFU project for SES in SDK v14.2), or you can do a &amp;quot;normal&amp;quot; gcc approach by adding a -L path to ld, and pass -lmylibrary to ld.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Also I reused linker script from SDK, how the segger user import that linker script into the project?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Did you reuse a flash_placement.xml file (which is converted to a .ld script under-the-hood) or did you explicitly re-use a .ld script?&lt;/p&gt;
&lt;p&gt;You can choose to either use a .xml parser for linking, or set a .ld script (I haven&amp;#39;t tested using a .ld script, so I guess you might run into other issues)&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-dec46997f6384d9dad3feaaf0050703f/pastedimage1521198389090v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;d recommend taking a flash_placement.xml from a similar style project to ensure that you get all user sections correct.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you post your build log?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>