Page 1 of 1

make menuconfig fails with file not recognized: File format not recognized

Posted: Mon Dec 11, 2017 5:29 am
by raspberrypisig
The steps I have done to install ESP-IDF on Windows 10:

1. Followed https://esp-idf.readthedocs.io/en/lates ... setup.html
Unzipped to C:\Users\X\esp-toolchain
2. Double clicked C:\Users\X\esp-toolchain\msys32\mingw32.exe
3. Followed instructions here https://esp-idf.readthedocs.io/en/lates ... et-esp-idf
4. cd to the hello-world folder
5. tried make menuconfig

The result of running make menuconfig:
-----------------------------------------------------------------------------------------------------------------------------------
make[1]: Entering directory '/c/Users/X/esp-idf/esp-idf/tools/kconfig'
lxdialog/check-lxdialog.sh -check /usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -lncursesw -lintl
/usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -c -o lxdialog/checklist.o lxdialog/checklist.c
/usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -c -o lxdialog/util.o lxdialog/util.c
/usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -c -o lxdialog/inputbox.o lxdialog/inputbox.c
/usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -c -o lxdialog/textbox.o lxdialog/textbox.c
/usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -c -o lxdialog/yesno.o lxdialog/yesno.c
/usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -c -o lxdialog/menubox.o lxdialog/menubox.c
/usr/bin/gcc -o mconf mconf.o zconf.tab.o lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o -lncursesw -lintl
mconf.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:312: mconf] Error 1
make[1]: Leaving directory '/c/Users/X/esp-idf/esp-idf/tools/kconfig'
make[1]: Entering directory '/c/Users/X/esp-idf/esp-idf/tools/kconfig'
lxdialog/check-lxdialog.sh -check /usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -lncursesw -lintl
/usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -c -o lxdialog/checklist.o lxdialog/checklist.c
/usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -c -o lxdialog/util.o lxdialog/util.c
/usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -c -o lxdialog/inputbox.o lxdialog/inputbox.c
/usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -c -o lxdialog/textbox.o lxdialog/textbox.c
/usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -c -o lxdialog/yesno.o lxdialog/yesno.c
/usr/bin/gcc -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MD -c -o lxdialog/menubox.o lxdialog/menubox.c
/usr/bin/gcc -o mconf mconf.o zconf.tab.o lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o -lncursesw -lintl
mconf.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:312: mconf] Error 1
make[1]: Leaving directory '/c/Users/X/esp-idf/esp-idf/tools/kconfig'
make: *** [/c/Users/X/esp-idf/esp-idf/make/project_config.mk:20: /c/Users/X/esp-idf/esp-idf/tools/kconfig/mconf] Error 2

------------------------------------
Not sure what I've done wrong.
ls $(IDF_PATH)

add_path.sh CONTRIBUTING.rst examples LICENSE README.md
components docs Kconfig make tools

Also tried a make clean but alas to no avail.

Re: make menuconfig fails with file not recognized: File format not recognized

Posted: Mon Dec 11, 2017 5:35 am
by ESP_Angus
Hi raspberrypisig,

Thanks for the detailed description of the problem.

If you run

Code: Select all

rm $IDF_PATH/tools/kconfig/*.o
and then re-run make menuconfig, what is the output?

Angus

Re: make menuconfig fails with file not recognized: File format not recognized

Posted: Mon Dec 11, 2017 7:39 am
by raspberrypisig
ESP_Angus wrote:Hi raspberrypisig,

Thanks for the detailed description of the problem.

If you run

Code: Select all

rm $IDF_PATH/tools/kconfig/*.o
and then re-run make menuconfig, what is the output?

Angus
I ended up doing the procedure again. This time it worked no problems. Thanks for you help.