VSCode failed to build with error - could not determine build directory..

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VSCode failed to build with error - could not determine build directory..

Jump to solution
1,468 Views
arunkumar_g
Contributor III

Hello,

 

When building imported sample app rtos version of hello world cm33 vscode fails to build with error  "Error: Could not determine the build directory for project mimxrt1180evk_hello_world_demo_cm33". SDk is 2.15, board is 1180 rev B, The build does not even start.  Is there any logs to see what is happening?

 

When I tried a clean command (from vscode context menu) the log is 

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).

It seems that cmake tool does not get the path of project.  .vscode dir is attached. cmake is 3.28.1

 

0 Kudos
1 Solution
520 Views
arunkumar_g
Contributor III

The mcuxpresso tool is the one vscode plugin initiates. For me it is 1.2 b142 -and i install mcuxpresso sdk developer kit

Finally I was able to build vscode project, But for that I did multiple things

- Uninstall vscode, mcuxpresso tool app, mcuxpresso ide

- Delete vscode plugin directories and mcuxpresso cache and tool download dirs (from <user> folder as well as <appdata> folders

-Reinstalled back. 

I still believe the issue was cause by mangled configuration of mcuxpresso vscode plugin.

View solution in original post

0 Kudos
10 Replies
716 Views
arunkumar_g
Contributor III

@kerryzhou  i'm using vscode 1.88, cmake is 3.28.1. Yes all toolchains are enabled when i dowloaded (default selections for gcc toolchain)  @DragosMiloiu  No file paths are not long "C:\code\mcuexpresso\code\demo\mimxrt1180evk_freertos_hello_cm33" and long paths setting are enabled in pc.

0 Kudos
603 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @arunkumar_g ,

  Path should not the issue on your side, as I also use the same deep path:

kerryzhou_0-1713159427499.png

Can you try to use the low cmake version, which is the same as my:3.21.0:

kerryzhou_1-1713159461944.png

I think the vscode version should also not the issues.

BTW, if you still have issues, do you also try to import the SDK again, whether any improvement or not?

Any updated information, please kindly let me know.

My windows system is win10.

 

Best Regards,

Kerry

 

 

 

0 Kudos
568 Views
arunkumar_g
Contributor III

Cmake installed was from mcuxpresso installer. I uninstalled that and installed 3.21 and no change in behavior. Have installed the sdk mutiple times in different paths and has same observations.

I dont think this is related to cmake as mentioned in first post, somehow cmake does not get the build directory path. Is there a chance the plugin is passing empty path to cmake? From where the plugin gets the build path and how does it pass it to cmake?

0 Kudos
557 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @arunkumar_g ,

  Thanks for your updated information.

  Which MCUXpresso Installer you are using now?

  I will also try your version, my current version is V1.0, I may try all the Installer, Vscode, cmake version totally the same as you again. Just to kick out the tool issues.

 

Best Regards,

Kerry

0 Kudos
521 Views
arunkumar_g
Contributor III

The mcuxpresso tool is the one vscode plugin initiates. For me it is 1.2 b142 -and i install mcuxpresso sdk developer kit

Finally I was able to build vscode project, But for that I did multiple things

- Uninstall vscode, mcuxpresso tool app, mcuxpresso ide

- Delete vscode plugin directories and mcuxpresso cache and tool download dirs (from <user> folder as well as <appdata> folders

-Reinstalled back. 

I still believe the issue was cause by mangled configuration of mcuxpresso vscode plugin.

0 Kudos
443 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @arunkumar_g ,

  Thanks so much for your updated information.

  I glad to hear you already make it works.

  From your newest information, really like what you mentioned, should still the plugin install abnormal cause this issues.

  Anyway, final working is important!

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

If your question is solved, please help to mark the correct answer, just to close this case.

Any new issues, welcome to create the new question post, thanks.

Best Regards,

Kerry

0 Kudos
853 Views
DragosMiloiu
NXP Employee
NXP Employee

Hi @arunkumar_g,

 I noticed from your files that you are using Windows. Windows has a limit for the length of the path (260 characters). So, if the path to where you created the project is long could you try to create it in a shorter path (like C:/work) and see if it helps?

Thanks,

Dragos.

 

 

868 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @arunkumar_g ,

 I also test it on my side, I can build it.

 This is my test result:

kerryzhou_0-1712659515938.png

kerryzhou_1-1712659521582.png

 

Which VScode version you are using? I am using 1.87.0.

my cmake version is:cmake version 3.21.0

Your situation should caused by the repository import, which method you import the SDK?

I am also using the SDK2.15.0, do you use all Toolchians:

kerryzhou_2-1712659699140.png

 

You can delete your vscode SDK, and import it again with the local method, whether it have improvement or not?

Any updated information, please kindly let me know.

Best Regards,

Kerry

 

 

 

 

0 Kudos
1,433 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @arunkumar_g ,

  Thanks so much for your question.

  If not use the vscode, use the IDE, eg, mcuxpresso, whether it works on your side?

  Just the Vscode version meet issues, right?

  I am also testing this code on my side, will give you updated information later.

 

Best Regards,

Kerry

0 Kudos
1,422 Views
arunkumar_g
Contributor III

Yes mcuxpresso works ok. VScode is the one that shows this error. 

Note: both are in different machines.

0 Kudos