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

    W01 (2.0 equivalent) not executing boot.py and main.py

    Scheduled Pinned Locked Moved WiPy 2&3
    w01boot.pymain.py
    8 Posts 4 Posters 1.3k Views 4 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.
    • E Offline
      Euphorbia
      last edited by

      I recently bought a W01, which should be equivalent to the wipy 2.0. I integrated it and it works fine, except it never executes the boot.py and main.py on startup. I can execute them myself from the REPL with execfile without issues. It should not be safebooting, P12 is connected to ground.

      I've tried resetting the device with machine.reset(), using only a minimal boot.py (just turning off the wifi), and connecting outside of pymakr. Neither file is ever executed automatically, even though they're present.

      Running everything manually is getting very tiresome, any help is appreciated.

      1 Reply Last reply Reply Quote 0
      • danD Offline
        dan
        last edited by

        Hi @Euphorbia,

        Which firmware version do you have (run os.uname() in REPL)? Are you sure the files are uploaded to the board? Could you upload your boot.py?

        1 Reply Last reply Reply Quote 0
        • E Offline
          Euphorbia
          last edited by

          I'm sure the file is uploaded, because I can input execfile('boot.py') into the REPL, and it will work. I've tried a lot of different files, some just consisting of a print command or turning the wifi off. For example:

          from network import WLAN
          wlan = WLAN()
          wlan.deinit()
          print("thisisboot")

          When I run this with the execfile command, the wifi is turned of and the message is printed, but neither happens on boot.

          Here's the os.uname() output:

          (sysname='WiPy', nodename='WiPy', release='1.7.0.b1', version='v1.8.6-621-g17ee404e on 201
          7-05-25', machine='WiPy with ESP32')

          I tried updating the firmware with the tool, but I think it's not meant for the W01, as it says the packet header is invalid.

          robert-hhR 1 Reply Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @Euphorbia
            last edited by

            @euphorbia I do not have a W01, but updating through UART0 should be possible, if you connect P2 to GND and reset the device, like using expansion board 2. You can verify download more by open the terminal with REPL and then reset while P" is connected to GND. You should see a message like:

            rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
            waiting for download
            

            I am pretty confident the you checked P12 to be really and GND level.

            E 1 Reply Last reply Reply Quote 0
            • E Offline
              Euphorbia @robert-hh
              last edited by

              @robert-hh Thanks, I'll try updating via UART, hadn't tried that yet.

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

                @euphorbia I am having the same problem with my Pytrack (with WiPy) not executing boot.py or main.py on start up but being able to execute the files using the execfile() command. My system (same as what you posted):

                (sysname='WiPy', nodename='WiPy', release='1.7.0.b1', version='v1.8.6-621-g17ee404e on 2017-05-25', machine='WiPy with ESP32')
                

                Did you ever get your system to work?

                danD 1 Reply Last reply Reply Quote 0
                • danD Offline
                  dan @alexpul
                  last edited by

                  Hi @alexpul 👋

                  Could you update your firmware to the latest version? (v1.18.1.r1) Have you tried running just a simple example (e.g. changing LED) to see if that works?

                  A 1 Reply Last reply Reply Quote 0
                  • A Offline
                    alexpul @dan
                    last edited by

                    @dan Updating the firmware fixed the problem! Both main.py and boot.py run on restart. Thank you :)

                    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