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

    Open source Licence

    Scheduled Pinned Locked Moved Announcements & News
    27 Posts 9 Posters 17.2k Views 9 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.
    • T Offline
      thibault
      last edited by

      Nice news!

      1 Reply Last reply Reply Quote 1
      • L Offline
        LoneTech
        last edited by LoneTech

        Great news! I've cloned a copy and managed to build what appears to be a LoPy firmware.

        Rough steps performed:
        Get ESP32 compiler toolchain per instructions at https://github.com/pycom/pycom-esp-idf/blob/master/docs/linux-setup.rst (there exist instructions for other platforms too), adding commands xtensa-esp32-elf-gcc etc to PATH
        Cloned Pycom's IDF and micropython repositories, setting export IDF_PATH=~/LoPy/pycom-esp-idf (adjust path to where you placed it)
        Enter micropython repo directory for ESP32: cd pycom-micropython/esp32/
        Workaround for unexpected Makefile behaviour: ln -s ../lib bootloader/lib (this shouldn't be needed, probably should change -Lbootloader/lib to -Llib in Makefile, alternatively make sure it builds bootloader variants of libraries)
        Build firmware: make BOARD=LOPY LORA_BAND=USE_BAND_868
        New firmware is saved in build/LOPY/release/appimg.bin

        A warning produced by the build suggests that it did newline conversion on a PDF. That's going to end badly as it's a binary format, though it's a packaging issue and doesn't affect building the firmware itself.

        Looking good so far, though it'll take a little while to find where I can touch it up. Expect a pull request or two in the future. :)

        P.S. After curl --disable-epsv --ftp-pasv -T build/LOPY/release/appimg.bin ftp://micro:python@ESP_00C2C6//flash/sys/appimg.bin my LoPy said MicroPython e2cc46a-dirty on 2016-11-15; LoPy with ESP32 :)

        F L B N 4 Replies Last reply Reply Quote 3
        • F Offline
          Fred administrators @LoneTech
          last edited by

          @LoneTech Great stuff! Have fun!

          1 Reply Last reply Reply Quote 0
          • X Offline
            Xykon administrators
            last edited by

            In case anyone finds it helpful I mirrored the html docs from esp-idf on my webserver at https://www.tiny-dev.com/esp32/

            Christian Ehlers

            1 Reply Last reply Reply Quote 2
            • L Offline
              livius @LoneTech
              last edited by

              @LoneTech
              If you or someone have same guide for Windows :)

              think about people first, then computers

              X 1 Reply Last reply Reply Quote 0
              • X Offline
                Xykon administrators @livius
                last edited by

                @livius said in Open source Licence:

                @LoneTech
                If you or someone have same guide for Windows :)

                https://www.tiny-dev.com/esp32/windows-setup.html

                Christian Ehlers

                1 Reply Last reply Reply Quote 0
                • L Offline
                  livius
                  last edited by

                  It is incompleat
                  i do not see something like this in documentation
                  make BOARD=LOPY LORA_BAND=USE_BAND_868
                  as was posted by @LoneTech

                  and something like

                  After curl --disable-epsv --ftp-pasv -T build/LOPY/release/appimg.bin ftp://micro:python@ESP_00C2C6//flash/sys/appimg.bin my LoPy said MicroPython e2cc46a-dirty on 2016-11-15; LoPy with ESP32 :)
                  

                  think about people first, then computers

                  1 Reply Last reply Reply Quote 0
                  • X Offline
                    Xykon administrators
                    last edited by

                    make BOARD=LOPY LORA_BAND=USE_BAND_868

                    It's identical under all OS. Read Makefile and application.mk in the pycom-micropython/esp32 folder.

                    curl with these specific options is used as a command line ftp client. You can just as well use FileZilla following the instructions at https://docs.pycom.io/lopy/lopy/general.html#upgrading-the-firmware-over-the-air

                    Christian Ehlers

                    1 Reply Last reply Reply Quote 2
                    • L Offline
                      livius
                      last edited by livius

                      this should be in documentation. Reading script file is bad way for starters ;-)
                      but now it is clear

                      curl with these specific options is used as a command line ftp client
                      ah i see, he only copy image file throught ftp
                      i did not read whole line carefully - but it was so simple
                      when i saw curl i have stoped reading ;-)

                      think about people first, then computers

                      1 Reply Last reply Reply Quote 1
                      • L Offline
                        livius
                        last edited by

                        thank you for help
                        i now have make WIPI bin file
                        and i am ready to make some pull requests :)

                        think about people first, then computers

                        1 Reply Last reply Reply Quote 0
                        • B Offline
                          brotherdust @LoneTech
                          last edited by

                          @LoneTech Thanks for the instructions. I was able to successfully build on my Windows 10 box using Bash on Ubuntu on Windows. =) heh.

                          B 1 Reply Last reply Reply Quote 0
                          • B Offline
                            brotherdust @brotherdust
                            last edited by

                            @brotherdust said in Open source Licence:

                            @LoneTech Thanks for the instructions. I was able to successfully build on my Windows 10 box using Bash on Ubuntu on Windows. =) heh.

                            So, yeah. It might have built successfully, but I can't get the LoPy to take it. Argh. Here's the CLI output:

                            $ curl --disable-epsv --ftp-pasv -T "build/LOPY/release/appimg.bin" ftp://micro:python@10.192.5.64//flash/sys/appimg.bin
                              % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                                             Dload  Upload   Total   Spent    Left  Speed
                             31  819k    0     0   31  256k      0   530k  0:00:01 --:--:--  0:00:01  534k
                            curl: (55) Send failure: Broken pipe
                            

                            I think it's because the firmware file is too big. The one I compiled is ~820KB, but the official releases are weighing in around ~631KB. Is it possible this is the cause?

                            L 1 Reply Last reply Reply Quote 0
                            • L Offline
                              LoneTech @brotherdust
                              last edited by LoneTech

                              @brotherdust Unlikely; the firmware partitions are 1M large, and your transfer stopped at 256k. OTA updating isn't quite 100% for me; not sure if that readonly flash bug is reoccurring or what, but doing a serial download tends to clear it. Also, on the firmware versions with the watchdog bug OTA almost always triggers that.

                              1 Reply Last reply Reply Quote 0
                              • N Offline
                                nickparrin @LoneTech
                                last edited by nickparrin

                                Keep getting an error like this:

                                developer@developer:~/esp32/pycom-micropython/esp32$ make BOARD=LOPY LORA_BAND=USE_BAND_868
                                LINK build/LOPY/release/bootloader/bootloader.elf
                                xtensa-esp32-elf-gcc -nostdlib -Wl,-Map=build/LOPY/release/bootloader/bootloader.map -Wl,--no-check-sections -u call_user_start_cpu0 -Wl,-static -Wl,--undefined=uxTopUsedPriority -Wl,--gc-sections -T esp32.bootloader.ld -T esp32.rom.ld -T esp32.peripherals.ld -Wl,--start-group -Llib -L/home/developer/esp32/pycom-esp-idf/components/esp32/ld -Lbuild/LOPY/release/bootloader -L/home/developer/esp32/pycom-esp-idf/components/esp32/lib -Lbootloader -llog -lcore -lspi_flash build/LOPY/release/bootloader/bootloader.a -Wl,--end-group -Wl,-EL -o build/LOPY/release/bootloader/bootloader.elf
                                /home/developer/esp32/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/4.8.5/../../../../xtensa-esp32-elf/bin/ld: cannot find -lcore
                                collect2: error: ld returned 1 exit status
                                application.mk:274: recipe for target 'build/LOPY/release/bootloader/bootloader.elf' failed
                                make: *** [build/LOPY/release/bootloader/bootloader.elf] Error 1
                                

                                I set the IDF_PATH and added gcc to PATH. Tried with the ln command, and without by editing the Makefile directly

                                EDiT: fixed it thanks to daniel. I missed to import (inside pycom idf) the needed compontents:

                                • git submodule update --init
                                1 Reply Last reply Reply Quote 1
                                • L Offline
                                  livius
                                  last edited by

                                  Will be good to see port of this
                                  https://github.com/micropython/micropython/pull/2091/files
                                  and also enable time_us() which is currently commented out in the code
                                  but i suppose it is limited by some esp32 IDF? and because of this is commented out?
                                  https://github.com/pycom/pycom-micropython/blob/master/esp32/mods/modutime.c

                                  think about people first, then computers

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    daniel
                                    last edited by

                                    @livius yes, machine.time_pulse_us() is very useful and we will implement it for the ESP32. A number of function in the time module are incomplete due to previous limitations of the IDF. The plan is to get back to that and implement them in early January.

                                    Cheers,
                                    Daniel

                                    L 1 Reply Last reply Reply Quote 0
                                    • L Offline
                                      livius @daniel
                                      last edited by

                                      @daniel
                                      thank you for the info - especially about time frame

                                      think about people first, then computers

                                      1 Reply Last reply Reply Quote 0
                                      • L Offline
                                        livius
                                        last edited by

                                        @daniel
                                        Can i ask what is IRAM_ATTR in functions declaration?

                                        think about people first, then computers

                                        1 Reply Last reply Reply Quote 1
                                        • D Offline
                                          daniel
                                          last edited by

                                          @livius that's needed in order to place functions inside the instruction RAM of the ESP32. Otherwise they will reside in flash, which means that they need to be fetched from the SPI flash everytime there's a cache miss. Time critical functions must be placed inside IRAM, as well as interrupt handlers.

                                          L 1 Reply Last reply Reply Quote 1
                                          • L Offline
                                            livius @daniel
                                            last edited by

                                            @daniel
                                            Thank you very much :)
                                            I still analyze repo (and learn C which is not my language) and need to understand internals until i change something on my side.

                                            think about people first, then computers

                                            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
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            Pycom on Twitter

                                            Pycom