STM32_HID_Bootloader icon indicating copy to clipboard operation
STM32_HID_Bootloader copied to clipboard

Serial via USB

Open toogooda opened this issue 4 years ago • 12 comments

Got it to upload but then com port disappears is there supposed to be serial support when using this boot-loader?

After flashing boot loader with stlink It does not show as a com port but does not error.

Output of upload

> Trying to open the [COM7]...
> Unable to open the [COM7]
> Searching for [1209:BEBA] device...
#
> [1209:BEBA] device is found !
> Sending <reset pages> command...
> Flashing firmware...
. 1024 Bytes
. 2048 Bytes
. 3072 Bytes
. 4096 Bytes
. 5120 Bytes
. 6144 Bytes
. 7168 Bytes
. 8192 Bytes
. 9216 Bytes
. 10240 Bytes
. 11264 Bytes
. 12288 Bytes
. 13312 Bytes
. 14336 Bytes
. 15360 Bytes
. 16384 Bytes
. 17408 Bytes
. 18432 Bytes
. 19456 Bytes
. 20480 Bytes
. 21504 Bytes
. 22528 Bytes
. 23552 Bytes
. 24576 Bytes
. 25600 Bytes

> Done!
> Sending <reboot mcu> command...
> Searching for [COM7] ...
> Finish
processing.app.SerialException: Error opening serial port 'COM7'.
	at processing.app.Serial.<init>(Serial.java:147)
	at processing.app.Serial.<init>(Serial.java:82)
	at processing.app.SerialMonitor$4.<init>(SerialMonitor.java:101)
	at processing.app.SerialMonitor.open(SerialMonitor.java:101)
	at processing.app.AbstractMonitor.resume(AbstractMonitor.java:104)
	at processing.app.Editor.resumeOrCloseSerialMonitor(Editor.java:2126)
	at processing.app.Editor.access$1300(Editor.java:115)
	at processing.app.Editor$UploadHandler.run(Editor.java:2104)
	at java.lang.Thread.run(Thread.java:748)
Caused by: jssc.SerialPortException: Port name - COM7; Method name - openPort(); Exception type - Port not found.
	at jssc.SerialPort.openPort(SerialPort.java:167)
	at processing.app.Serial.<init>(Serial.java:136)
	... 8 more
Error opening serial port 'COM7'.

Checked in device manager it is showing as COM4 with error

This device cannot start. (Code 10)

{Operation Failed}
The requested operation was unsuccessful.

No further uploads work and com4 is not selectable

> Trying to open the [COM7]...
> Unable to open the [COM7]
> Searching for [1209:BEBA] device...
##########
Error - [1209:BEBA] device is not found :(> Searching for [COM7] ...
> Finish
the selected serial port > Finish
 does not exist or your board is not connected

No issues using serial/stlink or maple bootloader

toogooda avatar Nov 30 '19 04:11 toogooda

It uses the HID interface, not serial.

ssieb avatar Nov 30 '19 04:11 ssieb

It uses the HID interface, not serial.

Yes thanks, my question is does that then mean I can't get my serial debug output via the usb because it is being used as a HID or is this part of the bug that then stops all other uploads after the first one?

toogooda avatar Nov 30 '19 07:11 toogooda

If you use this bootloader, then you need to use the HID uploader. Once your sketch is running, it will enable the serial port. (This is my recollection, I haven't actually used this device for a while.)

ssieb avatar Nov 30 '19 07:11 ssieb

If you use this bootloader, then you need to use the HID uploader. Once your sketch is running, it will enable the serial port. (This is my recollection, I haven't actually used this device for a while.)

Great thank you that is what I wanted to know. I am using the ST uploader HID option so there seems to be a bug with it. As it does the upload but then the COM port fails and there is no serial output.

toogooda avatar Nov 30 '19 07:11 toogooda

Is this still active? great idea but looks like its not actively being worked on.

toogooda avatar Feb 10 '20 21:02 toogooda

what core did you use? it work so what you want to add/change?

uzi18 avatar Feb 10 '20 21:02 uzi18

what core did you use? it work so what you want to add/change? Upload works first time only but then no serial is possible which is a show stopper. Further uploads all fail until i flash the bootloader again. Tried it in multiple devices. Used latest version and Win10 and arduino IDE

toogooda avatar Feb 11 '20 19:02 toogooda

ok but what core you use for it?

uzi18 avatar Feb 11 '20 19:02 uzi18

ok but what core you use for it?

Offical ST one think out is called STM32duino

toogooda avatar Feb 11 '20 19:02 toogooda

version?

uzi18 avatar Feb 11 '20 19:02 uzi18

AT work so not sure sorry will update tonight. Its 9am here :)

toogooda avatar Feb 11 '20 20:02 toogooda

10pm here and afterwork :)

uzi18 avatar Feb 11 '20 21:02 uzi18