Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing USB CDC config for GenC0 #2582

Closed
thernstig opened this issue Nov 26, 2024 · 4 comments · Fixed by #2584
Closed

Missing USB CDC config for GenC0 #2582

thernstig opened this issue Nov 26, 2024 · 4 comments · Fixed by #2584
Labels
enhancement New feature or request
Milestone

Comments

@thernstig
Copy link
Contributor

When checking boards.txt I see things like:

GenG0.menu.usb.none=None
GenG0.menu.usb.CDCgen=CDC (generic 'Serial' supersede U(S)ART)
GenG0.menu.usb.CDCgen.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC
GenG0.menu.usb.CDC=CDC (no generic 'Serial')
GenG0.menu.usb.CDC.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB
GenG0.menu.usb.HID=HID (keyboard and mouse)
GenG0.menu.usb.HID.build.enable_usb={build.usb_flags} -DUSBD_USE_HID_COMPOSITE

But I cannot see this for GenC0. Is this a bug/oversight?

@fpistm
Copy link
Member

fpistm commented Nov 26, 2024

Hi @thernstig
USB on C0 is new. It cames with C071xx.
I have to test it as I didn't have the board when added.
I've received the board yesterday and so I will be able to test soon.

@fpistm
Copy link
Member

fpistm commented Nov 26, 2024

Note you can add it using Arduino feature:
boards.local.txt

@thernstig
Copy link
Contributor Author

thernstig commented Nov 26, 2024

Note you can add it using Arduino feature: boards.local.txt

I unfortunately do not know how to test it myself :(

@fpistm I am not even sure how this works when using the STM32 MCUs such as C071xx. If we look at ATMega MCUs, their bootloader supports USB CDC by default and can be set to upload new firmware via the Arduino IDE via USB CDC.

But STM32 C071 default booatloader does not have USB CDC; only USB DFU.

So I cannot even grasp how it can work for this stm32duino to allow for the Arduino IDE to upload new firmware via the COM-port.

@fpistm fpistm changed the title Bug: Missing USB CDC config for GenC0 Missing USB CDC config for GenC0 Nov 27, 2024
@fpistm fpistm added the enhancement New feature or request label Nov 27, 2024
@fpistm fpistm added this to the 2.10 milestone Nov 27, 2024
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this issue Nov 27, 2024
Enable the HSI48 for USB (not done thanks CubeMX code generation).
Add GenC0 USB menu.
Moved G0 one in alphabetical order.

Fixes stm32duino#2582.

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm
Copy link
Member

fpistm commented Nov 27, 2024

Note you can add it using Arduino feature: boards.local.txt

I unfortunately do not know how to test it myself :(

You can refer to Arduino documentation: https://arduino.github.io/arduino-cli/0.34/platform-specification/#boardslocaltxt

@fpistm I am not even sure how this works when using the STM32 MCUs such as C071xx. If we look at ATMega MCUs, their bootloader supports USB CDC by default and can be set to upload new firmware via the Arduino IDE via USB CDC.

But STM32 C071 default booatloader does not have USB CDC; only USB DFU.

So I cannot even grasp how it can work for this stm32duino to allow for the Arduino IDE to upload new firmware via the COM-port.

Arduino probably use the 1200bps feature which is catched by the USB CDC then reboot in bootloader mode.
At this time this is not supported here. You have to manually enter in BL mode.
I've made a PR several years ago as a POC but never find the time to end it (#710).

Anyway, I've tested USB and enable it properly, see #2584.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

2 participants