Skip to main content
Senior
August 12, 2025
Question

use AZRTOS or USB VCP, you can only use one

  • August 12, 2025
  • 1 reply
  • 236 views

hello, 

I usually design borad with stm32g474vet6, i use USB VCP as serial debug port, juse insert to usb port of PC, then can use printf to print debug information.

 

this time, i want to use threadX OS, that is, AZRTOS, when i config AZRTOS with stm32cubeMX, i found you can only choose one item, if you use AZRTOS, you can not use USB VCP, if you use USB VCP, you cannot use AZRTOS.

why?

here is picture for choose item.

dqsh06_0-1754986529261.png

i config USB port for Device and CDC, but cannot.

Thanks,

 

1 reply

Ghofrane GSOURI
Technical Moderator
August 12, 2025

Hello @dqsh06 

 To use USB VCP with AZRTOS, select the USBX Device middleware in CubeMX, which ensures proper operation and compatibility with the RTOS

GhofraneGSOURI_0-1754988741827.png

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
dqsh06Author
Senior
August 13, 2025

Hello @Ghofrane GSOURI ,

I did config the USBX Device middleware in CubeMX as your picture, and generated the code, it can be build without errors. but i dont know how to modify the files to make a function like usb_printf(fmt...) just as printf. 

could your give some examples?

 

Thanks a lot!