Problems with NCS on VScode

I am in the process of migrating from PlatformIO on VScode to NCS on VScode, but im really struggling.
I tried setting everything up on Windows and Fedora.
on WIndows my main Problem is that the compiler errors are not shown in the Problems tab.. I read that others have the same problem, but nobody seems to know how to fix it...
the second Problem is that on Fedora I get Hundreds of these:

/bin/sh: module: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `module'
/bin/sh: ml: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `ml'
/bin/sh: which: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `which'


In combination with the Erros not showing on the Problems tab, this makes it a nightmare to find all the errors...

does anybody have an idea on how to fix these Problems?

kind regards,
Jonas

Parents
  • I dont know how I got there, I just installed everything (on Fedora) and it was like this. Everything builds fine. building from commandline I have not tried. I just tried to copy the build command to a terminal but that doesnt seem to work(west says "build" is not a valid option) but I will look into this and try it.

  • jonas.woerner said:
    I just installed everything (on Fedora) and it was like this.

    So if it is like this on Fedora, and you are not building from commandline, then where are you seeing these issues? In VSC? And are you seeing it eg. when opening a project, all the time, or just when building, or what?

    jonas.woerner said:
    I just tried to copy the build command to a terminal but that doesnt seem to work(west says "build" is not a valid option) but I will look into this and try it.

    Then I assume you are not launching it from a valid build workspace. See here for more details.

    Regards,

    Elfving

Reply
  • jonas.woerner said:
    I just installed everything (on Fedora) and it was like this.

    So if it is like this on Fedora, and you are not building from commandline, then where are you seeing these issues? In VSC? And are you seeing it eg. when opening a project, all the time, or just when building, or what?

    jonas.woerner said:
    I just tried to copy the build command to a terminal but that doesnt seem to work(west says "build" is not a valid option) but I will look into this and try it.

    Then I assume you are not launching it from a valid build workspace. See here for more details.

    Regards,

    Elfving

Children
  • I am seeing these issues in the commandline output in VScode, but only when building an NCS app, nowhere else.

    you are right about the not valid build workspace. Is there a way to get the west manifest that VScode uses to build with west? or how could I try to reproduce the exact build procedure that vscode does from CLI? I cant run west from within the folder because the west manifest is missing from what I learned on your provided link.

  • I believe you can run the exact command that VSC does as long as you do it from the same folder - one with a manifest file. 

    jonas.woerner said:

    I am seeing these issues in the commandline output in VScode, but only when building an NCS app, nowhere else.

    Are you able to run west commands from there? Could you try to build an NCS sample?

    Regards,

    Elfving

  • I am not able to run the west command from the nrf commandline. I get python errors here, but I fixed these. It still doesnt work though, as west cannot find a manifest file. when using the samples (in VScode, create new app and use a sample there) I get the same problems.

    should there be a manifest file on VScode projects? if so, where should it be as I cannot find it?

    by building an NCS sample, I assumed you mean inside VScode. or did you mean using west CLI directly? I did this a while ago, and I dont remember the errors showing up there.

    I think its an issue with the nordic extensions for VScode.

  • I tried some things, and I found out that entering "bash" into the nrf terminal also results in these errors. this does only happen if the terminal is opened as nrf connect terminal. opening a normal terminal (also in vscode) is not a problem.

Related