Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kconfig board setting doesn't expand VS code variable name #12

Open
AdiIntel opened this issue Oct 2, 2021 · 4 comments
Open

kconfig board setting doesn't expand VS code variable name #12

AdiIntel opened this issue Oct 2, 2021 · 4 comments

Comments

@AdiIntel
Copy link

AdiIntel commented Oct 2, 2021

I'm trying to set my board like this:

	"brd": "${config:cmake.configureSettings.BOARD}",
	"kconfig.zephyr.board": {
		"arch": "arm",
		"dir": "${workspaceFolder}/out_of_tree_boards/boards/arm/${config:brd}",
		"board":"${config:brd}"
	},

So, whatever board I set for build through CMake configure setting, should also change kconfig setting.
However, I always get below error:

"${workspaceFolder}/out_of_tree_boards/boards/arm/${config:brd}/${config:brd}_defconfig" not found.

@trond-snekvik
Copy link
Owner

Thanks for reporting. In version v1.2.0 released on September 26th, a bug was fixed in the variable expansion, which should resolve the ${workspaceFolder} variable, but the ${config:*} syntax is not supported.

My problem is that VS Code doesn't expose the variable expansion as an API. Extension authors have to implement it themselves for settings, which makes the whole thing a bit awkward. I'll look into it though.

@AdiIntel
Copy link
Author

AdiIntel commented Oct 5, 2021

I'd save you some time and share my recent findings. After a lot of digging, I found this feature request #2809 is open since 2016. Not sure when will VS code add support for it.

So, while config:* variable not supported, I'd expect env:* variable to work there. Just tried it - no luck. (ver 1.2.0).

Also, anytime I update the kconfig board settings, I don't see it takes effect immediately. I have to reopen the VS code to see the change to appear on the status bar.

And, I'd like kconfig board appear on status bar for any file open in the editor (.c / .h), not just when .conf files are open. When I click the board name in status bar, it pops up list of boards populated by west. My list of supported boards is in outside directory (not under zephyr dir). How can I achieve my goal of being able to select the board from my own set OOT board directory? If that's is not supported today - can be a good feature addition.

trond-snekvik added a commit that referenced this issue Nov 3, 2021
Adds tests for kconfiglsp.py, fixing a range of minor bugs.

Splits they python job to run on all three platforms.
@AdiIntel
Copy link
Author

AdiIntel commented Nov 9, 2021

Great to see some update. I'm looking forward to the new version, are you releasing it soon?
nRF Kconfig is buggy, does not work in my setup, throws errors. So, request to not deprecate support for this kconfig extension.

@trond-snekvik
Copy link
Owner

Great to see some update. I'm looking forward to the new version, are you releasing it soon? nRF Kconfig is buggy, does not work in my setup, throws errors. So, request to not deprecate support for this kconfig extension.

I haven't had time to work on this extension much lately, unfortunately, but it will indeed keep on living. I don't have an ETA for the next release, but I hope to find some time in the next week or two.

The nRF Kconfig extension has moved on to a language server based implementation, which uses kconfiglib as a backend. It's a bit unstable still, unfortunately, but we're working hard to fix the issues and increase test coverage. If you would like to help stabilize it, any issues and steps to reproduce them could be submitted to https://devzone.nordicsemi.com 🙂

In the long run, I believe the nRF Kconfig extension will replace this one as The Kconfig extension, as that is more actively developed. This won't happen until it is considered an unconditional improvement over this one both in terms of stability and feature set though. Even then, it could make sense to keep this project going, as it might still be preferred by those who don't want to see Nordic branding in their editors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants