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

Menuconfig is not saved #79

Closed
PilnyTomas opened this issue Aug 10, 2022 · 7 comments
Closed

Menuconfig is not saved #79

PilnyTomas opened this issue Aug 10, 2022 · 7 comments

Comments

@PilnyTomas
Copy link

PilnyTomas commented Aug 10, 2022

Settings in menuconfig are not saved and will not take effect when built.
Steps to reproduce:
./build.sh -t esp32 -b menuconfig
Change any config and save.
./build.sh -t esp32 -b menuconfig
Observe that the previous setting is on the default value.
Optionally - build and observe that the setting did not take any effect, and is not mentioned in the built sdkconfig.

I have modified a section in sdkconfig and tried to build libs without menuconfig but it was built with the default log level set to error.

#
# Debug Log Configuration
#
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_NONE is not set
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR is not set
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_WARN is not set
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_INFO is not set
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_DEBUG is not set
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_VERBOSE=y
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=5
# CONFIG_ARDUHAL_LOG_COLORS is not set
CONFIG_ARDUHAL_ESP_LOG=y
# end of Debug Log Configuration

The next thing I tried (with the manual changes in sdkconfig) was that I have placed some debug outputs sed -n "218 p" sdkconfig around line 118 of the build.sh and before the rm -rf build sdkconfig

The simplified code looks like this:

sed -n "218 p" sdkconfig
rm -rf build sdkconfig
sed -n "218 p" sdkconfig
idf.py -DIDF_TARGET="$TARGET" -DSDKCONFIG_DEFAULTS="$configs" $BUILD_TYPE
sed -n "218 p" sdkconfig

And the output from the sed+menuconfig:

CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=5 #manual override
sed: can't read sdkconfig: No such file or directory
Loaded configuration '/home/username/esp32-arduino-lib-builder/sdkconfig'
No changes to save (for '/home/username/esp32-arduino-lib-builder/sdkconfig')
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=1

What is strange is that even though the sdkconfig is deleted before calling idf.py menuconfig, I can see the manual change in the menuconfig, but after saving it without change, the settings goes back to defaults.

@SinglWolf
Copy link

Same problem.

@PilnyTomas
Copy link
Author

After discussion with @me-no-dev the propper way is to modify esp32-arduino-lib-builder/configs/defconfig.common
See espressif/arduino-esp32#7193

@SinglWolf
Copy link

SinglWolf commented Sep 1, 2022

After discussion with @me-no-dev the propper way is to modify esp32-arduino-lib-builder/configs/defconfig.common

In that case, what's the point of the command: ./build.sh -t esp32 -b menuconfig, if my have to manually edit esp32-arduino-lib-builder/configs/defconfig.common????

@PilnyTomas
Copy link
Author

what's the point of the command ./build.sh -t esp32 -b menuconfig:

Maybe @me-no-dev can answer that.

@chegewara
Copy link

After discussion with @me-no-dev the propper way is to modify esp32-arduino-lib-builder/configs/defconfig.common

In that case, what's the point of the command: ./build.sh -t esp32 -b menuconfig, if my have to manually edit esp32-arduino-lib-builder/configs/defconfig.common????

For some params you have default values, which will overwrite the values you set, but not all. The point is to have default values for espressif build make it easier. If you want to change some value which exist in default.xxx you just have to remove it or comment out in default.xxx file.

It is rare case when users edit values in menuconfig, but its common case (CI) when its required to use default values.
Sure, its not optimal, but i think the only option with Smake to do it, but i may be wrong (not cmake expert).

@jcwren
Copy link

jcwren commented Nov 13, 2022

Seems like the rather sparse README.md should be updated to note this. I just wasted 2 hours trying to figure out why trying to enable the FreeRTOS trace facility via the CONFIG_FREERTOS_USE_TRACE_FACILITY in sdkconfig was just getting tossed out like a piece of old dead fish, only to find it in a closed issue.

It's very counterintuitive to have to modify files in esp32-arduino-lib-builder/configs when ESP-32 developers (and people with a Linux kernel background) are used to using menuconfig.

The real issue is that changes to sdkconfig are being thrown away, rather than just having whatever values are specified in the defaults files overwriting those particular settings in the sdkconfig

@me-no-dev
Copy link
Member

menuconfig and sdkconfig relate only to certain configuration/chip at once. Here we build for all supported chips. The ./build.sh -t [chip] menuconfig in intended to configure a normal project build for particular chip only and not to relate that to building and exporting libraries to Arduino. Imagine it as you using the repo to build your own firmware for particular board that uses Arduino as component.

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

5 participants