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 Reply Children
  • Have you installed the nRF Command Line tools in addition to the SDK?

    jonas.woerner said:

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

    Well there is one in ncs/(ncs version)/nrf, are you finding that one?

    jonas.woerner said:

    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.

    Any of the two, but yes please try it using the CLI directly too. As long as its a tested sample 

    jonas.woerner said:
    I found out that entering "bash" into the nrf terminal also results in these errors.

    Could you expand on this? Are you saying that by opening the terminal and doing nothing you get these errors?

    jonas.woerner said:
    I think its an issue with the nordic extensions for VScode

    Well, if you only get these issues on Fedora I wouldn't say its an issue with the extension per se. nRF Connect officially only supports Windows, Mac and now the LTS version of Ubuntu, so there could be some issues related to it being Fedora. Did you do a manual installation, or did you install it using the Toolchain Manager? As you are not using any of the officially supported OS, I would recommend doing a manual install. And this does look like an installation issue.

    I assume your friend uses Fedora too?

    Regards,

    Elfving

  • regarding the "entering bash". If I open an nRF terminal inside vscode and type sh or bash, I get these errors. I dont get them if I open a normal terminal in vscode.

    I know its not an issue with the extensions perse, but an issue with the extensions on fedora. I just thought Nordic might be interested to fix this, as it doesnt seem like a big bug, but a small one that would enable fedora users a seemless experience.

    my friend is using fedora too.

    Im going to try the manual install.

  • I see.

    jonas.woerner said:
    Im going to try the manual install.

    Great, I can imagine that making a difference. Let me know if it does.

    Regards,

    Elfving

  • I just tried it but its the same. nothing changed.

    do you know whats different about that nrf terminal in comparison to the normal terminal? It doesnt seem to be the environment. If I could get this replicated in a system terminal it would help I guess..

    EDIT: I found something I think.

    I think it has something todo with this environment variable: BASH_FUNC_module%%=() {  eval $($LMOD_CMD bash "$@") && eval $(${LMOD_SETTARG_CMD:-:} -s sh)

    but I dont really know what its doing or how I can disable it. Im trying that now.

  • jonas.woerner said:
    do you know whats different about that nrf terminal in comparison to the normal terminal?

    I believe some path variables might be set, but not completely sure. I'll look into that.

    So the issues now only show up when either building a project using west build, using the build action in the extension, or when running "bash" in the nrf terminal?

    Regards,

    Elfving

Related