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

    Testing modules without uploading to µC

    Scheduled Pinned Locked Moved Comments & Feedback
    3 Posts 3 Posters 53 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.
    • F Offline
      Felix Siegmeier
      last edited by

      I'm using pymakr for VSCode and looking for a way to test my modules without uploading them manually to the Microcontroller after every single change.
      i use rshell from within the VSCode-Console to upload my module to the ESP32 because the "Upload"-Button uploads all Files and Folders of my entire workspace.
      Unfortunately the module needs to be on the µC for using/testing it (while in opposite the main.py can be run from REPL).
      It's very anoying, to disconnect board, rshell into board, maneuver to the right directory und cp to the µC.
      Is there any other/ faster way?

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

        @Felix-Siegmeier You can use pyboard.py to run a file on the target device without copying it to the target file system: https://github.com/micropython/micropython/blob/master/tools/pyboard.py
        pyboard.py is also used by rshell and another nice not-yet-published tool mpr.py: https://github.com/micropython/micropython/pull/6375

        Use pyboard.py --help for short usage hints. For mpr.py, look at the PR.

        Just running a script would by:

        pyboard.py -d DEVICE <script_name>

        or

        mpr connect <device> run <script_name>

        There are short cuts for the connect part, like u0 for connect /dev/ttyUSB0

        1 Reply Last reply Reply Quote 3
        • T Offline
          thibault @Felix Siegmeier
          last edited by thibault

          @Felix-Siegmeier i have recently found a netrc file for upload easy (by ftp). Extract of the netrc file (wich called "NETRC_UPLOAD" on my computer) :

          machine 192.168.4.1 login micro password python
          macdef init
          cd /flash
          put circuit.mpy
          put commande.mpy
          put main.py
          mkdir lib
          put lib/logging.mpy
          

          And for use this file with ftp (tnftp) use the following command (run for me):

          ftp -N NETRC_UPLOAD 192.168.4.1
          

          In this way, the upload was done alone (by wifi) in the right path.

          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