USB reset issue in the Bootloader and libmaple core

Information on the latest releases
User avatar
RogerClark
Posts: 7447
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: USB reset issue in the Bootloader and libmaple core

Post by RogerClark » Wed Jun 08, 2016 11:57 am

BTW.

your board is a Baite board, but sold by someone else.

Some of these third party suppliers of Baite boards, just repair reject boards. So there is a chance that it has a hardware fault.

Of course you could try reflashing back to the original Maple bootloader. You loose 3k of Ram and something like 8k of flash, but at least it would work.

User avatar
SukkoPera
Posts: 23
Joined: Tue Jun 07, 2016 11:02 pm
Location: Turin, Italy
Contact:

Re: USB reset issue in the Bootloader and libmaple core

Post by SukkoPera » Wed Jun 08, 2016 12:10 pm

Yesterday I also tried to put back the original Maple bootloader, but I couldn't find it anywhere. Anyway, I haven't done extensive testing, but uploads seem to work fine with the 11-months-old bootloader 2.0, so that seems OK.

My board looks fine at first glance, the Baite logo is well-printed and the general manufacturing quality seems good. I will have a deeper look at it.

I will also try the Python tool tonight.

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

Re: USB reset issue in the Bootloader and libmaple core

Post by mrburnette » Wed Jun 08, 2016 2:22 pm

SukkoPera wrote:Yesterday I also tried to put back the original Maple bootloader, but I couldn't find it anywhere. Anyway, I haven't done extensive testing, but uploads seem to work fine with the 11-months-old bootloader 2.0, so that seems OK.

My board looks fine at first glance, the Baite logo is well-printed and the general manufacturing quality seems good. I will have a deeper look at it.

I will also try the Python tool tonight.
Here is the deal from my 2 years of experience with the STM32F1xx under ArduinoIDE: stay with what works.

Even those senior members of this forum sometime screw-up my mucking where no duck should go. If you are not an expert, it is best to stay in a working steady-state mode of operation. We have enough issues with the IDE revisions. There is not a staff of moderators here to answer simple questions so to keep from overloading the forum, members do not need to be creating a crisis. I'm retired and on here more than others, but most members have day jobs and limited time to work through non-critical issues.
original Maple bootloader, but I couldn't find it anywhere
: here

Ray

User avatar
SukkoPera
Posts: 23
Joined: Tue Jun 07, 2016 11:02 pm
Location: Turin, Italy
Contact:

Re: USB reset issue in the Bootloader and libmaple core

Post by SukkoPera » Wed Jun 08, 2016 8:34 pm

So, what I did was just checking out the master branch, rebuilding the bootloader as-is and... it works! So maybe it's just a bad build you have there? I saw you have a warning to use GCC 4.8 and not 4.9. I actually used the one that somehow was already on my system:

arm-elf-eabi-gcc (GCC) 4.4.4

I'm attaching the one that works here, maybe if rolo can give it a try...
Attachments
maple_mini_boot20.zip
(4.91 KiB) Downloaded 32 times

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

Re: USB reset issue in the Bootloader and libmaple core

Post by RogerClark » Wed Jun 08, 2016 9:10 pm

Just to clarify..

I think you said the :P Updater sketch version does not work for you ??

Can you confirm this?

Overall, there may be some compiler version issue, that effects some host systems.
But if the Updater sketch version fails for you, it means the problem has existed for many months, as I have not applied any changes to the Updater sketch since it was first created

User avatar
SukkoPera
Posts: 23
Joined: Tue Jun 07, 2016 11:02 pm
Location: Turin, Italy
Contact:

Re: USB reset issue in the Bootloader and libmaple core

Post by SukkoPera » Wed Jun 08, 2016 9:48 pm

Well, no. I can't get the serial monitor to work. When I open it it's just empty, sometimes I get:

Errore nell'apertura della porta seriale "/dev/ttyACM0" (Port busy)
(Error opening serial port)

But sometimes I don't, it just sits there blank.

From the sketch I also see that the led should start blinking at 1 sec intervals at boot, but it only did so once. The led stays lit after the initial blinks by the bootloader.

Maybe there's something on my system that enumerates the serial port weirdly? Although I never experienced anything similar, not even with Arduino Leonardo.

EDIT: It took me a bit of a hard time, I had to hack the updater's setup() but I managed to run it:
Writing flash page 1 of 7
Writing flash page 2 of 7
Writing flash page 3 of 7
Writing flash page 4 of 7
Writing flash page 5 of 7
Writing flash page 6 of 7
Writing flash page 7 of 7

Update completed successfully. - Please test by uploading a different sketch
I can confirm it works fine. Yesterday I never got anything to show on the serial monitor at all, so maybe i just never started the updating.
Last edited by SukkoPera on Wed Jun 08, 2016 10:19 pm, edited 1 time in total.

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

Re: USB reset issue in the Bootloader and libmaple core

Post by RogerClark » Wed Jun 08, 2016 10:15 pm

What OS and hardware are you running.

Sounds like Linux.

Have you looked at the udev rules etc (or checked the permissions)

Actually it doesnt sound like its a permissions issue. I presume you have listed the usb devices that the machine can see.

Please remember that until you upload a sketch that uses Serial, the USB device is not initialized, so you will not see it.

User avatar
SukkoPera
Posts: 23
Joined: Tue Jun 07, 2016 11:02 pm
Location: Turin, Italy
Contact:

Re: USB reset issue in the Bootloader and libmaple core

Post by SukkoPera » Wed Jun 08, 2016 10:20 pm

Yes, it's Slackware Linux. No permission issue, I've been using all kinds of Arduinos, ESP8266's and Teensy's for ages. Never had any similar problems. Anyway I got it working, see above. ;)

EDIT: The serial issue also happens on my other board, so it's not Mini-specific. It seems that when I connect a board, I have to let it sit there for a 30 secs or so, and only then open the serial monitor. The port is somehow busy sooner than that.

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

Re: USB reset issue in the Bootloader and libmaple core

Post by mrburnette » Wed Jun 08, 2016 10:29 pm

SukkoPera wrote:Yes, it's Slackware Linux. No permission issue, I've been using all kinds of Arduinos, ESP8266's and Teensy's for ages. Never had any similar problems. Anyway I got it working, see above. ;)
Beware that under Mint, my enumeration is so fast that if I reset the uC, sometimes(often) Linux will enumerate a new device and the open IDE Monitor is on an orphaed port.

Ray

User avatar
SukkoPera
Posts: 23
Joined: Tue Jun 07, 2016 11:02 pm
Location: Turin, Italy
Contact:

Re: USB reset issue in the Bootloader and libmaple core

Post by SukkoPera » Wed Jun 08, 2016 10:35 pm

Nope, that's not the problem.

I also noticed that when I get the serial monitor working, I can't upload any programs unless I close it, as it keeps the port busy.

Post Reply