<?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>Generate emProject from commandline</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76470/generate-emproject-from-commandline</link><description>Dear Support 
 I&amp;#39;m new on ncs. 
 Now I&amp;#39;ve read nrf-connect-sdk-tutorial and I can build a project with SES. 
 I want to automate the build, 
 So I test 
 west build -b nrf9160dk_nrf9160ns -d dstpath srcpath 
 This build my project but there is no *.emProject</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Jun 2021 14:28:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76470/generate-emproject-from-commandline" /><item><title>RE: Generate emProject from commandline</title><link>https://devzone.nordicsemi.com/thread/316100?ContentTypeID=1</link><pubDate>Fri, 18 Jun 2021 14:28:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d5a2fee-9811-4817-a110-fa6ff3791ba2</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;After adding the file to CMakeLists.txt it should be enough to reopen the project or rerun CMake in some way for the changes to take effect. You can do this in multiple ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Open the project again using &amp;quot;Open nRF Connect SDK Project&amp;quot;&lt;/li&gt;
&lt;li&gt;Reload the project with Project -&amp;gt; Reload &amp;lt;project_name&amp;gt;&lt;/li&gt;
&lt;li&gt;Re-run CMake with Project -&amp;gt; Run CMake&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is because changes made to files that are used to generate the project does not take effect unless you run CMake, such as CMakeLists.txt and prj.conf. There is no other way of automating this process, as SES does not run CMake when it builds the project, only when it creates, opens or reloads the project. The only other option is to use&amp;nbsp;another&amp;nbsp;code editor to view, create and edit files, for example&amp;nbsp;Visual Studio Code, and then use west to build on the command line, since the command &lt;em&gt;west build&lt;/em&gt; both runs CMake and builds the project.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generate emProject from commandline</title><link>https://devzone.nordicsemi.com/thread/316090?ContentTypeID=1</link><pubDate>Fri, 18 Jun 2021 13:31:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67040f39-6169-4df7-9c2e-044f55ac36f1</guid><dc:creator>Canastra</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This sound very complicated.&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t reverse engineer nRF5 SDK for Mesh.&lt;/p&gt;
&lt;p&gt;I would like to use SES to create and edit new files.&lt;/p&gt;
&lt;p&gt;The only way I found to add a new file to the project tree is to&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;edit&amp;nbsp;CMakeLists.txt&lt;/li&gt;
&lt;li&gt;close SES&lt;/li&gt;
&lt;li&gt;delete the build folder&lt;/li&gt;
&lt;li&gt;open SES&lt;/li&gt;
&lt;li&gt;run&amp;nbsp;&amp;quot;Open nRF Connect SDK Project&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This takes a lot of time to add one source file.&lt;/p&gt;
&lt;p&gt;It would be simpler when this can be done with a&amp;nbsp;script.&lt;/p&gt;
&lt;p&gt;Do you know a simpler way?&lt;/p&gt;
&lt;p&gt;Reto&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generate emProject from commandline</title><link>https://devzone.nordicsemi.com/thread/316081?ContentTypeID=1</link><pubDate>Fri, 18 Jun 2021 13:09:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cde9c7d7-2cdd-4f91-b0ec-eb09825967fb</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;West does not create a SES project. To do so, you must open SES and use &amp;quot;Open nRF Connect SDK Project&amp;quot;.&lt;/p&gt;
&lt;p&gt;If you want to build on command line with west, and the only reason you want SES is for debugging, I would recommend instead using Segger Ozone for debugging. A nice feature in Ozone is that it makes thread aware debugging possible. You can find the NCS documentation for Ozone&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/tools/nordic_segger.html#segger-ozone"&gt;here&lt;/a&gt;, and if you are interested, you can check out our guide for&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/thread-aware-debugging-with-nrf-connect-sdk"&gt;Thread aware debugging with nRF Connect SDK&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It might be possible to add something to CMake to create a SES project, but it is not something that has been done in NCS before, and there is no simple way to do this. Something similar has been made in the nRF5 SDK for Mesh, but the build process for nRF5 SDK and NCS are very different. They also use different editions of SES, with nRF5 SDK using the general SEGGER Embedded Studio for ARM microcontrollers, and NCS using a specific Nordic Edition. If you still want to try and create something like this, you can take a look at how it is done in nRF5 SDK for Mesh, but be aware that this will not work in NCS. In the SDK root folder you can find the folder &amp;quot;CMake&amp;quot;, which has the file&amp;nbsp;GenerateSESProject.cmake and a folder called SES with files related to this. It would also be a good idea to read about the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/zephyr/guides/build/index.html#build-overview"&gt;build process in Zephyr&lt;/a&gt;, especially the configuration phase, as this is done by SES when you open/create a NCS project using &amp;quot;Open nRF Connect SDK Project&amp;quot;. You can see this by looking at the output in SES (with Transcript and Output selected in the output terminal) after you have opened a project, for example &amp;quot;Found devicetree overlay&amp;quot;, &amp;quot;Generated zephyr.dts&amp;quot;, etc.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>