I've created a Zephyr project similar in structure as in the example 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: Error: Selected file or folder is not a valid MCUXpresso project
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.
Below is an example of how I expect it to work:
And below her is how I don't expect it to work:
解決済! 解決策の投稿を見る。
If you want your project to be recognised as a Zephyr project, you need at least the following files inside the .vscode directory:
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 Import Example from Repository feature, and use the workspace application type. From the newly generated project, copy the .vscode directory to your own project.
The downside is that some fields inside these config files are personalised per machine. For example, the toolchainPath will be equal to something like X:/Users/your-name/zephyr-sdk-0.XX.X/arm-zephyr-eabi. Luckily, these fields only need to exist to a certain extend. If you use the import project feature, the extension will automatically append these fields with proper values; just state them with empty ones:
Inside cmake-kits.json
Inside mcuxpresso-tools.json
I've added an blank .vscode directory setup in the attachments. Note that the settings.json file states that the cmake source directory can be found at ${workspaceFolder}/app; feel free to change it if this is not the case for your project.
To reply on myself, it turns out that you need the 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
If you want your project to be recognised as a Zephyr project, you need at least the following files inside the .vscode directory:
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 Import Example from Repository feature, and use the workspace application type. From the newly generated project, copy the .vscode directory to your own project.
The downside is that some fields inside these config files are personalised per machine. For example, the toolchainPath will be equal to something like X:/Users/your-name/zephyr-sdk-0.XX.X/arm-zephyr-eabi. Luckily, these fields only need to exist to a certain extend. If you use the import project feature, the extension will automatically append these fields with proper values; just state them with empty ones:
Inside cmake-kits.json
Inside mcuxpresso-tools.json
I've added an blank .vscode directory setup in the attachments. Note that the settings.json file states that the cmake source directory can be found at ${workspaceFolder}/app; feel free to change it if this is not the case for your project.