[Wipy 2.0] Error when building firmware bootloader



  • Hi everyone,

    I'm currently trying to build a firmware from https://github.com/pycom/pycom-micropython-sigfox/tree/master/esp32 for my Wipy 2.0 but I always get an error during the build of bootloader.

    I started from a fresh clone https://github.com/pycom/pycom-micropython-sigfox
    Using pycom-esp-idf and the xtensa-esp32-elf toolchain.

    I did the submodule update with success

    ~/esp32_B/pycom-micropython-sigfox/esp32$ git submodule update --init
    Sous-module 'lib/axtls' (https://github.com/pfalcon/axtls) enregistré pour le chemin '../lib/axtls'
    Sous-module 'lib/berkeley-db-1.xx' (https://github.com/pfalcon/berkeley-db-1.xx) enregistré pour le chemin '../lib/berkeley-db-1.xx'
    Sous-module 'lib/libffi' (https://github.com/atgreen/libffi) enregistré pour le chemin '../lib/libffi'
    Sous-module 'lib/lwip' (http://git.savannah.gnu.org/r/lwip.git) enregistré pour le chemin '../lib/lwip'
    Clonage dans 'lib/axtls'...
    remote: Counting objects: 2774, done.
    remote: Total 2774 (delta 0), reused 0 (delta 0), pack-reused 2774
    Réception d'objets: 100% (2774/2774), 3.47 MiB | 73.00 KiB/s, fait.
    Résolution des deltas: 100% (2087/2087), fait.
    Vérification de la connectivité... fait.
    Chemin de sous-module '../lib/axtls' : '67d27df4b5d097e146599fc4fb160a2adcbf5632' extrait
    Clonage dans 'lib/berkeley-db-1.xx'...
    remote: Counting objects: 262, done.
    remote: Compressing objects: 100% (121/121), done.
    remote: Total 262 (delta 121), reused 262 (delta 121), pack-reused 0
    Réception d'objets: 100% (262/262), 331.56 KiB | 67.00 KiB/s, fait.
    Résolution des deltas: 100% (121/121), fait.
    Vérification de la connectivité... fait.
    Chemin de sous-module '../lib/berkeley-db-1.xx' : 'dab957dacddcbf6cbc85d42df62e189e4877bb72' extrait
    Clonage dans 'lib/libffi'...
    remote: Counting objects: 10883, done.
    remote: Total 10883 (delta 0), reused 0 (delta 0), pack-reused 10882
    Réception d'objets: 100% (10883/10883), 6.83 MiB | 54.00 KiB/s, fait.
    Résolution des deltas: 100% (6773/6773), fait.
    Vérification de la connectivité... fait.
    Chemin de sous-module '../lib/libffi' : 'e9de7e35f2339598b16cbb375f9992643ed81209' extrait
    Clonage dans 'lib/lwip'...
    remote: Counting objects: 43712, done.
    remote: Compressing objects: 100% (10861/10861), done.
    remote: Total 43712 (delta 32866), reused 42970 (delta 32347)
    Réception d'objets: 100% (43712/43712), 8.11 MiB | 29.00 KiB/s, fait.
    Résolution des deltas: 100% (32866/32866), fait.
    Vérification de la connectivité... fait.
    Chemin de sous-module '../lib/lwip' : '5b8b5d459e7dd890724515bbfad86c705234f9ec' extrait

    I also built mpy-cross sucessfully

    ~/esp32_B/pycom-micropython-sigfox/mpy-cross$ make all
    Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
    mkdir -p build/genhdr
    Generating build/genhdr/mpversion.h
    GEN build/genhdr/qstr.i.last
    GEN build/genhdr/qstr.split
    GEN build/genhdr/qstrdefs.collected.h
    QSTR updated
    GEN build/genhdr/qstrdefs.generated.h
    mkdir -p build/py/
    mkdir -p build/py/../extmod/
    mkdir -p build/py/../lib/embed/
    mkdir -p build/py/../lib/utils/
    CC ../py/mpstate.c
    CC ../py/nlrx86.S
    CC ../py/nlrx64.S
    CC ../py/nlrthumb.c
    CC ../py/nlrxtensa.S
    CC ../py/nlrsetjmp.c
    CC ../py/malloc.c
    CC ../py/gc.c
    CC ../py/qstr.c
    CC ../py/vstr.c
    CC ../py/mpprint.c
    CC ../py/unicode.c
    CC ../py/mpz.c
    CC ../py/lexer.c
    CC ../py/lexerstr.c
    CC ../py/lexerunix.c
    CC ../py/parse.c
    CC ../py/scope.c
    CC ../py/compile.c
    CC ../py/emitcommon.c
    CC ../py/emitbc.c
    CC ../py/asmx64.c
    CC ../py/emitnative.c
    CC ../py/asmx86.c
    CC ../py/emitnative.c
    CC ../py/asmthumb.c
    CC ../py/emitnative.c
    CC ../py/emitinlinethumb.c
    CC ../py/asmarm.c
    CC ../py/emitnative.c
    CC ../py/formatfloat.c
    CC ../py/parsenumbase.c
    CC ../py/parsenum.c
    CC ../py/emitglue.c
    CC ../py/runtime.c
    CC ../py/runtime_utils.c
    CC ../py/nativeglue.c
    CC ../py/stackctrl.c
    CC ../py/argcheck.c
    CC ../py/warning.c
    CC ../py/map.c
    CC ../py/obj.c
    CC ../py/objarray.c
    CC ../py/objattrtuple.c
    CC ../py/objbool.c
    CC ../py/objboundmeth.c
    CC ../py/objcell.c
    CC ../py/objclosure.c
    CC ../py/objcomplex.c
    CC ../py/objdict.c
    CC ../py/objenumerate.c
    CC ../py/objexcept.c
    CC ../py/objfilter.c
    CC ../py/objfloat.c
    CC ../py/objfun.c
    CC ../py/objgenerator.c
    CC ../py/objgetitemiter.c
    CC ../py/objint.c
    CC ../py/objint_longlong.c
    CC ../py/objint_mpz.c
    CC ../py/objlist.c
    CC ../py/objmap.c
    CC ../py/objmodule.c
    CC ../py/objobject.c
    CC ../py/objpolyiter.c
    CC ../py/objproperty.c
    CC ../py/objnone.c
    CC ../py/objnamedtuple.c
    CC ../py/objrange.c
    CC ../py/objreversed.c
    CC ../py/objset.c
    CC ../py/objsingleton.c
    CC ../py/objslice.c
    CC ../py/objstr.c
    CC ../py/objstrunicode.c
    CC ../py/objstringio.c
    CC ../py/objtuple.c
    CC ../py/objtype.c
    CC ../py/objzip.c
    CC ../py/opmethods.c
    CC ../py/sequence.c
    CC ../py/stream.c
    CC ../py/binary.c
    CC ../py/builtinimport.c
    CC ../py/builtinevex.c
    CC ../py/modarray.c
    CC ../py/modbuiltins.c
    CC ../py/modcollections.c
    CC ../py/modgc.c
    CC ../py/modio.c
    CC ../py/modmath.c
    CC ../py/modcmath.c
    CC ../py/modmicropython.c
    CC ../py/modstruct.c
    CC ../py/modsys.c
    CC ../py/moduerrno.c
    CC ../py/modthread.c
    CC ../py/vm.c
    CC ../py/bc.c
    CC ../py/showbc.c
    CC ../py/repl.c
    CC ../py/smallint.c
    CC ../py/frozenmod.c
    CC ../py/../extmod/moductypes.c
    CC ../py/../extmod/modujson.c
    CC ../py/../extmod/modure.c
    CC ../py/../extmod/moduzlib.c
    CC ../py/../extmod/moduheapq.c
    CC ../py/../extmod/moduhashlib.c
    CC ../py/../extmod/modubinascii.c
    CC ../py/../extmod/virtpin.c
    CC ../py/../extmod/machine_mem.c
    CC ../py/../extmod/machine_pinbase.c
    CC ../py/../extmod/machine_pulse.c
    CC ../py/../extmod/machine_i2c.c
    CC ../py/../extmod/machine_spi.c
    CC ../py/../extmod/modussl_axtls.c
    CC ../py/../extmod/modussl_mbedtls.c
    CC ../py/../extmod/modurandom.c
    CC ../py/../extmod/modwebsocket.c
    CC ../py/../extmod/modwebrepl.c
    CC ../py/../extmod/modframebuf.c
    CC ../py/../extmod/fsusermount.c
    CC ../py/../extmod/vfs_fat.c
    CC ../py/../extmod/vfs_fat_ffconf.c
    CC ../py/../extmod/vfs_fat_diskio.c
    CC ../py/../extmod/vfs_fat_file.c
    CC ../py/../extmod/vfs_fat_lexer.c
    CC ../py/../extmod/vfs_fat_misc.c
    CC ../py/../extmod/utime_mphal.c
    CC ../py/../extmod/uos_dupterm.c
    CC ../py/../lib/embed/abort_.c
    CC ../py/../lib/utils/printf.c
    CC main.c
    CC gccollect.c
    LINK mpy-cross
    text data bss dec hex filename
    133884 792 904 135580 2119c mpy-cross

    The environment variable for esp-idf path is defined

    ~/esp32_B/pycom-micropython-sigfox/esp32$ echo $ESP_IDF_PATH
    /home/julien/esp32_B/pycom-esp-idf/

    When I'm trying to build the firmware I got the following error:

    ~/esp32_B/pycom-micropython-sigfox/esp32$ make BOARD=WIPY -j5 TARGET=boot
    Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
    CC bootloader/bootloader.c
    CC bootloader/bootmgr.c
    CC bootloader/mperror.c
    CC bootloader/gpio.c
    bootloader/gpio.c:14:23: fatal error: esp_types.h: No such file or directory
    compilation terminated.
    In file included from bootloader/bootloader.c:19:0:
    bootloader/bootloader.h:18:34: fatal error: esp_flash_data_types.h: No such file or directory
    compilation terminated.
    bootloader/mperror.c:18:29: fatal error: heap_alloc_caps.h: No such file or directory
    compilation terminated.
    bootloader/bootmgr.c:18:29: fatal error: heap_alloc_caps.h: No such file or directory
    compilation terminated.
    ../py/mkrules.mk:47: recipe for target 'build/WIPY/release/bootloader/gpio.o' failed
    make: *** [build/WIPY/release/bootloader/gpio.o] Error 1
    make: *** Attente des tâches non terminées....
    ../py/mkrules.mk:47: recipe for target 'build/WIPY/release/bootloader/bootmgr.o' failed
    make: *** [build/WIPY/release/bootloader/bootmgr.o] Error 1
    ../py/mkrules.mk:47: recipe for target 'build/WIPY/release/bootloader/bootloader.o' failed
    make: *** [build/WIPY/release/bootloader/bootloader.o] Error 1
    ../py/mkrules.mk:47: recipe for target 'build/WIPY/release/bootloader/mperror.o' failed
    make: *** [build/WIPY/release/bootloader/mperror.o] Error 1

    Does someone knows where the error could come from?



  • @robert-hh
    Hi, thank you for the answer, I think I missed something during the procedure because I tried again from scratch and it works perfectly.
    I think I forgot an environment variable as you propose.



  • @Arkaik It should be in pycom-esp-idf/components/esp32/include. Are you sue that you have set the environment variables right, like told in the README.md, https://github.com/pycom/pycom-micropython-sigfox, bottom section?



  • The file esp_types.h is missing. Look for it in the esp_idf tree and copy it to the micropython/esp32 folder. That's an old bug.


Log in to reply
 

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.