Bootloader Update

Discussion related to "under the hood" OpenMV topics.
User avatar
kwagyeman
Posts: 5001
Joined: Sun May 24, 2015 2:10 pm

Bootloader Update

Postby kwagyeman » Thu Jan 26, 2017 2:03 pm

Hi everyone,

If possible, please test out our new bootloader and let us know if you have any problems with it. You can do this by downloading the latest version of OpenMV IDE, and then using the Tools->Run Bootloader option to install the latest DFU firmware on your OpenMV Cam. You can grab the latest firmware here. For the OpenMV Cam M4 please select the OMV2/openmv.dfu file.

Once you've updated the firmware on your OpenMV Cam via DFU you should be able to use the regular bootloader in the IDE without issues to update your OpenMV Cam. To do this plug your OpenMV Cam into your computer, connect to it in the IDE, and then click on the firmware version label. The IDE will tell you your firmware is up to date, after which it will ask if you want to upgrade anyway. Say yes and the IDE will try to flash the latest firmware onto your OpenMV Cam.

Anyway, please let me know if you have any problems with this. In particular, the bootloader wasn't able to connect to the IDE fast enough before because we had too small of a timeout. We've made the bootloader smarter now and it waits a lot longer for the IDE to connect if it detects that it's connected to a computer. So far, in my own testing I can get it to work on Ubuntu VMs. So, I think everything is fixed.

(WARNING: If you need to use your OpenMV Cam for some task in the near future don't do this right now. While I believe you shouldn't have any issues... It would not be wise to invite problems for yourself if you can't afford to have any).
Nyamekye,
tcottle
Posts: 12
Joined: Wed Jul 06, 2016 10:52 pm

Re: Bootloader Update

Postby tcottle » Fri Jan 27, 2017 10:20 am

Worked fine for me!
cbwarren
Posts: 15
Joined: Fri Jun 10, 2016 10:13 pm

Re: Bootloader Update

Postby cbwarren » Sun Jan 29, 2017 1:37 am

I am running on MAC OS (10.9.5) and am trying to update firmware.
I ran the "run bootloader" from tools ( not clear which folder I needed t choose for the path, I chose "......openmv2?) and got the DFU update firmware failed.
...and I had used homebrew as per your webpage (sudo brew install libusb python
sudo pip install pyusb),

In the details of the fail message, there are a lot of references to missing usb.core??

I've attached screen captures of errors, or at least i've tried to, the "status" flag in this message is "yellow" and when I click on it i get "error parsing server response"....not having a good day!
User avatar
kwagyeman
Posts: 5001
Joined: Sun May 24, 2015 2:10 pm

Re: Bootloader Update

Postby kwagyeman » Sun Jan 29, 2017 11:00 am

Hmm, okay, so DFU is not working because pyusb isn't setup.

Try these install commands: https://github.com/openmv/openmv/wiki/M ... l-homebrew.

As for the path to the DFU file. Yes, it's the OPENMV2/OPENMV.DFU file.
Nyamekye,
cbwarren
Posts: 15
Joined: Fri Jun 10, 2016 10:13 pm

Re: Bootloader Update

Postby cbwarren » Sun Jan 29, 2017 4:49 pm

Maybe it is just me, but this seems more complicated than it has to be ! :-)
1) i followed the steps you linked to, some did not work as given, [see attached window grabs]
2) when I try to use the 'update firmware' button at bottom of IDE window, I get the "connecting" popout which never connects.
3)i hit 'cancel' and get popout "unable to connect to normal bootloader"
4) then I get the popout to disconnect camera, add jumper and then "Click the Ok button after your OpenMV Cam's DFU Bootloader has enumerated.". Not sure what this means, it also says to reconnect camera, but after i plug in the camera, the 'connect' icon in the IDE is not functioning
5) click OK, then get 'failed" popout with same details complainging bout usb.core
6) message comes back with homebrew instructions to install (these have been done)
7) I get to same end when I try using "run bootloader" from the Tools tab
8) when I try "pip install pyusb" and "brew install libusb python" i get:
warning libusb-1.0.21 already installed
warning python-2.7.13 already installed



Thoughts???
AKLitman
Posts: 12
Joined: Fri Dec 16, 2016 6:38 pm
Location: Farmers Branch, TX

Re: Bootloader Update

Postby AKLitman » Sun Jan 29, 2017 6:22 pm

I have a pair of OpenMV boards. The system I am testing is a Windows 10 64 bit (build 14393). The new IDE (version 1.4.0) found the OpenMV right away. The firmware version updated on the 1st attempt. I followed your guide and downloaded the new firmware, navigated to OPENMV2 and selected openmv.dfu. I disconnected the OpenMV, wired BOOT to RST and reconnected. The download took and I disconnected, removed the Boot wire and re-connected. I forced another reload and all is well. No errors occurred.

Austin
User avatar
kwagyeman
Posts: 5001
Joined: Sun May 24, 2015 2:10 pm

Re: Bootloader Update

Postby kwagyeman » Sun Jan 29, 2017 6:22 pm

