problem updating M4 firmware with IDE 1.7.1 on Mac

General discussion about topics related to OpenMV.
jaywgraves
Posts: 3
Joined: Sat Jan 09, 2016 10:43 am

problem updating M4 firmware with IDE 1.7.1 on Mac

Postby jaywgraves » Tue Aug 15, 2017 8:42 am

I have a Kickstarter board and I haven't used it in a long time.
I downloaded the new IDE and I'm trying to update the firmware using macOS 10.12.6 (Sierra)

The IDE can see the board and it shows me my firmware version is 1.5.0 and when I click to upgrade.
1. I get a dialog asking if I want to update to the latest version. click OK
2. dialog asking if I want to erase internal file system with 'No' as the default. click No
3. error dialog: "Error: No such file or directory!"

any ideas?
User avatar
kwagyeman
Posts: 1246
Joined: Sun May 24, 2015 2:10 pm

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby kwagyeman » Tue Aug 15, 2017 11:25 am

I'll have to check the MAC IDE. I moved the firmware DIRS around. I might have broken something.
Nyamekye,
User avatar
kwagyeman
Posts: 1246
Joined: Sun May 24, 2015 2:10 pm

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby kwagyeman » Tue Aug 15, 2017 11:30 am

Just tested on Mac. Seems to work, connecting to upgrade the firmware didn't work on the first shot but it did on the second. Connecting to use the camera works with an M4.

Um, does running normal scripts work? Hello world should run with some minor edits to remove anything that doesn't compile (the skip frames call).
Nyamekye,
User avatar
kwagyeman
Posts: 1246
Joined: Sun May 24, 2015 2:10 pm

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby kwagyeman » Tue Aug 15, 2017 11:31 am

Oh, yeah, so the M4 has a crapy bootloader that's too fast to connect to. You need to use DFU mode to re-program the camera. OpenMV IDE will allow you to connect via DFU after the fast (first) bootloader option fails. DFU mode will also upgrade the bootloader so you can use the fast mode.
Nyamekye,
jaywgraves
Posts: 3
Joined: Sat Jan 09, 2016 10:43 am

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby jaywgraves » Thu Aug 17, 2017 8:56 am

After some adventures, I have the bootloader/firmwared updated via DFU.

It never worked from the IDE because the Python version can't find the installed pyusb module even though it works when trying the Python REPL directly.

Code: Select all

UALC02TV456HV2Q:~ jgraves$ python
Python 2.7.13 |Anaconda 4.4.0 (x86_64)| (default, Dec 20 2016, 23:05:08)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import usb
>>> import usb.core
>>> exit()
I think it's possible that the IDE is hard-coding a path to the python executable but that version of python doesn't have the required libraries installed.

Code: Select all

UALC02TV456HV2Q:pydfu jgraves$ which python
/anaconda/bin/python
I was able to run it directly from the command line after changing to the
`/Applications/OpenMV IDE.app/Contents/Resources/pydfu` directory

Code: Select all

UALC02TV456HV2Q:pydfu jgraves$ python pydfu.py -l
Bus 20 Device 039: ID 0483:df11
Memory Layout
    0x8000000  4 pages of  16K bytes
    0x8010000  1 pages of  64K bytes
    0x8020000  7 pages of 128K bytes
UALC02TV456HV2Q:pydfu jgraves$ python pydfu.py -u /Users/jgraves/Downloads/firmware/OPENMV2/bootloader.dfu
File: /Users/jgraves/Downloads/firmware/OPENMV2/bootloader.dfu
    DfuSe v1, image size: 13621, targets: 1
    Target 0, alt setting: 0, name: "ST...", size: 13336, elements: 1
      0, address: 0x08000000, size: 13328
    usb: 0483:df11, device: 0x0000, dfu: 0x011a, UFD, 16, 0x25169075
Writing memory...
0x08000000   13328 [=========================] 100%
Exiting DFU...
UALC02TV456HV2Q:pydfu jgraves$
even with the new bootloader the IDE still can't find the firmware directory.
I tried multiple times from the IDE (restart IDE, unplug/plug in board, etc)
I finally just updated from the command line.

Code: Select all

UALC02TV456HV2Q:pydfu jgraves$ python pydfu.py -u /Users/jgraves/Downloads/firmware/OPENMV2/firmware.dfu
File: /Users/jgraves/Downloads/firmware/OPENMV2/firmware.dfu
    DfuSe v1, image size: 981909, targets: 1
    Target 0, alt setting: 0, name: "ST...", size: 981624, elements: 1
      0, address: 0x08010000, size: 981616
    usb: 0483:df11, device: 0x0000, dfu: 0x011a, UFD, 16, 0x9934b548
Writing memory...
0x08010000  981616 [=========================] 100%
Exiting DFU...
UALC02TV456HV2Q:pydfu jgraves$
I can now connect, the helloworld_1.py works without commenting out the `skip_frames` call and the firmware version reports 2.5.0.
User avatar
kwagyeman
Posts: 1246
Joined: Sun May 24, 2015 2:10 pm

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby kwagyeman » Thu Aug 17, 2017 10:18 am

