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

    No console output in PyMakr whatsoever

    Scheduled Pinned Locked Moved WiPy 2&3
    19 Posts 2 Posters 1.1k 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.
    • techykermitT Offline
      techykermit @robert-hh
      last edited by

      @robert-hh I cannot run any commands on the WiPy (it is a WiPy 3). I can open the window to run commands, but the keyboard does not let me type anything.

      I erased all the device content using the firmware updater... or so I thought. What else could the "Erase during flash" option mean?
      Well, with an "erased" WiPy and new firmware, I still got this as the output from your script:

      >>> import uos
      >>> uos.getfree("")
      4066
      >>> for e in uos.ilistdir():
      ...         print("%20s %6d" %(e[0], e[3]))
      ...
                   main.py     34
                       sys      0
                       lib      0
                      cert      0
                   boot.py     29
      

      So, what I do next is to attempt with os.mkfs("/flash"). Got a strange error:

      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      AttributeError: 'module' object has no attribute 'mkfs'
      

      This usually doesn´t happen, it should work fine.

      Any ideas of what I can do?

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

        @techykermit You do not need mkfs after erase & upload. That re-creates the file system. Now you can go on again with uploading your code. Please note, that the REPL prompt only responds after main.py finished. so if you have code in main.py which continues to ruin. you will not get a prompt.

        techykermitT 1 Reply Last reply Reply Quote 0
        • techykermitT Offline
          techykermit @robert-hh
          last edited by

          @robert-hh Uploading my code gives the same errors as described earlier (no console output and the second last file fails to upload). I do not understand why, since my project is only 49kb.

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

            @techykermit WiPy2, SiPy and Lopy all have limited RAM. A source code file of 49k may fail on importing/uploading. You could try to pre-compile the files on your computer with mpy-cross and upload the compiled versions.
            Problem: the mpy-cross executable is not published by Pycom. And with today's release they changed the format. So mpy-cross versions that are out ther will not work. Which operating system are you using on you computer?

            techykermitT 1 Reply Last reply Reply Quote 0
            • techykermitT Offline
              techykermit @robert-hh
              last edited by techykermit

              @robert-hh I am running Windows 10. Also, I am trying with a WiPy 3. Is MPy-cross compatible with version 1.18.0 (legacy)? In that case, I can just downgrade for now, if you are expecting support for it to be carried on to the newer firmware in the future.

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

                @techykermit Wipy3 should has sufficient RAM. The mpy-cross version I have here https://github.com/robert-hh/Shared-Stuff should work with v1.18.0. Filename mpy-cross_pycom.exe
                Edit: as crosscheck when having trouble with pymakr youj should always confirm with a simple console like putty, that not pymakr is the source of trouble.

                techykermitT 2 Replies Last reply Reply Quote 0
                • techykermitT Offline
                  techykermit @robert-hh
                  last edited by

                  @robert-hh said in No console output in PyMakr whatsoever:

                  Edit: as crosscheck when having trouble with pymakr youj should always confirm with a simple console like putty, that not pymakr is the source of trouble.

                  I am talking to my device via the COM port. Does Putty work with interacting with the device that way? (Probably dumb question, but I have never sent any commands to a Pycom outside PyMakr. Thonny IDE didn´t detect my Pycom either.)

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

                    @techykermit Yes, Putty is made for that. Take care to set the flow control option in Putty to None.
                    Meanwhile I was able to build a version of mpy-cross.exe for today's release. name: mpy-cross_pycom_v4.exe

                    1 Reply Last reply Reply Quote 0
                    • techykermitT Offline
                      techykermit @robert-hh
                      last edited by techykermit

                      @robert-hh Converting all the files to .mpy does not make any difference at all. The original issue still persists.

                      PuTTY gives the same output as PyMakr.

                      robert-hhR 2 Replies Last reply Reply Quote 0
                      • robert-hhR Offline
                        robert-hh @techykermit
                        last edited by

                        @techykermit What happens if you push Ctrl-F? That should force a safe boot.

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

                          @techykermit Maybe you should shoe more of your code. Because what is above should not cause any harm.

                          techykermitT 1 Reply Last reply Reply Quote 0
                          • techykermitT Offline
                            techykermit @robert-hh
                            last edited by

                            @robert-hh Yes. As I am developing a production application, I want to disclose as little as possible.

                            My code seems to run fine on the board, I have everything mapped to LED colors. I am just not getting any print output.

                            Ctrl+F in PyMakr doesn´t work (maps to the Find function in VS Code). Trying with PuTTY, it does nothing.
                            I have an Expansion Board 3.0, can I press the "Safe Boot" button on it? I assume that will safe boot it, but when I have tried, nothing really happens.

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

                              @techykermit Do you re-map or reconfigure UART0? Or do you use uos.dupterm() to reconfigure the standard output?

                              techykermitT 1 Reply Last reply Reply Quote 0
                              • techykermitT Offline
                                techykermit @robert-hh
                                last edited by techykermit

                                @robert-hh No, unless one of the libraries I am using does that.
                                Obviously I don´t expect you to look through them, I can do that tomorrow, but here is a list of everything I currently have in the lib folder:

                                • os (from the MicroPython repository on GitHub)
                                • The umqtt/simple library (from the MicroPython repository on GitHub)
                                • The dth.py library from https://forum.pycom.io/topic/1172/pure-python-library-for-reading-dht-sensor-on-pycom-boards
                                • My own internal libraries which do not reconfigure any output or UART0.
                                • PyCom´s OneWire library
                                • pkg_resources (from the MicroPython repository on GitHub)
                                • ulogging (from the MicroPython repository on GitHub)
                                • urequests (from the MicroPython repository on GitHub)
                                robert-hhR 1 Reply Last reply Reply Quote 0
                                • robert-hhR Offline
                                  robert-hh @techykermit
                                  last edited by

                                  @techykermit Unless you use them, they do not harm. But for what purpose do you have the os module? That is intended for the Unix port. On a micro, you should use uos, which has os as it's alias.

                                  techykermitT 1 Reply Last reply Reply Quote 0
                                  • techykermitT Offline
                                    techykermit @robert-hh
                                    last edited by techykermit

                                    @robert-hh I removed the os module and now everything seems to work fine. Thank you so much for actually taking time and helping out :))

                                    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