I don't see anything attached. Can you try to re-upload?

Anyway, already installed warnings are fine. So, did you by chance put the camera into DFU mode? Here are the steps you need to do:

1: Attach a wire between RST and BOOT0 pins on the OpenMV Cam.
2: Plug the openmv cam into your computer.
3: Not sure if Mac will let you know anything was plugged in. Anyway, your Mac should detect the OpenMV Cam then.
4: In OpenMV IDE click on the Tools->Run Bootloader option and then select the OPENMV2/OPENMV.DFU file to load from https://github.com/openmv/openmv/releas ... rmware.zip.

5: DFU loading should work now. This is assuming you have all the required lib installed which it sounds like you have.
6: Once the DFU uploader re-flashes the firmware you should be good to go with the new bootloader. Now you can test it out.

To test out the new bootloader do this:

1: Connect the OpenMV Cam to your computer without the wire between BOOT0 and RST.
2: The camera's internal SD card drive should appear.
3: Connect to the camera in OpenMV IDE.
4. In the bottom right hand corner of the IDE it will tell you that you have the latest firmware installed. Then click on that label which is actually a button and step through the prompts to force the IDE to try to update your camera again.
5: The IDE should be able to reset your OpenMV Cam and re-program it's flash without any issues here. This is what I'm looking to test.
Nyamekye,
User avatar
kwagyeman
Posts: 5001
Joined: Sun May 24, 2015 2:10 pm

Re: Bootloader Update

Postby kwagyeman » Sun Jan 29, 2017 6:23 pm

Great AKLitman!
Nyamekye,
trevorb
Posts: 15
Joined: Sun Jun 19, 2016 6:20 pm

Re: Bootloader Update

Postby trevorb » Sun Jan 29, 2017 7:55 pm

It worked for me windows 7. Thank you. The update by selecting the firmware rev in the ide worked as well.
cbwarren
Posts: 15
Joined: Fri Jun 10, 2016 10:13 pm

Re: Bootloader Update

Postby cbwarren » Sun Jan 29, 2017 10:14 pm

... when I jumper RST-BOOT on the camera board, then plug it in, I don't get any flashing lights and if I go into Terminal and list USB devices it doesn't appear {does if I plug in without the jumper }.
This is the case with and without IDE open.


PS: is it necessary to have SD card installed for this work?...that may be my problem?
User avatar
kwagyeman
Posts: 5001
Joined: Sun May 24, 2015 2:10 pm

Re: Bootloader Update

Postby kwagyeman » Sun Jan 29, 2017 11:38 pm

No, that's normal. In DFU mode it doesn't appear as anything except a generic USB device. The only thing that will see it is the DFU update tool in OpenMV IDE.

In DFU mode the chip is running code from un-erasable flash memory which has no knowledge of the OpenMV Cam. It just knows its a chip and that it can connect to the computer via USB.
Nyamekye,
cbwarren
Posts: 15
Joined: Fri Jun 10, 2016 10:13 pm

Re: Bootloader Update

Postby cbwarren » Mon Jan 30, 2017 10:37 am

to be clear: when I plug it in with jumper, it is not recognized as anything in Mac OS, there is no 'new' generic USB device showing up.

In any event, the bootloader is not working as expected when I follow those steps; suggestions?
User avatar
kwagyeman
Posts: 5001
Joined: Sun May 24, 2015 2:10 pm

Re: Bootloader Update

Postby kwagyeman » Mon Jan 30, 2017 11:51 am

Hi, Mac may not tell you any device appeared. That is okay. You just have to attach a wire between the RST and BOOT0 pins and then connect the OpenMV cam to your computer.

So, after the board was plugged into your Mac in DFU mode, did you run the DFU bootloader in OpenMV IDE and was that able to work? If you still get USB.core errors then this means that there are still problems with the installed dependencies. Otherwise it should work.

Assuming you have an installed decencies issue then I'll need to go back and take a look at my documentation. If you have a windows PC near by you can use OpenMV IDE on that to update the firmware in DFU mode and you should have zero issues. The windows installer takes care of all DFU dependencies.
Nyamekye,
cbwarren
Posts: 15
Joined: Fri Jun 10, 2016 10:13 pm

Re: Bootloader Update

Postby cbwarren » Mon Jan 30, 2017 5:15 pm

I tried same sequence on a PC and it worked.
When I then plugged the camera into OpenMV on my MAC, it works, but....

1) face tracking or face detection doesn't seem to work, only occassionaly do I get a rectangle vs 100% on the pc.
2) I ran an example that outputs data, gif on movement, and got an error saying failed to write bytes.

Is the MAC IDE buggy or is it my installation?
User avatar
kwagyeman
Posts: 5001
Joined: Sun May 24, 2015 2:10 pm

Re: Bootloader Update

Postby kwagyeman » Mon Jan 30, 2017 5:36 pm

You need an SD card for the gif on motion detection script.

As for Face Detection on Mac. Shadows affect the system. But, otherwise the results should be the same. The algorithm runs on board the camera.

I've verified pretty heavily the Mac installation works.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests