USBserial don’t works – what’s wrong?

vde
Wed Jan 11, 2017 3:37 pm
MapleMini clone, bootloader works fine – but when control switches to application (even Bootloader Updater) host gets error:
bootloader’s log
[4409331.689199] usb 4-1.6.2: new full-speed USB device number 97 using ehci-pci
[4409331.775147] usb 4-1.6.2: New USB device found, idVendor=1eaf, idProduct=0003
[4409331.775151] usb 4-1.6.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[4409331.775152] usb 4-1.6.2: Product: Maple 003
[4409331.775154] usb 4-1.6.2: Manufacturer: LeafLabs
[4409331.775155] usb 4-1.6.2: SerialNumber: LLM 003
[4409334.581412] usb 4-1.6.2: USB disconnect, device number 97

victor_pv
Wed Jan 11, 2017 7:19 pm
Did you check the value of the pull up resistor in the bluepill board?
Should be 1k5, or as close as possible, other values may cause re-enumeration issues.
Other than that, may help to report what OS you are using, and perhaps testing with an older version of the core in case something has changed recently.

stevestrong
Wed Jan 11, 2017 8:19 pm
I assume you are on a Linux machine.
I think your Arduino IDE version is a bit old (1.6.2.).
Please try to use at least 1.6.9.

vde
Wed Jan 11, 2017 10:31 pm
victor_pv wrote:Did you check the value of the pull up resistor in the bluepill board?

mrburnette
Thu Jan 12, 2017 3:48 am
vde wrote:MapleMini clone, bootloader works fine – but when control switches to application (even Bootloader Updater) host gets error:

ps. it was compiled with -O0 or -Os without any difference. Library downloaded yesterday from Github

RogerClark
Thu Jan 12, 2017 7:05 am
vde wrote:

You are wrong, this is Arduino 1.8.1

vde
Thu Jan 12, 2017 7:43 am
mrburnette wrote:Therefore, you must select the board Maple Mini and the correct bootloader version from the ArduinoIDE dropdown.

stevestrong
Thu Jan 12, 2017 8:03 am
Can you post the compiler verbose output by building the blink sketch? Maybe we can find out some issues from there.
The serial USB should be defined and compiled when the “STM32duino bootloader” is selected in IDE as upload option, otherwise is not sure.

vde
Thu Jan 12, 2017 8:10 am
my logs are similar to logs viewtopic.php?t=1032 – but now “volatile” present and moreover I build with -O0 to exclude optimozer’s issues

vde
Thu Jan 12, 2017 8:19 am
stevestrong wrote:Can you post the compiler verbose output by building the blink sketch? Maybe we can find out some issues from there.

stevestrong
Thu Jan 12, 2017 8:24 am
I didn’t mind the kernel’s log, but the build log output from the IDE.

Pito
Thu Jan 12, 2017 8:24 am
PS. I have ST-link and Eclipse so can debug STM32 – but USB issues are very hard to debug :(
Don’t even try to step through the code with a debugger while using USB as Serial. 99% time you will mess with dead everything :)

vde
Thu Jan 12, 2017 8:33 am
Pito wrote:PS. I have ST-link and Eclipse so can debug STM32 – but USB issues are very hard to debug :(
Don’t even try to step through the code with a debugger while using USB as Serial. 99% time you will mess with dead everything :)

vde
Thu Jan 12, 2017 8:34 am
stevestrong wrote:I didn’t mind the kernel’s log, but the build log output from the IDE.

vde
Thu Jan 12, 2017 9:44 am
a similar error also versed there – http://stackoverflow.com/questions/2728 … 4-error-18

And one else – https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64953


stevestrong
Thu Jan 12, 2017 1:21 pm
As you already figured out, the problem may be caused by the new compiler version 4.9.x.
As temporary solution, try a clean install to downgrade the IDE to 1.6.12, which uses gcc 4.8.3-q4 (I think). Anyway, try to use the gcc 4.8.3.

vde
Thu Jan 12, 2017 3:52 pm
stevestrong wrote:As you already figured out, the problem may be caused by the new compiler version 4.9.x.
As temporary solution, try a clean install to downgrade the IDE to 1.6.12, which uses gcc 4.8.3-q4 (I think). Anyway, try to use the gcc 4.8.3.

Rick Kimball
Thu Jan 12, 2017 5:08 pm
vde wrote:… I can’t use Arduino’s compiler because this is not the only project on ARM :)

Pito
Thu Jan 12, 2017 8:19 pm
In Win7
C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1

victor_pv
Fri Jan 13, 2017 3:29 am
vde wrote:stevestrong wrote:As you already figured out, the problem may be caused by the new compiler version 4.9.x.
As temporary solution, try a clean install to downgrade the IDE to 1.6.12, which uses gcc 4.8.3-q4 (I think). Anyway, try to use the gcc 4.8.3.

stevestrong
Fri Jan 13, 2017 9:15 am
@vde
I am aware that USB can be buggy. I just wanted to ask you to try with 4.8.3 to see whether is working or not.

If it is working, than it is for sure the USB SW + compiler issue, which we could then check.

Of course, you could also help by posting the disassembled version of the questioned USB module(s) for both compiler versions, just to easy our collective work, as we are doing all this in our free time…


vde
Sat Jan 14, 2017 11:11 pm
stevestrong wrote:I just wanted to ask you to try with 4.8.3 to see whether is working or not.

vde
Sat Jan 14, 2017 11:15 pm
victor_pv wrote:Could be a bug in the compiler too

victor_pv
Sun Jan 15, 2017 3:05 am
vde wrote:victor_pv wrote:Could be a bug in the compiler too

