Is it possible to upgrade firmware from PYBflash or SD?

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.
Post Reply
shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

Is it possible to upgrade firmware from PYBflash or SD?

Post by shaoziyang » Wed May 31, 2017 8:01 am

Is it possible to upgrade firmware from PYBFlash or a SD disk?

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

Re: Is it possible to upgrade firmware from PYBflash or SD?

Post by dhylands » Wed May 31, 2017 9:28 pm

Not likely from PYBFlash, since most PYBFlash filesystems aren't big enough to do it.

I'm pretty certain that its "possible" to do, but nobody has implemented it that I'm aware of.

In order to do this, you'd basically need to write some standalone code that can do the operation entirely from RAM. If that code were position independent, then MicroPython would just need to load the code and execute it. If the code weren't position independent, then it would need a small position independent stub to relocate the loaded code to the correct fixed location and then execute it. Since MicroPython supports inline assembler, executing the code once it's loaded is pretty straight forward. Writing the code to do the work will be a bit more difficult, but definitely should be possible.

Post Reply