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

    [SOLVED] Firmware 1.7.8 build failed when flashing firmware on linux.

    Scheduled Pinned Locked Moved Firmware
    esp32
    4 Posts 3 Posters 2.0k Views 3 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.
    • Y Offline
      yahia
      last edited by jmarcelino

      Hello,

      I have an issue with building the latest firwmare 1.7.8. I follow all the instructions on the github readme and I installed this version of the toolchain: https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz

      Everything runs great except the last step when running flash command

      make BOARD=LOPY -j5 LORA_BAND=USE_BAND_868 flash 
      

      I get permission denied which is expected because I want to access serial communication

      esptool.py v2.0.1
      Traceback (most recent call last):
        File "/home/yahia/micropython/pycom-esp-idf/components/esptool_py/esptool/esptool.py", line 2412, in <module>
          _main()
        File "/home/yahia/micropython/pycom-esp-idf/components/esptool_py/esptool/esptool.py", line 2405, in _main
          main()
        File "/home/yahia/micropython/pycom-esp-idf/components/esptool_py/esptool/esptool.py", line 2134, in main
          esp = chip_class(args.port, initial_baud)
        File "/home/yahia/micropython/pycom-esp-idf/components/esptool_py/esptool/esptool.py", line 175, in __init__
          self._port = serial.serial_for_url(port)
        File "/home/yahia/.local/lib/python2.7/site-packages/serial/__init__.py", line 88, in serial_for_url
          instance.open()
        File "/home/yahia/.local/lib/python2.7/site-packages/serial/serialposix.py", line 268, in open
          raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
      serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/tt
      yUSB0'
      application.mk:382: recipe for target 'flash' failed
      make: *** [flash] Error 1
      

      However when I run the same command with sudo i get this error:

      python ../py/makeversionhdr.py build/LOPY_868/release/genhdr/mpversion.h
      make: *** No rule to make target '/components/esp32/ld/esp32.ld', needed by 'build/LOPY_868/release/esp32_out.ld'.  Stop.
      make: *** Waiting for unfinished jobs....
      

      Does anyone know why this happens? Maybe I am missing a step.

      Thank you.

      Yahia

      J J 2 Replies Last reply Reply Quote 0
      • J Offline
        jmarcelino @yahia
        last edited by

        @yahia
        I think when you sudo-ed you lost your IDF_PATH environment variable (which points to pycom-esp-idf )

        I'd recommend simply having permissions on your tty device to include your regular user. For example on Ubuntu this means adding yourself to group dialout:

        sudo adduser $USER dialout

        Y 1 Reply Last reply Reply Quote 0
        • Y Offline
          yahia @jmarcelino
          last edited by

          @jmarcelino Works great! Thank you very much sir.

          1 Reply Last reply Reply Quote 0
          • J Offline
            jcaron @yahia
            last edited by

            @yahia another option (if you have WiFi enabled) is just to copy the generated appimg.bin into /flash/sys using FTP.

            1 Reply Last reply Reply Quote 1

            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