Missing ESP32 option in make menuconfig

ammaree
Posts: 33
Joined: Tue Dec 27, 2016 2:10 am

Missing ESP32 option in make menuconfig

Postby ammaree » Thu Aug 17, 2017 9:23 pm

After doing a git pull & git submodules update today something went wrong.

As usual I did a make menuconfig immediately after the sdk update and found that the ESP menu option was missing

When doing a make all immediately afterwards it complained about a large number of macros definitions being missing. Some of the missing macros included..
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ
CONFIG_ESP32_XTAL_FREQ 0
CONFIG_CONSOLE_UART_NUM
CONFIG_CONSOLE_UART_BAUDRATE
CONFIG_FREERTOS_MAX_TASK_NAME_LEN
CONFIG_TCP_OVERSIZE_xxx
CONFIG_FREERTOS_HZ
and numerous others.

Any suggestions for what I did wrong??
Help appreciated

AM

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Missing ESP32 option in make menuconfig

Postby ESP_Angus » Thu Aug 17, 2017 11:08 pm

Hi ammaree,

If you run "make defconfig", do you get any warnings or errors in the output? (These are also printed when you run "make menuconfig", but the ncurses menu pops up over the top of them.)

Angus

ammaree
Posts: 33
Joined: Tue Dec 27, 2016 2:10 am

Re: Missing ESP32 option in make menuconfig

Postby ammaree » Fri Aug 18, 2017 9:29 am