Mmm, the IDE doesn't hardcoded the path to the executable though. It just calls "python" followed by the script path.

Um, as for you saying the IDE cannot find the firmware path. Does this mean the IDE is having trouble opening it's own resource files?

I'd like to fix these problems. Can you post a screen shot of the issues as you encounter them? I can do a quick Mac rebuild to see if I fixed all the problems for you.
Nyamekye,
jaywgraves
Posts: 3
Joined: Sat Jan 09, 2016 10:43 am

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby jaywgraves » Thu Aug 17, 2017 10:30 am

re: Python path. OK that is weird then.

re: firmware path
I am not 100% certain what it can't find. was just guessing it was Firmware based on the error dialog:
"Error: No such file or directory!"

While attempting to try again to get you screen shots I seem to have locked up the IDE and after 'Force Quit'ing it won't restart.
I will try to get things working and post again.
borbs727
Posts: 3
Joined: Mon Aug 21, 2017 1:19 am

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby borbs727 » Mon Aug 21, 2017 1:22 am

I'm having the same problem and error message on windows 10. Trying to run my M4 for the first time. It says firmware version 1.5.0 at the bottom. When I click to upgrade, I get asked if I want to erase the internal file system. Hitting yes or no results in the same error: "Error: The system cannot find the path specified!" I was able to get the M7 working just fine.
User avatar
kwagyeman
Posts: 1246
Joined: Sun May 24, 2015 2:10 pm

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby kwagyeman » Mon Aug 21, 2017 1:43 am

I see what's wrong. Forgot to update a string in the IDE. Um, anyway, the fix for this is easy. Just use the Run Bootloader option, then select the firmware file manually. This error is happening because on firmware 1.6.0 and older I can't ask the cam what architecture is has. So, I have the path hardcoded and I forgot to update that when renaming firmware dirs.

The firmware file you want is <openmv-ide-install-dir>/share/qtcreator/firmware/OPENMV2/firmware.bin.
Nyamekye,
borbs727
Posts: 3
Joined: Mon Aug 21, 2017 1:19 am

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby borbs727 » Sun Aug 27, 2017 7:53 pm

I've tried doing this and it just never stops saying "Connecting..."

When I cancel it says "Unable to connect to your OpenMV Cam's normal bootloader!"
User avatar
kwagyeman
Posts: 1246
Joined: Sun May 24, 2015 2:10 pm

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby kwagyeman » Sun Aug 27, 2017 8:25 pm

You have to use the DFU bootloader. Select the openmv.dfu file and follow the instruction prompts. The original M4 bootlader has too low of a serial connection timeout. The DFU bootlader process will update this.
Nyamekye,
borbs727
Posts: 3
Joined: Mon Aug 21, 2017 1:19 am

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby borbs727 » Mon Aug 28, 2017 12:48 am

That worked! But the image looked like this and then the usb connector broke off the board when I tried to unplug it :(
Capture.JPG
Capture.JPG (37.57 KiB) Viewed 724 times
User avatar
kwagyeman
Posts: 1246
Joined: Sun May 24, 2015 2:10 pm

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby kwagyeman » Mon Aug 28, 2017 2:17 am

Yeah, the M4 kinda had issues - USB connector coming off. Not sure what's wrong with the bottom part of the image - that's not an error I've seen before? Want me to send you a replacement M7?
Nyamekye,
goliatone
Posts: 10
Joined: Wed Oct 25, 2017 8:31 am

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby goliatone » Wed Oct 25, 2017 1:12 pm

I also have the same issues described here. However, I'm stuck when running the bootloader.dfu part. I connect a jump wire between boot and rst, connect the cam again but nothing happens. Is there a more detailed guide anywhere I could use as a reference?

PS: Sorry for opening an old thread but I figured it might be better than making a new one.
User avatar
kwagyeman
Posts: 1246
Joined: Sun May 24, 2015 2:10 pm

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby kwagyeman » Wed Oct 25, 2017 1:43 pm

Hi, where did you buy the M4? If it's a genuine one we'll send you an M7.
Nyamekye,
goliatone
Posts: 10
Joined: Wed Oct 25, 2017 8:31 am

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby goliatone » Thu Oct 26, 2017 10:20 am

thanks @kwagyeman. It's a board I got through the Kickstarter campaign.
User avatar
kwagyeman
Posts: 1246
Joined: Sun May 24, 2015 2:10 pm

Re: problem updating M4 firmware with IDE 1.7.1 on Mac

Postby kwagyeman » Thu Oct 26, 2017 11:21 am

Hi, we'll ship you an M7. Please send us an email with your address.
Nyamekye,

Return to “General Topics”

Who is online

Users browsing this forum: Google [Bot] and 1 guest