cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX doesnt generate MX_USB_DEVICE_Init function when FreeRTOS+USB CDC (Device) are selected together

Javier1
Principal

0693W00000QNJXEQA5.pngI am using recently updated CUBEMX version 6.6.1

As soon as i enable FreeRTOS cmss_v2 in cubeMX the USB init disappears...

0693W00000QNJYCQA5.png 

 MX_USB_DEVICE_Init is nowhere to be found........

we dont need to firmware by ourselves, lets talk
1 ACCEPTED SOLUTION

Accepted Solutions

0693W00000QNPf9QAH.png 

there is not USB_DEVICE folder generated in my project

I realiced the USB files are located directly under src/ directory now.

The directories where cubeMX puts the usb files have changed?

MX_USB_DEVICE_Init needs to be put manually in main.c .

/* USER CODE BEGIN 2 */
 
 MX_USB_DEVICE_Init();
 
 /* USER CODE END 2 */

we dont need to firmware by ourselves, lets talk

View solution in original post

5 REPLIES 5
Javier1
Principal

No clue of what is going on yet....

this guy pulls it out without problem https://www.youtube.com/watch?v=QZaC2Qf5bJI and i believe we do the same steps.

i tried with CMSIS v1 ... same issue

we dont need to firmware by ourselves, lets talk

tried the same thing with cubeMX 6.3.0, same issue.

we dont need to firmware by ourselves, lets talk

That youtube video is uploaded on 16th october 2020.

This means the cubeMX version he uses should be older than 6.1.0

0693W00000QNPJ8QAP.png

we dont need to firmware by ourselves, lets talk

I tried out cubeMX

  • 6.1.0
  • 5.6.1

and the issue is still there, im starting to think its not a version problem

we dont need to firmware by ourselves, lets talk

0693W00000QNPf9QAH.png 

there is not USB_DEVICE folder generated in my project

I realiced the USB files are located directly under src/ directory now.

The directories where cubeMX puts the usb files have changed?

MX_USB_DEVICE_Init needs to be put manually in main.c .

/* USER CODE BEGIN 2 */
 
 MX_USB_DEVICE_Init();
 
 /* USER CODE END 2 */

we dont need to firmware by ourselves, lets talk