Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Custom firmware error: cannot execute binary file: Exec format error

    Scheduled Pinned Locked Moved Discussion
    3 Posts 2 Posters 27 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      Anthony Leung
      last edited by

      Hi, I am experiencing issues with using the pycom-micropython-sigfox library to build a custom firmware. I've created an issue ticket on github but would like to post it here in search for someone knowing a resolve here or could benefit from this when searching for the same problem. https://github.com/pycom/pycom-micropython-sigfox/issues/601

      Original Information

      Running into errors when building custom firmware and found no resolve in the issues forum. Could I please get some assistance?

      • Pycom board: FiPy

      • Firmware: (sysname='FiPy', nodename='FiPy', release='1.20.2.r6', version='v1.11-c5a0a97 on 2021-10-28', machine='FiPy with ESP32', lorawan='1.0.2', sigfox='1.0.1', pybytes='1.7.1')

      • Operating system: Linux raspberrypi 5.10.17-v7+ #1414 SMP Fri Apr 30 13:18:35 BST 2021 armv7l GNU/Linux

      • Exact steps to cause this issue

        1. I completed the setup as per instructed in README file.
        2. Then tried to build the firmware with make BOARD=FIPY clean - no problems there
        3. Then I tried to run make BOARD=FIPY which yielded the error below
      • What you expected

        • I expected the firmware to successfully build however this was not the case.
      • What happened instead

        • Instead I got the following error:
      $ make BOARD=FIPY V=1 
      Use make SECURE=on [optionally SECURE_KEY ?= secure_boot_signing_key.pem] to enable Secure Boot and Flash Encryption mechanisms.
      COAP Module Enabled
      LORA Module Enabled
      SIGFOX Module Enabled
      Variant: BASE
      bash tools/idfVerCheck.sh /home/pi/pycom-esp-idf "3394ee5"
      IDF Version OK! 3394ee5
      bash tools/mpy-build-check.sh FIPY release BASE
      python check_secure_boot.py --SECURE off
      CC bootloader/bootloader.c
      xtensa-esp32-elf-gcc -DESP_PLATFORM -Wpointer-arith -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wl,-EL -mlongcalls -Wall -ffunction-sections -fdata-sections -fno-common -Wno-sign-compare -Wno-old-style-declaration -fstrict-volatile-bitfields -Wno-error=deprecated-declarations -Wno-unused-parameter -DWITH_POSIX  -mfix-esp32-psram-cache-issue -Os -nostdlib -std=gnu99 -g3 -ggdb -fstrict-volatile-bitfields -Iboards/FIPY -DFFCONF_H=\"lib/oofatfs/ffconf.h\"  -DMOD_COAP_ENABLED -DMOD_LORA_ENABLED -DMOD_SIGFOX_ENABLED -I. -I.. -Ihal -Iutil -Imods -Itelnet -Iftp -Ilora -Ilte -Ican -Ibootloader -Ifatfs/src/drivers -Ilittlefs -Ibuild/FIPY/release -Ibuild/FIPY/release/genhdr -I/home/pi/pycom-esp-idf/components/bootloader_support/include -I/home/pi/pycom-esp-idf/components/bootloader_support/include_priv -I/home/pi/pycom-esp-idf/components/bootloader_support/include_bootloader -I/home/pi/pycom-esp-idf/components/mbedtls/mbedtls/include -I/home/pi/pycom-esp-idf/components/mbedtls/port/include -I/home/pi/pycom-esp-idf/components/driver/include -I/home/pi/pycom-esp-idf/components/driver/include/driver -I/home/pi/pycom-esp-idf/components/heap/include -I/home/pi/pycom-esp-idf/components/esp32 -I/home/pi/pycom-esp-idf/components/esp32/include -I/home/pi/pycom-esp-idf/components/esp_ringbuf/include -I/home/pi/pycom-esp-idf/components/esp_event/include -I/home/pi/pycom-esp-idf/components/esp_adc_cal/include -I/home/pi/pycom-esp-idf/components/soc/include -I/home/pi/pycom-esp-idf/components/soc/esp32/include -I/home/pi/pycom-esp-idf/components/expat/include -I/home/pi/pycom-esp-idf/components/freertos/include -I/home/pi/pycom-esp-idf/components/json/include -I/home/pi/pycom-esp-idf/components/expat/include -I/home/pi/pycom-esp-idf/components/lwip/include/lwip -I/home/pi/pycom-esp-idf/components/lwip/include/lwip/port -I/home/pi/pycom-esp-idf/components/lwip/include/apps -I/home/pi/pycom-esp-idf/components/lwip/port/esp32/include -I/home/pi/pycom-esp-idf/components/lwip/lwip/src/include -I/home/pi/pycom-esp-idf/components/lwip/include/lwip/posix -I/home/pi/pycom-esp-idf/components/newlib/include -I/home/pi/pycom-esp-idf/components/newlib/platform_include -I/home/pi/pycom-esp-idf/components/nvs_flash/include -I/home/pi/pycom-esp-idf/components/spi_flash/include -I/home/pi/pycom-esp-idf/components/tcpip_adapter/include -I/home/pi/pycom-esp-idf/components/log/include -I/home/pi/pycom-esp-idf/components/sdmmc/include -I/home/pi/pycom-esp-idf/components/vfs/include -I/home/pi/pycom-esp-idf/components/bt/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/device/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/device/include/device -I/home/pi/pycom-esp-idf/components/bt/bluedroid/bta/dm -I/home/pi/pycom-esp-idf/components/bt/bluedroid/bta/hh -I/home/pi/pycom-esp-idf/components/bt/bluedroid/bta/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/bta/sys/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/common/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/stack/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/stack/gatt/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/stack/gap/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/stack/l2cap/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/btcore/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/osi/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/hci/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/gki/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/api/include -I/home/pi/pycom-esp-idf/components/bt/bluedroid/btc/include -I/home/pi/pycom-esp-idf/components/coap/libcoap/include/coap -I/home/pi/pycom-esp-idf/components/coap/libcoap/examples -I/home/pi/pycom-esp-idf/components/coap/port/include -I/home/pi/pycom-esp-idf/components/coap/port/include/coap -I/home/pi/pycom-esp-idf/components/mdns/include -I../lib/mp-readline -I../lib/netutils -I../lib/oofatfs -I../lib -I../drivers/sx127x -I../ports/stm32 -I/home/pi/pycom-esp-idf/components/openthread/src -Ibsdiff -DMICROPY_NLR_SETJMP=1 -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -DESP_PLATFORM -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -DWITH_POSIX -DREGION_AS923 -DREGION_AU915 -DREGION_EU868 -DREGION_US915 -DREGION_CN470 -DREGION_EU433 -DREGION_IN865 -DBASE=0 -DPYBYTES=1  -DVARIANT=0 -DNDEBUG -D BOOTLOADER_BUILD=1 -c -MD -o build/FIPY/release/bootloader/bootloader.o bootloader/bootloader.c
      bash: /home/pi/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc: cannot execute binary file: Exec format error
      make: *** [../py/mkrules.mk:47: build/FIPY/release/bootloader/bootloader.o] Error 126
      
      
      L 1 Reply Last reply Reply Quote 0
      • L Offline
        livius @Anthony Leung
        last edited by livius

        @Anthony-Leung
        Hi, why did you write???
        Operating system: Linux raspberrypi 5.10.17-v7+ #1414 SMP Fri Apr 30 13:18:35 BST 2021 armv7l GNU/Linux

        Do you try to build this firmware on raspberrypi?
        If yes, try first to build on some more common system, if there will be ok, then probably not supported on rpi

        think about people first, then computers

        1 Reply Last reply Reply Quote 0
        • A Offline
          Anthony Leung
          last edited by Anthony Leung

          Hi @livius, thank you for pointing that out.

          Yes I had been running on RaspberryPi thinking it would be better than running on a substystem for Linux. I was initially struggling with using Windows Subsystem for Linux (WSL) and following the instructions listed on github. I had extracted the xtensa gcc compiler tar.gz file incorrectly, by using WinRAR onto my Ubuntu file system - this must've corrupted some of the data.

          This time, I copied the tar.gz file into the Ubuntu file system and extracted it using Linux commands, the process had run smoothly and I was able to build a binary file.

          Thank you very much!

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post

          Pycom on Twitter

          Pycom