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

    Using pycom-fwtool-cli

    Scheduled Pinned Locked Moved Firmware
    10 Posts 4 Posters 767 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.
    • kodarnK Offline
      kodarn
      last edited by

      Hi guys

      Are there any experts out there who know how to flash the Pycom Firmware using the CLI-version (pycom-fwtool-cli) instead of the GUI-version (pycom-fwtool)?

      The firmware (as I have understood it) can be downloaded from here:
      https://github.com/pycom/pycom-micropython-sigfox/releases

      I would like to use pycom-fwtool-cli instead of having clicking through the gui-app, and still be able to do some configurations, such as LoRa Region, Erase options, FileSystems (LittleFS), etc

      All in one pretty one-liner if possible. :-)

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

        @kodarn pycom-fwtool-cli --help

        1 Reply Last reply Reply Quote 0
        • kodarnK Offline
          kodarn
          last edited by

          Well, that's certainly a start :-)

          However, I didn't find any reference to FatFS/LittleFS when reading the help page. Nor did I see any reference to the filesystems when reading through the online documentation of the tool at https://docs.pycom.io/advance/cli/

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

            Ah, reading up on things. So there are two versions of the firmware files; One using FatFS and the other LittleFs. I assumed that filesystem creation was a part of the flashing procedure, but instead Pycom maintains two different sets of firmwares for all development boards?

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

              @kodarn As far as I understand it, the filesystem to be used is coded in the firmware package. A short I made confirms that.

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

                @kodarn said in Using pycom-fwtool-cli:

                I assumed that filesystem creation was a part of the flashing procedure

                Actually, I was believing the same thing.

                In earlier releases, there was os.mkfs('/flash'), now we have os.fsformat('/flash'). While both don't say anything about the filesystem format, there is still pycom.bootmgr(fs_type=pycom.LittleFS, reset=True) which we are still using occasionally for clearing out the filesystem on the device.

                If it is possible to change the filesystem format with that is beyond what I have researched into.

                Nevertheless, @robert-hh is also right that it is also related to the firmware itself somehow. At least, one can configure the respective parameter FS=LFS on the command line when building the firmware images.

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

                  @andreas pycom.bootmgr(fs_type=pycom.LittleFS, reset=True) works as suspected. You can change the file system on the fly.
                  It seems that I did not look into the pycom module a while.

                  1 Reply Last reply Reply Quote 1
                  • O Offline
                    oligauc @kodarn
                    last edited by

                    @kodarn To flash you can use: pycom-fwtool-cli -p "your COM port" flash -t "your .tar.gz file"

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

                      @andreas After playing around with these pycom.bootmgr() API, I conclude that there is only a single image: the one with LittleFS included. The actual filesystem to be used is stored in NVS, and the option in the pycom updater just sets the one or the other default. This default can be changed with pycom.bootmgr(), but only if the firmware is compiled without the LFS option. The NVS is part of the firmware tar package.
                      P.S.: Surprisingly, all of that is documented, if one opens the docs in development view.

                      A 1 Reply Last reply Reply Quote 0
                      • A Offline
                        andreas @robert-hh
                        last edited by

                        @robert-hh said in Using pycom-fwtool-cli:

                        if one opens the docs in development view

                        Do you also believe it's better to browse https://github.com/pycom/pycom-documentation/tree/publish/content than stumbling through https://docs.pycom.io/?

                        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