<?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 - Makefile alternatives (GIT into a code integration)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36692/segger-embedded-studio---makefile-alternatives-git-into-a-code-integration</link><description>Hello community and Nordic support. 
 Very briefly about my profile: I have worked with NRF52 chips in my previous company for about half a year and have a good understanding and practical experience with the ICs and SeS. 
 The ultimate goal I try to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Jul 2018 09:21:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36692/segger-embedded-studio---makefile-alternatives-git-into-a-code-integration" /><item><title>RE: Segger Embedded Studio - Makefile alternatives (GIT into a code integration)</title><link>https://devzone.nordicsemi.com/thread/141290?ContentTypeID=1</link><pubDate>Wed, 25 Jul 2018 09:21:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec7d406b-00a9-46e2-ada3-584583b58828</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;I&amp;#39;m glad you were able to solve it. &lt;/p&gt;
&lt;p&gt;And thanks to XavierYin for the valuable answer!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio - Makefile alternatives (GIT into a code integration)</title><link>https://devzone.nordicsemi.com/thread/141286?ContentTypeID=1</link><pubDate>Wed, 25 Jul 2018 09:11:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf13e3e9-de23-455c-a06d-1f7951f1a488</guid><dc:creator>krzy_pawel</dc:creator><description>&lt;p&gt;The solution is working!&lt;/p&gt;
&lt;p&gt;Here is a link in case anyone would like to use this feature in project (easy to extract needed changes form commit history):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://gitlab.com/Krzyzanowski_Pawel/GIT_dependent_welcome_header"&gt;https://gitlab.com/Krzyzanowski_Pawel/GIT_dependent_welcome_header&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio - Makefile alternatives (GIT into a code integration)</title><link>https://devzone.nordicsemi.com/thread/140923?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 07:45:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3176b76-1722-47ce-9fd8-b1af76048e08</guid><dc:creator>krzy_pawel</dc:creator><description>&lt;p&gt;Thanks for a replay!&lt;/p&gt;
&lt;p&gt;It looks like the one I was looking for. It is exactly my 2nd thought about the usage of Pre-Build. I will try this today/tommorow and post a result. I just can&amp;#39;t execute simple command through this parameter (e.g I tried echo)&lt;/p&gt;
&lt;p&gt;As long as I can run some program (I don&amp;#39;t care if it is python/shell/bat) BEFORE build, I can easy acheive what I was looking for.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Paweł Krzyżanowski&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio - Makefile alternatives (GIT into a code integration)</title><link>https://devzone.nordicsemi.com/thread/140919?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 07:15:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57346ea4-333d-43d7-95a7-d5754fc51965</guid><dc:creator>XavierYin</dc:creator><description>&lt;p&gt;My method is not very native Segger Embedded Studio, but this is what I&amp;#39;m doing with SES.&lt;br /&gt;The idea is trigger a pre-build&amp;nbsp;script and do things&amp;nbsp;there&lt;/p&gt;
&lt;p&gt;In .emProject file (project common configuration):&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;pre class="ui-code" data-mode="xml"&gt;    pre_build_command=&amp;quot; python pre_build.py $(ProjectDir)&amp;quot;
    pre_build_command_wd=&amp;quot;&amp;lt;path to the working directory you want when executing the above command&amp;gt;&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Get git information in pre_build.py:&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;pre class="ui-code" data-mode="python"&gt;# input command: what we type in command line
def exec_cmd(command):
    cmd_list = command.split(&amp;#39; &amp;#39;)
    return subprocess.check_output(cmd_list, shell=False)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Haven&amp;#39;t tested your command lines, but&amp;nbsp;&amp;quot;git status -s | while read mode file; do echo $(stat -f &amp;quot;%m&amp;quot; $file) $mode $file; done | sort&amp;quot; works on my machine.&amp;nbsp;Further putting those information in to a C header should be straight forward.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>