espressif / esp-idf-template

Template application for https://github.com/espressif/esp-idf
Other
335 stars 201 forks source link

unable to make all: unorderable types #3

Closed richukuttan closed 5 years ago

richukuttan commented 7 years ago

When I run make all in the folder I have downloaded this template to, it gives me the following error:

make[1]: Entering directory '/home/hrishi/esp/esp-idf/tools/kconfig'
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o mconf.o mconf.c
flex -L -P zconf -o zconf.lex.c zconf.l
zconf.l:255: warning, -s option given but default rule can be matched
bison -t -l -p zconf -o zconf.tab.c zconf.y
sed -E "s/\\x0D$//" zconf.gperf | gperf -t --output-file zconf.hash.c -a -C -E -g -k '1,3,$' -p -t
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o zconf.tab.o zconf.tab.c
lxdialog/check-lxdialog.sh -check cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE -lncurses -ltinfo
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o lxdialog/checklist.o lxdialog/checklist.c
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o lxdialog/util.o lxdialog/util.c
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o lxdialog/inputbox.o lxdialog/inputbox.c
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o lxdialog/textbox.o lxdialog/textbox.c
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o lxdialog/yesno.o lxdialog/yesno.c
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o lxdialog/menubox.o lxdialog/menubox.c
cc -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 -lncurses -ltinfo
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o conf.o conf.c
cc -o conf conf.o  zconf.tab.o -lncurses -ltinfo
make[1]: Leaving directory '/home/hrishi/esp/esp-idf/tools/kconfig'
GENCONFIG
Building partitions from /home/hrishi/esp/esp-idf/components/partition_table/partitions_singleapp.csv...
Traceback (most recent call last):
  File "/home/hrishi/esp/esp-idf/components/partition_table/gen_esp32part.py", line 346, in <module>
    main()
  File "/home/hrishi/esp/esp-idf/components/partition_table/gen_esp32part.py", line 335, in main
    table.verify()
  File "/home/hrishi/esp/esp-idf/components/partition_table/gen_esp32part.py", line 80, in verify
    for p in sorted(self):
TypeError: unorderable types: PartitionDefinition() < PartitionDefinition()
/home/hrishi/esp/esp-idf/components/partition_table/Makefile.projbuild:35: recipe for target '/home/hrishi/esp/myapp/build/partitions_singleapp-unsigned.bin' failed
make: *** [/home/hrishi/esp/myapp/build/partitions_singleapp-unsigned.bin] Error 1

I'm running a Ubuntu 16.04 machine and have reached this stage after following the instructions on this page.

I have been unable to resolve this problem and look forward to a response. Thank you.

projectgus commented 7 years ago

Hi @richukuttan,

I get this error if I run the gen_esp32part.py tool in Python 3. At the moment, esp-idf's Python-based tools only support Python 2 (Python 2+3 support is coming but it's not available now.)

I am not certain this is the problem you have, because I thought the default "python" on Ubuntu 16.04 should be Python 2.7. However, if you got to "make menuconfig" -> "SDK Configuration" you can try changing the Python 2 interpeter value to "python2" and see if this solves the problem.

Angus

richukuttan commented 7 years ago

Thank you for the prompt reply. This worked when I moved to Python2. However, that gives me yet another error. First, it asked me to generate a signing key, then, after I followed the recommended way to create it, it gives me this error:

usage: espsecure [-h]
                 {digest_secure_bootloader,generate_signing_key,sign_data,verify_signature,extract_public_key,digest_private_key,generate_flash_encryption_key,decrypt_flash_data,encrypt_flash_data}
                 ...
espsecure: error: unrecognized arguments: /home/hrishi/esp/myapp/build/partitions_singleapp-unsigned.bin
/home/hrishi/esp/esp-idf/components/partition_table/Makefile.projbuild:28: recipe for target '/home/hrishi/esp/myapp/build/partitions_singleapp.bin' failed
make: *** [/home/hrishi/esp/myapp/build/partitions_singleapp.bin] Error 2
projectgus commented 7 years ago

Hi @richukuttan ,

Do you have "secure boot" enabled in menuconfig? You shouldn't need a signing key if secure boot is disabled. If you're just starting out you probably don't want secure boot, as this will limit your re-flashing options for the chip.

This said, even with secure boot on you shouldn't be getting the error reported here. I'll look into this.

Thanks,

Angus

richukuttan commented 7 years ago

Thank you. Removing the secure boot removed all problems and helped my program load.

Thanks.

Richukuttan