VadimEL
Sun Jan 15, 2017 8:16 am
USB COM disappear, do not know where is it, meybe i upload mini boot loader and com port disappear?
And SoftwareSerial stop work :(

stevestrong
Sun Jan 15, 2017 1:48 pm
Double-check that the allocated pins for software serial are not disturbing the USB pins (PA11/PA12 on blue pill).
Also, I wold strongly recommend to use the PXY notation for the port pins instead of raw numbers.
For example, use “PA7” instead of “4” (on blue pill).

VadimEL
Mon Jan 16, 2017 11:46 am
sorry i am stupid, choose generic – but have maple mini.

stevestrong
Mon Jan 16, 2017 12:34 pm
@Vadim, please add to the title [SOLVED], if your problem is solved now.

zmemw16
Tue Jan 17, 2017 12:02 am
i use stlink pretty much for all, even ‘baite MM’.
if i use MM then stlink is not available, so i tend to use generic 103c and b variant

why should it make a difference, if so what is/are the difference(s) ?

stephen


vde
Tue Jan 17, 2017 7:07 pm
victor_pv wrote:vde wrote:victor_pv wrote:Do you mean that because ARM approved it would not have bugs? I have to disagree.

mrburnette
Wed Jan 18, 2017 2:21 am
vde wrote:That bugs are very rare, and moreover a lots of programs which works fine after 5.4 now even don’t starts after 6.1. Surprise :mrgreen:

fredbox
Sat Jan 21, 2017 5:21 pm
For the Arduino Community, changes can be difficult; stuff works OK in an older version but the IDE tosses all manner of errors/warning on just a simple ‘.1’ upgrade.
True. The latest 1.8.1 compiler throws all sorts of warnings that weren’t there on 1.6.x, but my program still works as it always did.

vde
Mon Jan 23, 2017 11:21 am
There is a Standards organization that set the “rules” for C++ and these rules are incorporated into new releases of GCC

It’s the philosophy which does not help in answering the question “why the VCP does not work with less ancient compiler”


stevestrong
Mon Jan 23, 2017 12:49 pm
stevestrong wrote:@vde
you could also help by posting the disassembled version of the questioned USB module(s) for both compiler versions, just to easy our collective work, as we are doing all this in our free time…

Rick Kimball
Mon Jan 23, 2017 4:00 pm
vde wrote:There is a Standards organization that set the “rules” for C++ and these rules are incorporated into new releases of GCC

It’s the philosophy which does not help in answering the question “why the VCP does not work with less ancient compiler”


RogerClark
Mon Jan 23, 2017 10:04 pm
Rick

Judging by the PR for to fix the bootloader to make it work with gcc 5.2, there were differences in when the compiler put stuff onto the stack, which caused that particular issue, so I’m sure there are loads of internal differences between compiler versions.
Hence why code normally indicates which compiler (and version) is required.

e.g the bootloader fix was
https://github.com/rogerclarkmelbourne/ … 86dc865f18

I find it a bit odd that people expect to be able to update the compiler to a version which is not supported, and then complain that things don’t work.

Likewise, people complain that the core doesnt work correctly with Platformuino or VisualStudio etc, despite the Readme explicitly saying that the core works with a specific version of the Arduino IDE (and hence people should presume that it won’t necessarily work with any other IDE or compiler that they fancy using)


victor_pv
Mon Jan 23, 2017 11:14 pm
RogerClark wrote:Rick

Judging by the PR for to fix the bootloader to make it work with gcc 5.2, there were differences in when the compiler put stuff onto the stack, which caused that particular issue, so I’m sure there are loads of internal differences between compiler versions.
Hence why code normally indicates which compiler (and version) is required.

e.g the bootloader fix was
https://github.com/rogerclarkmelbourne/ … 86dc865f18

I find it a bit odd that people expect to be able to update the compiler to a version which is not supported, and then complain that things don’t work.

Likewise, people complain that the core doesnt work correctly with Platformuino or VisualStudio etc, despite the Readme explicitly saying that the core works with a specific version of the Arduino IDE (and hence people should presume that it won’t necessarily work with any other IDE or compiler that they fancy using)


RogerClark
Tue Jan 24, 2017 1:29 am
Victor

This situation happens a lot.

People seem to treat open source software as if it was commercial software they paid for and offered service level guarantees and free support.

I find I get random questions in comments to my blog, and to my youtube videos and also emails direct to me (often via youtube), as if I offer some free support service for anything related to STM32, nRF51 or microcontrollers etc in general.

I’ve given up replying to these, as I have had personal abuse for pointing out that its open source / free / non commercial and its up to them to fix it if it doesn’t happen to work for their person configuration.


mrburnette
Tue Jan 24, 2017 2:26 am
victor_pv wrote:
RogerClark wrote:

I find it a bit odd that people expect to be able to update the compiler to a version which is not supported, and then complain that things don’t work.

Likewise, people complain that the core doesnt work correctly with Platformuino or VisualStudio etc, despite the Readme explicitly saying that the core works with a specific version of the Arduino IDE (and hence people should presume that it won’t necessarily work with any other IDE or compiler that they fancy using)


RogerClark
Tue Jan 24, 2017 4:00 am
Thanks Ray

It did stress me out for about 5 mins, but now that I just delete any such email, I got some of my life back ;-)

I get enough stress with work (being freelance) that I don’t need additional load and stress from people I don’t know, making unreasonable demands of me.

But I consider it their problem not mine.


Leave a Reply

Your email address will not be published. Required fields are marked *