How do i override CONFIG_EXAMPLE_WIFI_SSID using IDF Eclipse Plugin

greycon
Posts: 33
Joined: Fri Nov 03, 2023 9:59 pm

How do i override CONFIG_EXAMPLE_WIFI_SSID using IDF Eclipse Plugin

Postby greycon » Tue Nov 14, 2023 9:34 pm

Hi, I have setup the IDF Eclipse Plugin, version 2.11.1, and ESP IDF 5.1 under Eclipse CDT202309. I have created an IDF Project, based on the protocols/esp-http-client template. It compiles and flashes fine. But I can't for the life of me find where the correct place to modify the CONFIG_EXAMPLE_WIFI_SSID define. (It's set to "myssid") I know I could hard code this in my program, but I want learn how to do it right.

I see lots of talk about menuconfig, but since this is in Eclipse, I don't think this is relevant.

No matter what file I change CONFIG_EXAMPLE_WIFI_SSID in, it seems to have a warning at the start stating that this is a generated file, do not change it. I have a file called Kconfig.projbuild, into which I added:

Code: Select all

config EXAMPLE_WIFI_SSID
    string "Example WiFi SSID"
    default "MyHomeSSID"
    help
	SSID (network name) for the example to connect to.
But this didn't work. Similarly, I have a file in my project called sdkconfig, but this too gets overridden at build time, and ends up back at a value of "myssid" .

What am I missing here?

MicroController
Posts: 1708
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: How do i override CONFIG_EXAMPLE_WIFI_SSID using IDF Eclipse Plugin

Postby MicroController » Tue Nov 14, 2023 10:15 pm

Inside eclipse, you should be able to just double-click on the sdkconfig file, which should open the ESP-IDF configuration editor where you can modify all the settings defined by the IDF components and the project-local Kconfig. Once saved, the sdkconfig should be re-generated automatically with your modified settings in it.

If all else fails, you can still use idf.py menuconfig on an IDF command line to do the same thing, and then just go on in eclipse.

greycon
Posts: 33
Joined: Fri Nov 03, 2023 9:59 pm

Re: How do i override CONFIG_EXAMPLE_WIFI_SSID using IDF Eclipse Plugin

Postby greycon » Fri Nov 17, 2023 10:11 pm

Thanks for replying. You put me on the right track. After extensive searching, I came to the conclusion that editiing the SDKConfig file in my main project directory was correct, as you pointed out.

It turns out that when I edited the file in eclipse, the changes never saved. It's somehow "read-only" when edited. But no error or warning to that effect.

Editing the file directory outside of Eclipse did the trick - all well now. You live and learn.

Thanks again.

Who is online

Users browsing this forum: Google [Bot] and 121 guests