cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Cube IDE 1.15 USB Middleware Codegen Bug

DrWidget
Associate II

Steps to reproduce:

  • Create a new project with an STM32F779NIH processor
  • Enable USB OTG highspeed (device only)
  • Add USB_Device middleware (select any class)
  • Generate the project code

Inside the USB_DEVICE/App/usbd_desc.c file, the GetSerialNum(void) function, the code is generated with uninitialized device serial variables:

 

static void Get_SerialNum(void)

{

  uint32_t deviceserial0;

  uint32_t deviceserial1;

  uint32_t deviceserial2;

  deviceserial0 += deviceserial2;

  if (deviceserial0 != 0)

  {

    IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8);

    IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4);

  }

}

 

As there is no user block of code, every time my code is regenerated, I need to update those three lines again with:

 

uint32_t deviceserial0 = *(uint32_t *) DEVICE_ID1;

uint32_t deviceserial1 = *(uint32_t *) DEVICE_ID2;

uint32_t deviceserial2 = *(uint32_t *) DEVICE_ID3;

 

Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Souhaib MAZHOUD
ST Employee

Hello @DrWidget and @bruno_b2s 

Thank you for reporting.

Actually, this issue has been already reported internally to Dev team for correction (under internal ticket number 177153) and this will be fixed ASAP.

Thank you!

Souhaib

 

View solution in original post

6 REPLIES 6
bruno_b2s
Associate II

Same problem here with STM32L462VETx and USB Virtual Port Com class. The warnings appeared when regenerating code after STM32CubeIDE update to Version: 1.15.0.

Souhaib MAZHOUD
ST Employee

Hello @DrWidget and @bruno_b2s 

Thank you for reporting.

Actually, this issue has been already reported internally to Dev team for correction (under internal ticket number 177153) and this will be fixed ASAP.

Thank you!

Souhaib

 

Nexum
Associate II

same problem here

LLeva.1
Associate III

same problem in STM32F1xxx

 

STM32CubeMX 6.11.0,

 

software package 1.8.5

 

This is great to hear Dev team knows about issue

 

BUT

 

Can we get fix ASAP PLEASE ?!

Souhaib MAZHOUD
ST Employee

Hello @PR1G0RYAN !

The issue is fixed in STM32CubeMX 6.11.1 

Thank you.

Souhaib