STM32 Bootloader on Win7 64bi

Bootloader for boards that don't have the addition hardware found on the Maple mini, which resets the USB
rapzak
Posts: 5
Joined: Sat Jul 18, 2015 6:49 pm

STM32 Bootloader on Win7 64bi

Post by rapzak » Sat Jul 18, 2015 6:53 pm

Hi,

I get this error on my win7 x64:

Setting Configuration 1...
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
bytes_per_hash=243
Starting download: [##################################################] finished!
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode
error resetting after download: usb_reset: could not reset device, win error: The system cannot find the file specified.

Any idea? i followed this link:
https://github.com/rogerclarkmelbourne/ ... stallation

/Kasper

User avatar
RogerClark
Posts: 5974
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM32 Bootloader on Win7 64bi

Post by RogerClark » Sat Jul 18, 2015 10:35 pm

Ignore the error

It seems to happen on some systems, and is probably something to do with USB enumeration speed.

I think things work fine even with this error.

Unfortunately on Windows I dont have the source code for the maple upload java jar, and I also dont have the source for dfu-util either.


However if someone could tell where the maple-upload.jar file came from, and where its source code is, I could try to remove this message, as i think its caused by maple-upload calling dfu-util passing the reset param, but after upload the bootloader switches to running the sketch before dfu-util has had chance to do its reset sequence.

I think resetting the dfu is unnecessary really.

User avatar
mrburnette
Posts: 1783
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: STM32 Bootloader on Win7 64bi

Post by mrburnette » Sun Jul 19, 2015 3:19 am

However if someone could tell where the...
Seriously, after a few compiles one forgets about it. So, so much more to worry about.

Ray

victor_pv
Posts: 1269
Joined: Mon Apr 27, 2015 12:12 pm

Re: STM32 Bootloader on Win7 64bi

Post by victor_pv » Sun Jul 19, 2015 4:25 am

I get that error 90% of the time, does not affect anything.

User avatar
RogerClark
Posts: 5974
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM32 Bootloader on Win7 64bi

Post by RogerClark » Sun Jul 19, 2015 7:09 am

Yes. I get it quite often, but like everyone else I ignore it, as everything works OK

However, if it was an easy matter of recompiling something that we have source code for, I'd fix it.

But strangely, I don't know where the maple-upload.jar came from. I don't think its part of the original LeafLabs IDE, I have a feeling that perhaps its something that BobC wrote, as it seems to have appeared in BobC's first pass at converting LibMaple to work with IDE 1.5

User avatar
RogerClark
Posts: 5974
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM32 Bootloader on Win7 64bi

Post by RogerClark » Sun Jul 19, 2015 11:06 pm

I've now got the source for maple_upload.jar

It was written by BobC, but he'd forgotten to upload the source files to github.

Its written using NetBeans, so I'm just downloading that now.

But I doubt I'll have time to look into this issue for a few days, as I have other things on the go, including work ;-(

User avatar
RogerClark
Posts: 5974
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM32 Bootloader on Win7 64bi

Post by RogerClark » Mon Jul 20, 2015 7:53 am

Edit

I've taken a look at this issue

i.e
error resetting after download: usb_reset: could not reset device, win error: The system cannot find the file specified
.

I tried recompiling maple_upload to remove the reset argumement, and the message goes, but the usb device no longer resets, and the Maple serial device doesnt appear :-(

So the issue may be in dfu-util rather than maple_upload

Anyway, since I now have the source for maple_upload.jar, comitted and pushed it to the tools/src folder in the repo, in case we need to make any changes to this in the future

Changing dfu-util.exe on windows is slightly more problematic. I recall downloading the latest version and building for windows, but from what I recall it didn't work with the bootloader ;-(
But I can't recall why.

I'll need to do some more investigations and in the mean time, ignore that message ;-)

User avatar
RogerClark
Posts: 5974
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM32 Bootloader on Win7 64bi

Post by RogerClark » Tue Jul 21, 2015 10:25 pm

Just a thought, but I wonder if this is a bootloader issue.

I think the bootloader is probably jumping to the sketch before DFU-Util has had time to reset the DFU device, i.e the device has been re-enumerated too quickly for some systems.

Perhaps putting in a small delay in the bootloader, or even perhaps somehow waiting for the DFU reset before running the sketch may remove this message

However, its not top of my To Do list at the moment ;-)

monster
Posts: 1
Joined: Sat Dec 19, 2015 5:38 pm

Re: STM32 Bootloader on Win7 64bi

Post by monster » Sat Dec 19, 2015 8:32 pm

Hi, New member here.

Where in the bootloader would such a delay go? Maybe I'll experiment with different timings.
I'm having issues with the blue pill switching from DFU to com port, even though I've swapped in the 1.5k resistor and programs run fine, just not the Serial over USB. It has switched to a com port rarely: only twice out of 50+ uploads, but is lost immediately after another DFU upload. I'm wondering if it's related to when the program starts.

Aside: thanks for all the work. It's a great project. :D

User avatar
Kurt_R
Posts: 13
Joined: Thu Nov 05, 2015 1:13 am

Re: STM32 Bootloader on Win7 64bi

Post by Kurt_R » Fri Jan 08, 2016 8:22 am

Howdy, I just got this error and I have no ports for the Maple Mini now!

How can I get the ports back so I can upload to it?

Thanks

EDIT: it also doesn't perform the Blink that I loaded.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest