Flashing PyBoard

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
SkG
Posts: 18
Joined: Mon Mar 10, 2014 2:57 pm

Flashing PyBoard

Post by SkG » Thu May 01, 2014 11:06 am

Hi,

Maybe this thread can be dupe but I cant search for flash or flashing.

Due MP is in continuous development now I would like to know if there is a guide or something (I checked the github wiki and seems not to be there) for flashing the board.

I don't know if there is plans to make tag releases but atm I suppose that the PyBoards will come with the latest version.

Regards,
Sergio.

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

Re: Flashing PyBoard

Post by dhylands » Thu May 01, 2014 8:14 pm

The README.md has some instructions near the bottom.

There is also some more detailed instructions on the STM32F407-Discovery wiki but the USB id has changed since those were written (the old USB ID was 0483:5740 and the new USB ID is f055:9800)

When programming the chip, it will appear as ID 0483:df11 (using lsusb under linux) - that part doesn't change.

Under linux, you can also use sudo when running dfu-util and then you don't have to do any of the udev stuff.

SkG
Posts: 18
Joined: Mon Mar 10, 2014 2:57 pm

Re: Flashing PyBoard

Post by SkG » Thu May 01, 2014 9:06 pm

:Facepalm:

Went directly to the wiki searching for the pyboard, thx.
Don't bother me using sudo so I'll skip the dbus stuff.

User avatar
lurch
Posts: 11
Joined: Sat Apr 12, 2014 2:21 pm
Location: Cambridge, UK
Contact:

Re: Flashing PyBoard

Post by lurch » Fri May 02, 2014 12:10 am


robotmad
Posts: 3
Joined: Thu Apr 17, 2014 9:46 pm

Re: Flashing PyBoard

Post by robotmad » Sat May 03, 2014 9:34 pm

Having received by PYbV1.0 this week I tried the example code under "Quick start" on the help page http://micropython.org/help/ and found that when placed in a vertical angle so that the LEDs flashed fast it appeared to crash and lock up. So I have sought out the latest firmware which, from what I've seen of the activity going on at github just today, should have quite a few bugs fixed. If you don't want to build the code from scratch the latest build appears to be available from http://micropython.org/download/ - I suspect this is just an automatic build of the latest version with no guarantees - (I am sure that others who know the detail will be able to comment).

The information on how to get this code into your PYB is available but at present is scattered in a few places - so I have just made some quick notes of what I did under WIndows (7). This has worked as my board now has the latest firmware and no longer crashes with the quick start example program - I though it might help some people to share these notes:

Download the firmware (.dfu file) you want to use from downloaded from http://micropython.org/download/
Disconnect pyboard from everything.
Connect pin "Boot0" (P1) to 3V3 - these pins are at the bottom left of board, they are conveniently next to each other so just solder on a 2 pin header and then populate a link when you need this mode.
Connect pyboard to computer by USB cable.
The ST Micro now presents a different interface (DFU mode) to the computer over the USB interface so Windows needs to install the appropriate drivers - just be patient and it will happen automatically.
Download the ST "DfuSe Demo" application (v3.0.3) from http://www.st.com/web/en/catalog/tools/ ... pe=keyword
Extract contents from the zip file and Install the application.
Run the "DfuSe Demonstration" application which has been installed.
The application should automatically detect your pyboard and show "STM Device in DFU Mode".
In the "Upgrade or Verify Action" section of the application click on "Choose…" and select the .dfu file that you downloaded earlier.
Click "Upload" to transfer the image to your pyboard.
When the upgrade is complete disconnect pyboard from USB, remove the link between "Boot0" and 3V3.

User avatar
dbrgn
Posts: 2
Joined: Mon May 19, 2014 6:09 pm
Location: Switzerland
Contact:

Re: Flashing PyBoard

Post by dbrgn » Mon May 19, 2014 6:11 pm

I started a wiki article about pyboard firmware upgrades:

https://github.com/micropython/micropyt ... are-Update

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

Re: Flashing PyBoard

Post by dhylands » Mon May 19, 2014 9:28 pm

dbrgn wrote:I started a wiki article about pyboard firmware upgrades:

https://github.com/micropython/micropyt ... are-Update
I updated the "backup the original" firmware instructions, because as posted they would only backup 16K of the firmware.

User avatar
dbrgn
Posts: 2
Joined: Mon May 19, 2014 6:09 pm
Location: Switzerland
Contact:

Re: Flashing PyBoard

Post by dbrgn » Tue May 20, 2014 12:30 am

dhylands wrote:I updated the "backup the original" firmware instructions, because as posted they would only backup 16K of the firmware.
Thanks, I already wondered why uploading is much faster than downloading, but didn't take a closer look at the output...

User avatar
polygontwist
Posts: 36
Joined: Sat Jun 28, 2014 4:54 pm
Location: Germany, Rostock
Contact:

Re: Flashing PyBoard

Post by polygontwist » Sat Jul 05, 2014 7:17 pm

Hello,
i have upgrade the firmware to "pybv10-2014-07-05-v1.1.1-130-g4e0eeeb", with win7. it works.
robotmad wrote: ...
The application should automatically detect your pyboard and show "STM Device in DFU Mode".
In the "Upgrade or Verify Action" section of the application click on "Choose…" and select the .dfu file that you downloaded earlier.
Click "Upgrade" to transfer the image to your pyboard.
...
the Button in "DfuSe Demonstration" ist "Upgrade" not "update"

Post Reply