Which firmware version do I have installed?

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
christian.prosser
Posts: 5
Joined: Thu Nov 06, 2014 10:33 pm

Which firmware version do I have installed?

Post by christian.prosser » Thu Nov 06, 2014 10:37 pm

Is there any way of finding out which firmware version I have installed on my pyboard?
Last edited by christian.prosser on Thu Nov 13, 2014 9:28 pm, edited 1 time in total.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Which firmware version do I have installed?

Post by dhylands » Fri Nov 07, 2014 12:46 am

When the pyboard boots, it prints a banner (on the usb serial port) that looks something like the following:

Code: Select all

Micro Python v1.3.5 on 2014-11-01; PYBv1.0 with STM32F405RG
If you don't see it - Press RETURN until you get the >>> prompt and then press Control-D which should soft-reboot and print the banner again.

The v1.3.5 corresponds to a tag in the git repository. It will get some additional stuff added if you do a custom build and have modified any of the files.

christian.prosser
Posts: 5
Joined: Thu Nov 06, 2014 10:33 pm

Re: Which firmware version do I have installed?

Post by christian.prosser » Mon Nov 10, 2014 11:48 pm

Thanks Dave!

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Which firmware version do I have installed?

Post by kfricke » Tue Nov 11, 2014 8:49 am

Small variation of this question... Are there any preferred firmware versions ore are all still to be considered "in development" so that we always should use the latest ones? Watching the steady release logs is always like standing in front of the christmas tree back then ;-)

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Which firmware version do I have installed?

Post by dhylands » Tue Nov 11, 2014 9:01 am

Pretty much the latest is usually the best.

manitou
Posts: 73
Joined: Wed Feb 25, 2015 12:15 am

Re: Which firmware version do I have installed?

Post by manitou » Mon Mar 09, 2015 4:10 pm

is there a way to retrieve the firmware version from python? e.g. pyb.version() or could add it to pyb.info()

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: Which firmware version do I have installed?

Post by Damien » Wed Mar 11, 2015 12:21 am

If you want a stable and known-to-be-working version, always go with something that has a "simple" version number; eg v1.3.10 without any gxxxxxx garbage at the end.

That said, the latest version (with -gxxxxxx.dfu at the end) is generally ok and has latest features and bug fixes.
is there a way to retrieve the firmware version from python? e.g. pyb.version() or could add it to pyb.info()
No, not possible at this point in time.

manitou
Posts: 73
Joined: Wed Feb 25, 2015 12:15 am

Re: Which firmware version do I have installed?

Post by manitou » Thu Apr 23, 2015 11:07 am

Ah, looks likes the new os.uname() does what I needed ...

Code: Select all

>>> import os
>>> os.uname()
(sysname='pyboard', nodename='pyboard', release='1.4.2', version='v1.4.2-16-gfd787c5-dirty on 2015-04-23', machine='PYBv1.0 with STM32F405RG')

thanks.

my other wish is that gc_collect() keep a running count of the number of garbage collections and a function to fetch that count.

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: Which firmware version do I have installed?

Post by Damien » Thu Apr 23, 2015 6:32 pm

You may also find sys .implementation useful.

How would you use the information about the total number of GCs? A way that might work for you is to disable auto GC using gc.disable() then force a GC yourself in your main loop with gc.collect(). Then just increment your own counter.

manitou
Posts: 73
Joined: Wed Feb 25, 2015 12:15 am

Re: Which firmware version do I have installed?

Post by manitou » Fri Apr 24, 2015 3:10 pm

Damien wrote: How would you use the information about the total number of GCs? A way that might work for you is to disable auto GC using gc.disable() then force a GC yourself in your main loop with gc.collect(). Then just increment your own counter.
GC is a mystery to me, and the fact that it consumes more than a millisecond and occurs "unpredictably" doesn't give me a warm feeling. So i'd like to know if GC is going on in modules that I may not have authored.

I've added a gc_cnt++ to stmhal/gccollect.c and report it in modpyb.c in the pyb.info() GC stuff. I'm running various things on the pyboard and "observing" ... inquiring minds.

Post Reply