Failure Building Firmware 1.6.9.b1- Error 126 executing make -flash



  • Hello All,
    This is my first time through compiling the Firmware so I hope someone with experience doing this can give me some guidance since I've run into a wall. Following the instructions here: https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/README.md I did a fresh clone of pycom-esp-idf, installed and built toolchain, and did a fresh clone of pycom-micropython-sigfox.

    Error While Executing: make BOARD=LOPY LORA_BAND=USE_BAND_915 flash
    bash: ../mpy-cross/mpy-cross: Permission denied
    ../py/mkrules.mk:116: recipe for target 'build/LOPY/release/frozen_mpy/_boot.mpy' failed
    make: *** [build/LOPY/release/frozen_mpy/_boot.mpy] Error 126

    Following are all the details:

    Compiling on Ubuntu 16.04.

    Set Up Paths:

    rdixey@RND-SP3:~/workspace/pycom-esp/pycom-esp-idf$ echo $IDF_PATH
    /home/rdixey/workspace/pycom-esp/pycom-esp-idf
    rdixey@RND-SP3:~/workspace/pycom-esp/pycom-esp-idf$ . ${IDF_PATH}/add_path.sh
    Added to PATH: /home/rdixey/workspace/pycom-esp/pycom-esp-idf/components/esptool_py/esptool:/home/rdixey/workspace/pycom-esp/pycom-esp-idf/components/espcoredump:/home/rdixey/workspace/pycom-esp/pycom-esp-idf/components/partition_table/
    rdixey@RND-SP3:~/workspace/pycom-esp/pycom-esp-idf$ echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/rdixey/workspace/esp/xtensa-esp32-elf/bin:/home/rdixey/workspace/pycom-esp/pycom-esp-idf/components/esptool_py/esptool:/home/rdixey/workspace/pycom-esp/pycom-esp-idf/components/espcoredump:/home/rdixey/workspace/pycom-esp/pycom-esp-idf/components/partition_table/
    

    Ran: git submodule update --init - Appears to have completed successfully?

    rdixey@RND-SP3:~/workspace/pycom-esp/pycom-micropython-sigfox/esp32$ git submodule update --init
    Submodule 'lib/axtls' (https://github.com/pfalcon/axtls) registered for path '../lib/axtls'
    Submodule 'lib/berkeley-db-1.xx' (https://github.com/pfalcon/berkeley-db-1.xx) registered for path '../lib/berkeley-db-1.xx'
    Submodule 'lib/libffi' (https://github.com/atgreen/libffi) registered for path '../lib/libffi'
    Submodule 'lib/lwip' (http://git.savannah.gnu.org/r/lwip.git) registered for path '../lib/lwip'
    Cloning into 'lib/axtls'...
    remote: Counting objects: 2774, done.
    remote: Total 2774 (delta 0), reused 0 (delta 0), pack-reused 2774
    Receiving objects: 100% (2774/2774), 3.47 MiB | 4.46 MiB/s, done.
    Resolving deltas: 100% (2087/2087), done.
    Checking connectivity... done.
    Submodule path '../lib/axtls': checked out '67d27df4b5d097e146599fc4fb160a2adcbf5632'
    Cloning into '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
    Receiving objects: 100% (262/262), 331.56 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (121/121), done.
    Checking connectivity... done.
    Submodule path '../lib/berkeley-db-1.xx': checked out 'dab957dacddcbf6cbc85d42df62e189e4877bb72'
    Cloning into 'lib/libffi'...
    remote: Counting objects: 10883, done.
    remote: Compressing objects: 100% (12/12), done.
    remote: Total 10883 (delta 2), reused 0 (delta 0), pack-reused 10871
    Receiving objects: 100% (10883/10883), 6.84 MiB | 4.20 MiB/s, done.
    Resolving deltas: 100% (6766/6766), done.
    Checking connectivity... done.
    Submodule path '../lib/libffi': checked out 'e9de7e35f2339598b16cbb375f9992643ed81209'
    Cloning into 'lib/lwip'...
    remote: Counting objects: 42802, done.
    remote: Compressing objects: 100% (10809/10809), done.
    remote: Total 42802 (delta 32183), reused 41797 (delta 31499)
    Receiving objects: 100% (42802/42802), 7.97 MiB | 4.93 MiB/s, done.
    Resolving deltas: 100% (32183/32183), done.
    Checking connectivity... done.
    Submodule path '../lib/lwip': checked out '5b8b5d459e7dd890724515bbfad86c705234f9ec'
    

    Built bootloader and app for LoPy - They appear to have completed successfully?

    rdixey@RND-SP3:~/workspace/pycom-esp/pycom-micropython-sigfox/esp32$ make BOARD=LOPY -j5 LORA_BAND=USE_BAND_915 TARGET=boot
    Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
    mkdir -p build/LOPY/release/bootloader/
    CC bootloader/bootloader.c
    CC bootloader/bootmgr.c
    CC bootloader/mperror.c
    CC bootloader/gpio.c
    AR build/LOPY/release/bootloader/bootloader.a
    LINK build/LOPY/release/bootloader/bootloader.elf
       text	   data	    bss	    dec	    hex	filename
       5221	      8	   4112	   9341	   247d	build/LOPY/release/bootloader/bootloader.elf
    IMAGE build/LOPY/release/bootloader/bootloader.bin
    esptool.py v2.0-beta2
    rdixey@RND-SP3:~/workspace/pycom-esp/pycom-micropython-sigfox/esp32$ make BOARD=LOPY -j5 LORA_BAND=USE_BAND_915 TARGET=app clean
    Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
    rm -rf build/LOPY/release 
    

    Powered-off, installed jumper P2 to GND and power-on-reset before starting.
    While Executing make flash I get Error 116 - Any advice on how to resolve this greatly appreciated.

    rdixey@RND-SP3:~/workspace/pycom-esp/pycom-micropython-sigfox/esp32$ make BOARD=LOPY LORA_BAND=USE_BAND_915 flash
    Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
    mkdir -p build/LOPY/release/genhdr
    Create build/LOPY/release/genhdr/pins.h
    Generating build/LOPY/release/genhdr/mpversion.h
    GEN build/LOPY/release/genhdr/qstr.i.last
    GEN build/LOPY/release/genhdr/qstr.split
    GEN build/LOPY/release/genhdr/qstrdefs.collected.h
    QSTR updated
    GEN build/LOPY/release/genhdr/qstrdefs.generated.h
    mkdir -p build/LOPY/release/build/LOPY/release/
    mkdir -p build/LOPY/release/drivers/sx127x/sx1272/
    mkdir -p build/LOPY/release/fatfs/src/
    mkdir -p build/LOPY/release/fatfs/src/drivers/
    mkdir -p build/LOPY/release/fatfs/src/option/
    mkdir -p build/LOPY/release/ftp/
    mkdir -p build/LOPY/release/hal/
    mkdir -p build/LOPY/release/lib/fatfs/
    mkdir -p build/LOPY/release/lib/fatfs/option/
    mkdir -p build/LOPY/release/lib/libm/
    mkdir -p build/LOPY/release/lib/lora/mac/
    mkdir -p build/LOPY/release/lib/lora/system/
    mkdir -p build/LOPY/release/lib/lora/system/crypto/
    mkdir -p build/LOPY/release/lib/mp-readline/
    mkdir -p build/LOPY/release/lib/netutils/
    mkdir -p build/LOPY/release/lib/utils/
    mkdir -p build/LOPY/release/lora/
    mkdir -p build/LOPY/release/mods/
    mkdir -p build/LOPY/release/py/
    mkdir -p build/LOPY/release/py/../extmod/
    mkdir -p build/LOPY/release/py/../lib/embed/
    mkdir -p build/LOPY/release/stmhal/
    mkdir -p build/LOPY/release/telnet/
    mkdir -p build/LOPY/release/util/
    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
    MPY frozen/_boot.py
    bash: ../mpy-cross/mpy-cross: Permission denied
    ../py/mkrules.mk:116: recipe for target 'build/LOPY/release/frozen_mpy/_boot.mpy' failed
    make: *** [build/LOPY/release/frozen_mpy/_boot.mpy] Error 126
    rdixey@RND-SP3:~/workspace/pycom-esp/pycom-micropython-sigfox/esp32$ 
    


  • @Colateral Did you build mpy-cross? It is the Python byte code compiler needed in the build process. to do that, do to micopython/mpy-cross and issue:
    make mpy-cross
    then got back to microypthon/esp32 and retry the build. If it fails at the step, when loading into the device, the access rights for the port may be wrong. You can then either run under sudo, or put your account into the dialout group with:
    sudo addgroup <yourname> dialout



  • @rdixey I have the same problem. Do you have some workaround?



  • @rdixey
    don't do make BOARD=LOPY -j5 TARGET=app clean but just make BOARD=LOPY -j5 TARGET=app



  • @robert-hh Well that certainly was a problem. Thanks:~) Honestly I had done the mpy-cross - make all yesterday and did not notice an error while compiling. But on your point I went back and found there was no mpy-cross executable file in the mpy-cross folder. So i did the make twice more until the mpy-cross executable appeared. Weird?

    Now when I do: make BOARD=LOPY LORA_BAND=USE_BAND_915 flash
    I get much farther but error again while compiling as follows:
    Any suggestions.

    CC util/mpexception.c
    CC util/fifo.c
    CC util/socketfifo.c
    CC util/mpirq.c
    CC util/mpsleep.c
    CC util/timeutils.c
    CC telnet/telnet.c
    CC ftp/ftp.c
    CC ftp/updater.c
    CC build/LOPY/release/pins.c
    AR build/LOPY/release/application.a
    CPP build/LOPY/release/esp32_out.ld
    LINK build/LOPY/release/application.elf
       text	   data	    bss	    dec	    hex	filename
     966441	 169804	  73640	1209885	 12761d	build/LOPY/release/application.elf
    Building partitions from lib/partitions.csv...
    IMAGE build/LOPY/release/lopy_915.bin
    esptool.py v2.0-beta2
    Signing OTA image
    make: *** No rule to make target 'build/LOPY/release/bootloader/bootloader.bin', needed by 'flash'.  Stop.
    


  • @rdixey

    I'm sorry didn't notice you wrote that already!

    So you built mpy-cross but it's saying permission denied. Can you check it's permissions, i.e. it's executable and if the user is right etc?

    ls -l ../mpy-cross/mpy-cross should do it



  • @jmarcelino Yes - Thats exactly what I have been following to get this far.



  • Read the ESP32 specific README, it's all there :-)

    https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/README.md

    First step.



  • @rdixey mpy-cross is missing. This is the Python compiler.
    If you're in esp32, go to ../mpy-cross and execute the command:
    make all
    after that, got back to ../esp32 and execute
    make BOARD=LOPY LORA_BAND=USE_BAND_915 flash


Log in to reply
 

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