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
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.
I think your Arduino IDE version is a bit old (1.6.2.).
Please try to use at least 1.6.9.
…
ps. it was compiled with -O0 or -Os without any difference. Library downloaded yesterday from Github
You are wrong, this is Arduino 1.8.1
The serial USB should be defined and compiled when the “STM32duino bootloader” is selected in IDE as upload option, otherwise is not sure.

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


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

And one else – https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64953
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.
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.

C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1
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.
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…
And SoftwareSerial stop work

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).
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

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.
It’s the philosophy which does not help in answering the question “why the VCP does not work with less ancient compiler”
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…
It’s the philosophy which does not help in answering the question “why the VCP does not work with less ancient compiler”
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)
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)
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.
…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)
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.