Firmware update: Segmentation fault: 11?

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
synimak
Posts: 20
Joined: Sun Feb 28, 2016 5:11 am
Contact:

Firmware update: Segmentation fault: 11?

Post by synimak » Sun Nov 27, 2016 11:23 pm

I am trying to update a PyB v1.1. I have dfu-util working but I keep getting "Segmentation fault: 11". Any ideas?
I'm running a 2013 macbook pro and don't have another devices connected.

Code: Select all

$ /opt/local/bin/dfu-util --a 0 -D pybv10-20161127-v1.8.6-100-g21e1703.dfu -d 0483
Segmentation fault: 11

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

Re: Firmware update: Segmentation fault: 11?

Post by dhylands » Mon Nov 28, 2016 1:28 am

I just tried that exact command on my linux machine and it seems to work for me. I'm using the latest dfu-util built from source.

The only things that looked odd to me were that I'd use -a instead of --a and I'd try -D 0483:df11 rather than just -D 0483

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Firmware update: Segmentation fault: 11?

Post by pythoncoder » Mon Nov 28, 2016 9:16 am

@dhylands A couple of things look odd to me. The OP says he is trying to update a V1.1 board but the firmware filename is one for a V1.0 board. And I'm puzzled by the vendor/product ID: my V1.1 board lists (lsusb) as f055:9800. Where does 0483:df11 come from?
Peter Hinch
Index to my micropython libraries.

User avatar
kamikaze
Posts: 154
Joined: Tue Aug 16, 2016 10:10 am
Location: Latvia
Contact:

Re: Firmware update: Segmentation fault: 11?

Post by kamikaze » Mon Nov 28, 2016 5:12 pm

pythoncoder wrote:@dhylands A couple of things look odd to me. The OP says he is trying to update a V1.1 board but the firmware filename is one for a V1.0 board. And I'm puzzled by the vendor/product ID: my V1.1 board lists (lsusb) as f055:9800. Where does 0483:df11 come from?
I have 0483:df11 too

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

Re: Firmware update: Segmentation fault: 11?

Post by dhylands » Mon Nov 28, 2016 6:30 pm

pythoncoder wrote:@dhylands A couple of things look odd to me. The OP says he is trying to update a V1.1 board but the firmware filename is one for a V1.0 board. And I'm puzzled by the vendor/product ID: my V1.1 board lists (lsusb) as f055:9800. Where does 0483:df11 come from?
I didn't notice the version mismatch. Although I don't think that should be relevant, since the seg fault is happening on the host right at the start. The version mismatch would probably cause the board to not boot though.

0483:df11 is the VID:PID that shows up when the board is in DFU mode. f055:9800 is what shows up when its running MicroPython.

synimak
Posts: 20
Joined: Sun Feb 28, 2016 5:11 am
Contact:

Re: Firmware update: Segmentation fault: 11?

Post by synimak » Mon Nov 28, 2016 10:07 pm

Thanks for all your help guys. You are all absolute legends!

Sorry there has been a few things I have totally missed. It is chaos at work at the moment. A quick bit of background...
I am a Special Effects(SFX) Technician and Stunt Rigger/Performer. I'm currently working with SFX on Pacific Rim 2 in Australia. I've been using the PyBoards since they came out and absolutely love them! So far I've used a bunch of them on, Pirates of the Caribbean: Dead Men Tell No Tales, Alien: Covenant, Thor: Ragnarok, and now Pacific Rim2. That's all I can say at the moment but when the films come out I'll be able to share some videos and pictures of how they've been used. Also I have no offical training in programming so its all a bit of a stumble along. Learning as I go.


So I have a bunch of v1.0 and v1.1 boards and I've mixed them up without checking properly.

I am updating a v1.0 board not v1.1.

I changed the "--a" to "--alt" (as per the instructions, something else I missed) and that has made a difference.

BUT now I end up with "–device: No such file or directory"

Code: Select all

$ /opt/local/bin/dfu-util --alt 0 -D –device 0483:df11 pybv10-20161128-v1.8.6-104-g0d75b0d.dfu -d 0483
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

Filter on vendor = 0x0483 product = 0x0000
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
–device: No such file or directory

Using "-D 0483:df11" rather than just "-D 0483" doesn't make a difference.

Once again thanks for all your help!

synimak
Posts: 20
Joined: Sun Feb 28, 2016 5:11 am
Contact:

Re: Firmware update: Segmentation fault: 11?

Post by synimak » Mon Nov 28, 2016 10:28 pm

Fixed it.

Works using:

Code: Select all

/opt/local/bin/dfu-util -a 0 -D /opt/local/bin/pybv10-20161128-v1.8.6-104-g0d75b0d.dfu -d 0483

Thanks Again Guys!

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

Re: Firmware update: Segmentation fault: 11?

Post by dhylands » Mon Nov 28, 2016 11:49 pm

Generally speaking, if the option is a single letter, then it has a single dash (-a, -d) and if its a word then it uses a double dash (--alt, --device).

Of course, there are always programs which have their own conventions (mostly for historical reasons) and don't follow this convention, but that's generally a good guide.

User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

Re: Firmware update: Segmentation fault: 11?

Post by rcolistete » Tue Nov 29, 2016 10:14 am

synimak wrote:Sorry there has been a few things I have totally missed. It is chaos at work at the moment. A quick bit of background...
I am a Special Effects(SFX) Technician and Stunt Rigger/Performer. I'm currently working with SFX on Pacific Rim 2 in Australia. I've been using the PyBoards since they came out and absolutely love them! So far I've used a bunch of them on, Pirates of the Caribbean: Dead Men Tell No Tales, Alien: Covenant, Thor: Ragnarok, and now Pacific Rim2. That's all I can say at the moment but when the films come out I'll be able to share some videos and pictures of how they've been used. Also I have no offical training in programming so its all a bit of a stumble along. Learning as I go.
Please share with us these stories of MicroPython being used in movies !
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

Post Reply