Update firmware using mac
Posted: Sun Jul 20, 2014 9:52 am
Hi @all,
I'm a mac user, and I'm really happy to play with MicroPython and try the latest micro python firmware image.
Using the dfu-util and a paper clip it is possible to update the firmware also with Mac.
Here we go how to do it:
As a prerequisite you need to have mac port installed ( to install: download from here https://guide.macports.org/chunked/inst ... ports.html ) and install it.
Xcode command line Tools most ports will likely fail to build if Xcode is not installed.
Once you have macport installed, open a console and type:
gianmac:~$ sudo port dfu-util install dfu-util
# once the installation is completed test with this command line
gianmac:~$ dfu-util -V
# this is the result
dfu-util 0.7
Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
Now flash the new firmware:
put in dfu mode the micro python ( short cut the 3.3v and the Boot pin as shown in the user guide http://micropython.org/static/doc/Micro ... -setup.pdf ) press reset or connect the micro python to the Mac
then from command console type:
gianmac:~$ dfu-util -l
# this is the result
dfu-util 0.7
Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg"
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=1, name="@Option Bytes /0x1FFFC000/01*016 e"
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=2, name="@OTP Memory /0x1FFF7800/01*512 e,01*016 e"
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=3, name="@Device Feature/0xFFFF0000/01*004 e"
this means that your micro python board can "communicate" to dfu-util and vice versa.
to update it, download the flash image from the download area then flash it with this command :
gianmac:~$ dfu-util -c 1 -i 0 -a 0 -D pybv10-2014-07-20-v1.2-13-gcb66f41.dfu
dfu-util 0.7
Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
Opening DFU capable USB device... ID 0483:df11
Run-time device DFU version 011a
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
Dfu suffix version 11a
DfuSe interface name: "Internal Flash "
file contains 1 DFU images
parsing DFU image 1
image for alternate setting 0, (2 elements, total size = 251892)
parsing element 1, address = 0x08000000, size = 392
.
parsing element 2, address = 0x08020000, size = 251484
...........................................................................................................................
done parsing DfuSe file
gianmac:~$
This means that the flash went flawless and you can use the latest micro python firmware !
Hope this helps.
Cheers Gian
I'm a mac user, and I'm really happy to play with MicroPython and try the latest micro python firmware image.
Using the dfu-util and a paper clip it is possible to update the firmware also with Mac.
Here we go how to do it:
As a prerequisite you need to have mac port installed ( to install: download from here https://guide.macports.org/chunked/inst ... ports.html ) and install it.
Xcode command line Tools most ports will likely fail to build if Xcode is not installed.
Once you have macport installed, open a console and type:
gianmac:~$ sudo port dfu-util install dfu-util
# once the installation is completed test with this command line
gianmac:~$ dfu-util -V
# this is the result
dfu-util 0.7
Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
Now flash the new firmware:
put in dfu mode the micro python ( short cut the 3.3v and the Boot pin as shown in the user guide http://micropython.org/static/doc/Micro ... -setup.pdf ) press reset or connect the micro python to the Mac
then from command console type:
gianmac:~$ dfu-util -l
# this is the result
dfu-util 0.7
Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg"
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=1, name="@Option Bytes /0x1FFFC000/01*016 e"
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=2, name="@OTP Memory /0x1FFF7800/01*512 e,01*016 e"
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=3, name="@Device Feature/0xFFFF0000/01*004 e"
this means that your micro python board can "communicate" to dfu-util and vice versa.
to update it, download the flash image from the download area then flash it with this command :
gianmac:~$ dfu-util -c 1 -i 0 -a 0 -D pybv10-2014-07-20-v1.2-13-gcb66f41.dfu
dfu-util 0.7
Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org
Opening DFU capable USB device... ID 0483:df11
Run-time device DFU version 011a
Found DFU: [0483:df11] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
Dfu suffix version 11a
DfuSe interface name: "Internal Flash "
file contains 1 DFU images
parsing DFU image 1
image for alternate setting 0, (2 elements, total size = 251892)
parsing element 1, address = 0x08000000, size = 392
.
parsing element 2, address = 0x08020000, size = 251484
...........................................................................................................................
done parsing DfuSe file
gianmac:~$
This means that the flash went flawless and you can use the latest micro python firmware !
Hope this helps.
Cheers Gian