<?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>Compile active file in VS Code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112249/compile-active-file-in-vs-code</link><description>Sometimes I just want to compile a single file for an nRF Connect project with VS Code and the nRF Connect extension. This sometimes fails because an include file isn&amp;#39;t found (for example &amp;lt;app_event_manager_priv.h&amp;gt; included from app_event_manager.h in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Jun 2024 13:22:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112249/compile-active-file-in-vs-code" /><item><title>RE: Compile active file in VS Code</title><link>https://devzone.nordicsemi.com/thread/490663?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2024 13:22:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:899ebf5f-aeb9-4563-8265-2507081dded0</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Ruben,&lt;br /&gt;&lt;br /&gt;There is no need to be sorry. Thank you for the update.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Compile active file in VS Code</title><link>https://devzone.nordicsemi.com/thread/490518?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2024 08:34:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ef8cc95-3158-40f6-b893-0f37c7e8abdc</guid><dc:creator>MaxRuben</dc:creator><description>&lt;p&gt;Ah, I see. The Compile Active File is provided by the CMake Tools extension which I thought was working well together with the nRF Connect extension. But after some googling and searching in the Nordic Dev Zone I see that these two extensions might not work very well together.&lt;/p&gt;
&lt;p&gt;This is probably why the &amp;#39;Compile Active File&amp;#39; action didn&amp;#39;t work at my end to begin with.&lt;/p&gt;
&lt;p&gt;When I disable the CMake Tools extension, &amp;#39;Compile Active File&amp;#39; is not available any more.&lt;/p&gt;
&lt;p&gt;This is probably also why &amp;#39;Compile Active File&amp;#39; isn&amp;#39;t working for me after some changes until I make a Pristine Build but then it really makes no sense to compile a single file anymore.&lt;/p&gt;
&lt;p&gt;As I said before, the original reason for me to want to compile just a single file was that for some simple errors or typos in the Zephyr macros, hundreds and hundreds of lines with warnings and errors is&amp;nbsp; produced in the terminal output and being able to compile one file at a time does sometimes help here.&lt;/p&gt;
&lt;p&gt;Sorry for wasting your (and my) time with this.&lt;/p&gt;
&lt;p&gt;Thanks /Ruben&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Compile active file in VS Code</title><link>https://devzone.nordicsemi.com/thread/490500?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2024 07:54:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f20211b9-5b2d-4cdb-a309-6968a9b887e7</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Ruben,&lt;br /&gt;&lt;br /&gt;I do not see this &amp;quot;Compile Active File&amp;quot; command. I do not have the tab for the file in the editor nor does this command appear when right-clicking on the active file. I have asked internally, and it seems that we do not have &amp;quot;Compile Active File&amp;quot; command. It might be that this command came with some other extension which you installed on your system.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Compile active file in VS Code</title><link>https://devzone.nordicsemi.com/thread/490213?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 09:51:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0733df01-a5c9-408f-a057-4f118d1c51d9</guid><dc:creator>MaxRuben</dc:creator><description>&lt;p&gt;No &amp;#39;Compile Active File&amp;#39;.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1719222374390v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;From the context menu when right clicking on the tab for the file in the editor or with the &amp;#39;Compile Active File&amp;#39; action button for&amp;nbsp;the active file in the editor.&lt;/p&gt;
&lt;p&gt;/Ruben&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Compile active file in VS Code</title><link>https://devzone.nordicsemi.com/thread/490206?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 09:37:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6f52547-1f3e-4caa-8a65-108d5faea870</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Ruben,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thank you for the update.&lt;br /&gt;&lt;br /&gt;Did you refer to &amp;quot;Run Active File&amp;quot; when you mentioned &amp;quot;Compile Active File&amp;quot;?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Compile active file in VS Code</title><link>https://devzone.nordicsemi.com/thread/490111?ContentTypeID=1</link><pubDate>Sun, 23 Jun 2024 10:45:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c430dbe5-23af-4e60-9a71-1f0db6d231cd</guid><dc:creator>MaxRuben</dc:creator><description>&lt;p&gt;Found the problem: Turns out I had missed setting CONFIG_APP_EVENT_MANAGER=y in a .conf file and after doing a pristine build it seems to work to also Compile Active File for files that include app_event_manager.h&lt;/p&gt;
&lt;p&gt;/Ruben&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Compile active file in VS Code</title><link>https://devzone.nordicsemi.com/thread/489931?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2024 11:08:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0422b8ff-be38-46b7-a890-ae09c5f82e13</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Ruben,&lt;/p&gt;
[quote user="MaxRuben"]It is not random but depending on the file being compiled. For any given file it always either succeeds or always fails. In my case it always fails if the file&amp;nbsp;&lt;span&gt;app_event_manager.h is included which leads to error: .../nrf/include/app_event_manager.h:27:10: fatal error: app_event_manager_priv.h: No such file or directory&lt;/span&gt;[/quote]
&lt;p&gt;Could you show how you do this? Some screenshots with descriptions of both working and non-working case could be useful.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Compile active file in VS Code</title><link>https://devzone.nordicsemi.com/thread/489627?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2024 06:18:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43c9e121-6d30-4f9c-b3c0-ef4e66d4a88e</guid><dc:creator>MaxRuben</dc:creator><description>[quote userid="111786" url="~/f/nordic-q-a/112249/compile-active-file-in-vs-code/489580"]Could you provide information why you want to compile single file? Is this single file already a part of existing NCS project?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I refactor a larger project containing many source files, and I haven&amp;#39;t built the whole project for a while, there could be a lot of output in the terminal during the build if something is wrong (especially for simple typos in the macros in zephyr, e.g. LOG_INF and others) it is nice to simply just compile the single file I am currently working on.&lt;/p&gt;
[quote userid="111786" url="~/f/nordic-q-a/112249/compile-active-file-in-vs-code/489580"]As it sometimes fails, I assume it sometimes succeeds. What do you do differently that could lead to these 2 completely different outcomes?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is not random but depending on the file being compiled. For any given file it always either succeeds or always fails. In my case it always fails if the file&amp;nbsp;&lt;span&gt;app_event_manager.h is included which leads to error: .../nrf/include/app_event_manager.h:27:10: fatal error: app_event_manager_priv.h: No such file or directory&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Which leads to my question:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote userid="124791" url="~/f/nordic-q-a/112249/compile-active-file-in-vs-code"]Which file or setting do I need to edit to add include paths for the &amp;#39;Compile Active File&amp;#39; function?[/quote]
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks /Ruben&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Compile active file in VS Code</title><link>https://devzone.nordicsemi.com/thread/489580?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2024 15:15:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29596679-a7e4-4bbd-9f77-316f20f0fec5</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Sometimes I just want to compile a single file for an nRF Connect project with VS Code and the nRF Connect extension.[/quote]
&lt;p&gt;Could you provide information why you want to compile single file? Is this single file already a part of existing NCS project?&lt;/p&gt;
[quote user=""]This sometimes fails because an include file isn&amp;#39;t found[/quote]
&lt;p&gt;As it sometimes fails, I assume it sometimes succeeds. What do you do differently that could lead to these 2 completely different outcomes?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>