Page 1 of 1

hidden menu item of idf.py menuconfig

Posted: Sun Feb 11, 2024 4:59 am
by mthiiz
This is newbie question, sorry. But I could not find this topic.

I could not find the spiram setting menu item in idf.py menuconfig under esp32-cam/example subdirectories.
I removed those all related files
* sdkconfig
* sdkconfig.defaults
* build/
Though, the spiram related menu item were stayed hidden. But under the esp-idf example folder, they are exist.

What files control this? Could you give some hint to solve?
(I could not find significant files with the command 'grep -r SPIRAM * under esp32-camera folder)

Re: hidden menu item of idf.py menuconfig

Posted: Sun Feb 11, 2024 4:42 pm
by sukeshak
PSRAM settings come under
Component config > ESP PSRAM

Re: hidden menu item of idf.py menuconfig

Posted: Mon Feb 12, 2024 12:44 am
by mthiiz
There is no menu even if pressing 'A'.

Hiding perfectrly under esp32-camera/example/camera_example folder after removing
sdkconfig.defaults.

But under the esp-idf/example folder(such as softap) having nothing to do with `esp32-camera`,
I can see the menu again.

This is very strange behavior. That's why I posted previously.

What esp-idf related files decide the menu item hide/show properties of menuconfig?

Re: hidden menu item of idf.py menuconfig

Posted: Tue Feb 13, 2024 6:15 am
by ESP_Sprite
You can search for an option using the '/' key; this also shows invisible options. If you then press enter on the one you want (it'll then show up in red if you otherwise wouldn't be able to see it) you can press '?' and see what the option depends on. You can generally use that to chase down what the issue is.

Re: hidden menu item of idf.py menuconfig

Posted: Tue Feb 13, 2024 11:55 am
by MicroController
mthiiz wrote:
Mon Feb 12, 2024 12:44 am
What esp-idf related files decide the menu item hide/show properties of menuconfig?
Various Kconfig files, from the IDF, components and the application, are pulled together into menuconfig.
Inside the Kconfig files, conditions are defined enabling, disabling, or defaulting settings depending on SoC capabilities and other Kconfig items (possibly also Cmake-defined values?).
The settings made in menuconfig are stored in sdkconfig, but sdkconfig itself does nothing to enable/disable options.

Which ESP32 are you using?
Did you idf.py set-target first? (Settings will be hidden when the config system sees that the currently set target SoC doesn't support them...)

Re: hidden menu item of idf.py menuconfig

Posted: Tue Feb 13, 2024 3:22 pm
by mthiiz
After 'idf.py fullclean' and removing sdkconfig, sdkconfig.defaults, and build/,
then 'idf.py set-target esp32', I got,

```
:
Executing action: set-target
Set Target to: esp32, new sdkconfig will be created.
:
```
But misterious 'SoC' target was selected in sdkconfig as follows,
```
:
CONFIG_SOC_BROWNOUT_RESET_SUPPORTED="Not determined"
CONFIG_SOC_TWAI_BRP_DIV_SUPPORTED="Not determined"
:
```
idf.py --list-targets sayes
```
esp32
esp32s2
esp32c3
esp32s3
esp32c2
esp32c6
esp32h2
```
What is 'SoC' target? Why was this target selected?

Re: hidden menu item of idf.py menuconfig

Posted: Wed Feb 14, 2024 12:23 pm
by MicroController
But misterious 'SoC' target was selected in sdkconfig as follows,
...
Why was this target selected?
The lines from sdkconfig you show don't say anything about which target was set.
What you're looking for in sdkconfig is "CONFIG_IDF_TARGET" and/or "CONFIG_IDF_TARGET_ESP32".

If these are not as expected, you can try to set-target and then also set the IDF_TARGET environment variable before running menuconfig.
What is 'SoC' target?
"SoC", i.e. "System-on-a-Chip", is the shorthand often used to refer to the ESP chip. In this context, it refers to the 'target' chip, i.e. the ESP variant like ESP32, ESP32-S3,...

Re: hidden menu item of idf.py menuconfig

Posted: Thu Feb 15, 2024 2:02 am
by mthiiz
MicroController wrote:
Wed Feb 14, 2024 12:23 pm
The lines from sdkconfig you show don't say anything about which target was set.
What you're looking for in sdkconfig is "CONFIG_IDF_TARGET" and/or "CONFIG_IDF_TARGET_ESP32".
I'm sorry. Acutual sdkconfig excerpt is as follows:

Code: Select all

CONFIG_IDF_TARGET="esp32"
CONFIG_IDF_INIT_VERSION="5.3.0"
CONFIG_IDF_TARGET_ESP32=y
I was confusing because there was the red 'SoC settings' menu item under 'Component config' top menu.

And I noticed there were so menu item decreasing in the esp32-camera related project even if I selected the same esp32
target.

And menu items are depended on the file 'kconfigs.in' under build folder of project.

I would like to enable SPIRAM in the project, though, I don't understand how to enable it because there is no menu item in the menuconfig menu.

Re: hidden menu item of idf.py menuconfig

Posted: Tue Mar 05, 2024 11:08 pm
by onionknight227
I was struggling with the same issue today: several menu items were missing under "Component config", among those the "ESP PSRAM" which I needed to set up. But when I checked some sample projects from esp-idf, everything was there. Very weird, huh?

It turned out the problem was in the main CMakeLists.txt, which I created from "esp32-camera" project example, i.e.:

Code: Select all

idf.py create-project-from-example "espressif/esp32-camera:camera_example"
This is how my CMakeLists.txt created by the above command looked like:

Code: Select all

# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)

set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(camera_example)
The culprit was set(COMPONENTS main) line. After commenting it out, I can now see all items in the menuconfig.

Hope this helps someone!