nxp-mcuxpresso / vscode-for-mcux

Support for NXP Visual Studio Code for MCUXpresso Extension project.
13 stars 0 forks source link

Importing an existing project form MCUXpresso IDE and retaining it in the same folder #35

Open fahirad opened 4 months ago

fahirad commented 4 months ago

Hi all.

I have a project that is being tracked in git and so far was developed on MCUXpresso IDE. What is the procedure for importing this project to VSCode while keeping it in the same folder so that git can see the changes? If I import it via "Import Project" it doesn't let me keep the project in the same folder and I have to make it in another, obviously causing git to not see the following changes made on the project. I tried opening the project via VS Code's "Open folder" option, but then my project isn't recognized by the extension as an MCU project. If I manually add the folders that are added when I import a copy of the project, then I have build errors such as: CMAKE_PROJECT_NAME not being present in the CMakeCache file, or the SdkRootDirPath not being determined.

I would really appreciate the detailed process for this.

Thank you!

cristitep-nxp commented 3 months ago

Hi @fahirad ,

We'll change the behavior to be able to import a project in place. Meanwhile, as workaround, you can import the project (as VS Code project) in another location, then copy that location content over the original IDE project location (this will basically add the .vscode and armgcc directories) then import the IDE resulted project dir using File -> "Add Folder to Workspace".

Regards, Cristian

fahirad commented 3 months ago

Hello @cristitep-nxp ! I managed to do it manually, I had to update paths of course, and some CMake settings got mixed up or lost during the process so I needed to edit those. But I managed to get the result I wanted.

Thanks for your reply and looking forward to the feature!

Kind regards, Fahira