Nope, no errors.
$ make defconfig
DEFCONFIG
#
# configuration written to /c/Dropbox/devs/ws/esp32/esp-phase1/sdkconfig
#
GENCONFIG
Output from make after having done menuconfig
CC build/bootloader/bootloader_support/src/bootloader_random.o
CC build/bootloader/bootloader_support/src/flash_encrypt.o
CC build/bootloader/bootloader_support/src/bootloader_sha.o
CC build/bootloader/bootloader_support/src/esp_image_format.o
CC build/bootloader/bootloader_support/src/flash_partitions.o
CC build/bootloader/bootloader_support/src/secure_boot_signatures.o
CC build/bootloader/bootloader_support/src/secure_boot.o
CC build/bootloader/bootloader_support/src/efuse.o
CC build/bootloader/bootloader_support/src/bootloader_flash.o
AR build/bootloader/bootloader_support/libbootloader_support.a
CC build/bootloader/log/log.o
AR build/bootloader/log/liblog.a
CC build/bootloader/spi_flash/spi_flash_rom_patch.o
AR build/bootloader/spi_flash/libspi_flash.a
CC build/bootloader/micro-ecc/micro-ecc/uECC.o
AR build/bootloader/micro-ecc/libmicro-ecc.a
CC build/bootloader/soc/esp32/rtc_clk.o
CC build/bootloader/soc/esp32/rtc_time.o
CC build/bootloader/soc/esp32/rtc_sleep.o
CC build/bootloader/soc/esp32/rtc_init.o
CC build/bootloader/soc/esp32/soc_memory_layout.o
CC build/bootloader/soc/esp32/cpu_util.o
CC build/bootloader/soc/esp32/rtc_pm.o
AR build/bootloader/soc/libsoc.a
CC build/bootloader/main/flash_qio_mode.o
CC build/bootloader/main/bootloader_start.o
C:/Dropbox/devs/ws/z-sdk/esp-idf/components/bootloader/subproject/main/bootloader_start.c: In function 'clock_configure':
C:/Dropbox/devs/ws/z-sdk/esp-idf/components/bootloader/subproject/main/bootloader_start.c:736:13: error: 'CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ' undeclared (first use in this function)
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ == 240) {
^
C:/Dropbox/devs/ws/z-sdk/esp-idf/components/bootloader/subproject/main/bootloader_start.c:736:13: note: each undeclared identifier is reported only once for each function it appears in
C:/Dropbox/devs/ws/z-sdk/esp-idf/components/bootloader/subproject/main/bootloader_start.c:742:25: error: 'CONFIG_ESP32_XTAL_FREQ' undeclared (first use in this function)
clk_cfg.xtal_freq = CONFIG_ESP32_XTAL_FREQ;
^
C:/Dropbox/devs/ws/z-sdk/esp-idf/components/bootloader/subproject/main/bootloader_start.c: In function 'uart_console_configure':
C:/Dropbox/devs/ws/z-sdk/esp-idf/components/bootloader/subproject/main/bootloader_start.c:765:26: error: 'CONFIG_CONSOLE_UART_NUM' undeclared (first use in this function)
const int uart_num = CONFIG_CONSOLE_UART_NUM;
^
C:/Dropbox/devs/ws/z-sdk/esp-idf/components/bootloader/subproject/main/bootloader_start.c:799:27: error: 'CONFIG_CONSOLE_UART_BAUDRATE' undeclared (first use in this function)
const int uart_baud = CONFIG_CONSOLE_UART_BAUDRATE;
^
make[2]: *** [/c/Dropbox/devs/ws/z-sdk/esp-idf/make/component_wrapper.mk:229: bootloader_start.o] Error 1
make[1]: *** [/c/Dropbox/devs/ws/z-sdk/esp-idf/make/project.mk:391: component-main-build] Error 2
make: *** [/c/Dropbox/devs/ws/z-sdk/esp-idf/components/bootloader/Makefile.projbuild:39: /c/Dropbox/devs/ws/esp32/esp-phase1/build/bootloader/bootloader.bin] Error 2

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Missing ESP32 option in make menuconfig

Postby kolban » Fri Aug 18, 2017 2:29 pm

Can you possibly paste the exact commands you used to perform the pull and sub-module fix up?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

ammaree
Posts: 33
Joined: Tue Dec 27, 2016 2:10 am

Re: Missing ESP32 option in make menuconfig

Postby ammaree » Fri Aug 18, 2017 2:35 pm

No problem.
Started by deleting the whole esp-idf directory at "C:\Dropbox\devs\ws\z-sdk\esp-idf"
Then in "C:\Dropbox\devs\ws\z-sdk" I ran:
Whole clone process went fine, no error messages.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Missing ESP32 option in make menuconfig

Postby kolban » Fri Aug 18, 2017 2:48 pm

I have a test I would like you to run please.

I am assuming you have a project sub-directory. I will assume it is called "XYZ"
In the directory called "XYZ" you will find files called "components", "sdkconfig" and "main" (and more).

I want you to do two things:

1. Replace the file called "sdkconfig" in your project directory with this one "https://github.com/espressif/esp-idf-te ... /sdkconfig"
2. Remove the directory called "build" in your project directory (it will be recreated)

when done, try and re-build all after having doing your "make menuconfig"

As always, back up your project before you attempt any suggestions offered by anyone.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

ammaree
Posts: 33
Joined: Tue Dec 27, 2016 2:10 am

Re: Missing ESP32 option in make menuconfig

Postby ammaree » Fri Aug 18, 2017 3:57 pm

tried the steps exactly, no difference.

Where my working environment differ a little bit is that the ./ws/esp32/projectX/main is essentially unused.
It contains the default component.mk and a main.c with a single
void dummy_function(void) { }

My main application is located in a ./ws/z-apps/projectX directory that contains:
blank default component.mk
various source and header files.

What is noticeable is that:
#1 every time I start with a full complete sdkconfig (9671 bytes), after make menuconfig it is 4971 bytes with no changes made
#2 the error always occurs at the same step in the compile process
#3 by manually adding the missing lines to sdkconfig I can get the compile to continue..

ammaree
Posts: 33
Joined: Tue Dec 27, 2016 2:10 am

Re: Missing ESP32 option in make menuconfig

Postby ammaree » Tue Aug 22, 2017 9:29 pm

Not sure exactly how solved but deleted and re-cloned the idf, reinstalled the complete msys + toolchain, removed Eclipse completely and using separate editor, now working fine.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Missing ESP32 option in make menuconfig

Postby ESP_Angus » Tue Aug 22, 2017 11:50 pm

Glad you got it sorted out. For the record, it sounds like something we've seen happen when IDF can't find all the components, either because of IDF_PATH setting or because of something weird happened with the directory structure. Or if you have components in the project's "components" directory that have the same name as core IDF components (like 'esp32').

tanmaysathe
Posts: 2
Joined: Thu Apr 09, 2020 9:51 am

Re: Missing ESP32 option in make menuconfig

Postby tanmaysathe » Thu Apr 09, 2020 9:55 am

If a component in project's "component" directory matches with the esp's library of components, then the later one is removed from dependency list & from sdkconfig.
Thanks ESP_Angus for your hint.

Who is online

Users browsing this forum: No registered users and 127 guests