Page 1 of 2

Which firmware version do I have installed?

Posted: Thu Nov 06, 2014 10:37 pm
by christian.prosser
Is there any way of finding out which firmware version I have installed on my pyboard?

Re: Which firmware version do I have installed?

Posted: Fri Nov 07, 2014 12:46 am
by dhylands
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.

Re: Which firmware version do I have installed?

Posted: Mon Nov 10, 2014 11:48 pm
by christian.prosser
Thanks Dave!

Re: Which firmware version do I have installed?

Posted: Tue Nov 11, 2014 8:49 am
by kfricke
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 ;-)

Re: Which firmware version do I have installed?

Posted: Tue Nov 11, 2014 9:01 am
by dhylands
Pretty much the latest is usually the best.

Re: Which firmware version do I have installed?

Posted: Mon Mar 09, 2015 4:10 pm
by manitou
is there a way to retrieve the firmware version from python? e.g. pyb.version() or could add it to pyb.info()

Re: Which firmware version do I have installed?

Posted: Wed Mar 11, 2015 12:21 am
by Damien
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.

Re: Which firmware version do I have installed?

Posted: Thu Apr 23, 2015 11:07 am
by manitou
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.

Re: Which firmware version do I have installed?

Posted: Thu Apr 23, 2015 6:32 pm
by Damien
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.

Re: Which firmware version do I have installed?

Posted: Fri Apr 24, 2015 3:10 pm
by manitou
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.