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.
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 Apr 24, 2015 3:39 pm

Perhaps to help demystify the GC (garbage collector) a bit.

When python needs to allocate memory, it goes to the heap, and tries to allocate it. If the allocation succeeds, then life is good and your program continues.

If, however, the allocation fails, then the GC is run.

The GC figures out which chunks of previously allocated memory are no longer being used and frees them.

Then the allocation will be attempted again. If it fails after the GC, then a MemoryError is raised.

So whether the GC runs or not depends on whether a given bit of code allocates memory, and whether that allocation fails due to a full heap.

Jibun no kage
Posts: 144
Joined: Mon Jul 25, 2022 9:45 pm

Re: Which firmware version do I have installed?

Post by Jibun no kage » Wed Aug 03, 2022 1:15 am

Speaking of using sys.implementation, what is the _mpy property? It is an integer value, i.e. 4102. Is that a build number of micropython firmware image? Or?

Post Reply