<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MCUXpresso for VSCodeのトピックRe: Import a Zephyr project</title>
    <link>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Import-a-Zephyr-project/m-p/1746094#M90</link>
    <description>&lt;P&gt;To reply on myself, it turns out that you need the&amp;nbsp;mcuxpresso-tools.json file inside the .vscode directory; I'll keep this post up to date to see what all is required inside it to make it work&lt;/P&gt;</description>
    <pubDate>Wed, 25 Oct 2023 16:17:58 GMT</pubDate>
    <dc:creator>nskartoredjo</dc:creator>
    <dc:date>2023-10-25T16:17:58Z</dc:date>
    <item>
      <title>Import a Zephyr project</title>
      <link>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Import-a-Zephyr-project/m-p/1746041#M89</link>
      <description>&lt;P&gt;I've created a Zephyr project similar in structure as in the &lt;A href="https://github.com/zephyrproject-rtos/example-application" target="_self"&gt;example&lt;/A&gt; provided by Zephyr. I've been able to successfully import it on one of my machines using the MCUXpresso extension, however I wasn't able to do the same on another machine. If I attempt to import the project, it will provide me with the error message:&amp;nbsp;&lt;EM&gt;Error: Selected file or folder is not a valid MCUXpresso project&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;My question is, how can I import the project on the other machine? Consequentially, I would like to know what the extension searches for to determine whether a project is a Zephyr project or not.&lt;/P&gt;&lt;P&gt;Below is an example of how I expect it to work:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/246733iFED08F7656E4C681/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And below her is how I don't expect it to work:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nskartoredjo_0-1698249086013.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/246734iC651DFD632C5FA77/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nskartoredjo_0-1698249086013.png" alt="nskartoredjo_0-1698249086013.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 15:53:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Import-a-Zephyr-project/m-p/1746041#M89</guid>
      <dc:creator>nskartoredjo</dc:creator>
      <dc:date>2023-10-25T15:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Import a Zephyr project</title>
      <link>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Import-a-Zephyr-project/m-p/1746094#M90</link>
      <description>&lt;P&gt;To reply on myself, it turns out that you need the&amp;nbsp;mcuxpresso-tools.json file inside the .vscode directory; I'll keep this post up to date to see what all is required inside it to make it work&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 16:17:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Import-a-Zephyr-project/m-p/1746094#M90</guid>
      <dc:creator>nskartoredjo</dc:creator>
      <dc:date>2023-10-25T16:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Import a Zephyr project</title>
      <link>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Import-a-Zephyr-project/m-p/1747136#M91</link>
      <description>&lt;P&gt;If you want your project to be recognised as a Zephyr project, you need at least the following files inside the &lt;FONT face="andale mono,times"&gt;.vscode&lt;/FONT&gt; directory:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="andale mono,times"&gt;cmake-kits.json&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="andale mono,times"&gt;cmake-variants.json&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="andale mono,times"&gt;mcuxpresso-tools.json&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="andale mono,times"&gt;launch.json&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;For some operations, the extension expects one of these files to exists, and tries to change them according to the changes you make through the extension. If the file doesn't exist, it will complain. To generate those files, you can use the &lt;EM&gt;Import Example from Repository&lt;/EM&gt; feature, and use the workspace application type. From the newly generated project, copy the &lt;FONT face="andale mono,times"&gt;.vscode&lt;/FONT&gt; directory to your own project.&lt;/P&gt;&lt;P&gt;The downside is that some fields inside these config files are personalised per machine. For example, the &lt;FONT face="andale mono,times"&gt;toolchainPath&lt;/FONT&gt; will be equal to something like&lt;FONT face="andale mono,times"&gt; X&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT face="andale mono,times"&gt;:/Users/your-name/zephyr-sdk-0.XX.X/arm-zephyr-eabi&lt;/FONT&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Luckily, these fields only need to exist to a certain extend. If you use the &lt;/SPAN&gt;&lt;EM&gt;import project&lt;/EM&gt;&lt;SPAN&gt; feature, the extension will automatically append these fields with proper values; just state them with empty ones:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Inside &lt;FONT face="andale mono,times"&gt;cmake-kits.json&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;"ZEPHYR_BASE": ""&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;"ZEPHYR_SDK_INSTALL_DIR": ""&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Inside &lt;FONT face="andale mono,times"&gt;mcuxpresso-tools.json&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;"toolchainPath": ""&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;"toolchainVersion": ""&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="andale mono,times"&gt;&lt;SPAN&gt;"sdk.&lt;/SPAN&gt;&lt;SPAN&gt;path": ""&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;I've added an blank &lt;FONT face="andale mono,times"&gt;.vscode&lt;/FONT&gt; directory setup in the attachments. Note that the &lt;FONT face="andale mono,times"&gt;settings.json&lt;/FONT&gt;&amp;nbsp;file states that the cmake source directory can be found at&lt;FONT face="andale mono,times"&gt;&amp;nbsp;${workspaceFolder}/app&lt;/FONT&gt;; feel free to change it if this is not the case for your project.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 14:08:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Import-a-Zephyr-project/m-p/1747136#M91</guid>
      <dc:creator>nskartoredjo</dc:creator>
      <dc:date>2023-10-26T14:08:32Z</dc:date>
    </item>
  </channel>
</rss>

