Convert mcuxpresso project to vscode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Convert mcuxpresso project to vscode

跳至解决方案
4,212 次查看
arunkumar_g
Contributor IV

We have project that is created using MCUXpresso IDE. Is there a way to convert it to vscode plugin (1.6.47) to use cmake based build ?

When I do "import project", it imports all folders, but cannot build because cannot find make files and project looks like 

arunkumar_g_0-1710540003021.png

and component management throws error "Error: Component management is not available for projects without an associated SDK" but i'm not sure how to associate and sdk with it.

SDK installed is SDK_2.x_MIMXRT1189xxxxx (2.15 )

 

Also is the plugin compatible with WSL based development?

Thanks

 

0 项奖励
回复
1 解答
4,178 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @arunkumar_g ,

  At first, do you already make the SDK vscode method works?

 I mean, you can import the SDK demo in the VScode after you install the SDK in the vscode, whether that works?

  If yes, I highly recommend you based on the VScode project to develop your own project instead of the MCUXpresso IDE project, as now, we don't have the method to import the mcuxpresso project to the vscode directly.

  About the vscode usage, you can refer to these post:

https://community.nxp.com/t5/MCUXpresso-for-VSCode-Knowledge/tkb-p/mcuxpresso-vscode@tkb

 

Wish it helps you!

If you still have question about it, please kindly let me know.

Best Regards,

Kerry

 

在原帖中查看解决方案

0 项奖励
回复
19 回复数
3,811 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @arunkumar_g ,

  Please keep patient, I am finding time to test it on my side in these two days.

  After my testing, will share the detail steps, thanks.

  Please keep patient, thanks so much.

Best Regards,

Kerry

0 项奖励
回复
3,904 次查看
arunkumar_g
Contributor IV

Any update?

0 项奖励
回复
3,894 次查看
JoeSanchez
Contributor II

can you post your CMakeLists.txt file

0 项奖励
回复
3,868 次查看
arunkumar_g
Contributor IV

sure.. attached. Note that this is the default file after the sample mimxrt1180evk_freertos_hello_cm33 is imported.

0 项奖励
回复
3,866 次查看
JoeSanchez
Contributor II

try adding this in CMakeLists

SET(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 
and check you debug configuration folder that compile_commands.json exist after saving CMake
0 项奖励
回复
3,839 次查看
arunkumar_g
Contributor IV

No it does not file do not exist. The build folder even is not formed.
Doing a rebuild all after adding the line
"
* Executing task: CMake: clean

clean task started....
"C:\Program Files\CMake\bin\cmake.EXE" --build --config Debug --target clean --
Error: could not load cache
clean finished with error(s).

* The terminal process failed to launch (exit code: 1).
* Terminal will be reused by tasks, press any key to close it.

* Executing task: CMake: configure

Config task started...
Configure finished with return code -3

* The terminal process failed to launch (exit code: -3).
* Terminal will be reused by tasks, press any key to close it.


"

0 项奖励
回复
3,837 次查看
JoeSanchez
Contributor II

Did you build both Debug and Release config in MCUXpresso before converting the project to VSCode? I think I remember that the conversion will fail if there was no previously built configurations

0 项奖励
回复
3,819 次查看
arunkumar_g
Contributor IV
I think there is some confusion here -sorry about that. The (demo) project in vscode is as is from (gcc toolchain) sdk - not from mcuxpresso (since it was already mentioned that wont work).

Now building a debug via armgcc/build_debug.bat will error because it cannot find ../../../../../../tools/cmake_toolchain_files/armgcc.cmake (as the vscode export is to another path from sdk path)
0 项奖励
回复
4,139 次查看
arunkumar_g
Contributor IV

One thing I found in this, when I try a "Clean" is the command that executes doesn't contain the project folder path . The command looks like

clean task started....
"C:\Program Files\CMake\bin\cmake.EXE" --build --config Debug --target clean --
Error: could not load cache
clean finished with error(s).

The cmake command does not have project path. Why is that?

0 项奖励
回复
4,112 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @arunkumar_g ,

  Don't worry, let me find time to test it at first.

  Please give me more time, and keep patient, thanks so much.

Best Regards,

Kerry

0 项奖励
回复
4,152 次查看
arunkumar_g
Contributor IV

@kerryzhou yes I imported (hello_world_cm33 and free rtos version) demo app from repository. When building vscode displays the error  "Error: Could not determine the build directory for project mimxrt1180evk_hello_world_demo_cm33". SDk is 2.15, board is 1180 rev B, but i have not reached debug stage. Is there any logs to see what is happening?

 

arunkumar_g_0-1710878432367.png

 

0 项奖励
回复
4,164 次查看
arunkumar_g
Contributor IV

I imported demo app from repository, but cannot build as it gives "Error: Could not determine the build directory for project mimxrt1180evk_hello_world_demo_cm33" I'm not sure what's missing. (i have installed "mcuxpresso sdk developer" using the installer)

0 项奖励
回复
4,158 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @arunkumar_g ,

  Do you import the example from Repository?

kerryzhou_0-1710822548736.png

 

Please share some screenshot about your issues.

BTW, what's the board you are using? the NXP MIMXRT1180-EVK board? which version?

Best Regards,

Kerry

0 项奖励
回复
4,165 次查看
arunkumar_g
Contributor IV

Also I don't see a "create new application"  kind of button as shown in one of your training videos like below.

arunkumar_g_0-1710798445393.png

What I see is 

arunkumar_g_1-1710798504580.png

Does it mean we can only start from an existing sample?

0 项奖励
回复
4,173 次查看
arunkumar_g
Contributor IV

@JoeSanchez @kerryzhou  yes i have installed sdk in vscode and have build demo app

0 项奖励
回复
4,179 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @arunkumar_g ,

  At first, do you already make the SDK vscode method works?

 I mean, you can import the SDK demo in the VScode after you install the SDK in the vscode, whether that works?

  If yes, I highly recommend you based on the VScode project to develop your own project instead of the MCUXpresso IDE project, as now, we don't have the method to import the mcuxpresso project to the vscode directly.

  About the vscode usage, you can refer to these post:

https://community.nxp.com/t5/MCUXpresso-for-VSCode-Knowledge/tkb-p/mcuxpresso-vscode@tkb

 

Wish it helps you!

If you still have question about it, please kindly let me know.

Best Regards,

Kerry

 

0 项奖励
回复
957 次查看
AvaGhaf
Contributor II

Hello,

Checking again on this topic. Was wondering if there is a timeline for this feature to be released?

 

Thanks.

0 项奖励
回复
3,638 次查看
arunkumar_g
Contributor IV
I understand we cannot make vscode project from mcuxpresso ide project. So i'll mark this answer as accepted and open a new thread for vscode issue.
0 项奖励
回复
4,188 次查看
JoeSanchez
Contributor II

Did you install that SDK in VSCode?

JoeSanchez_0-1710715461669.png

 

0 项奖励
回复