Skip to main content
DrWidget
Associate II
March 26, 2024
Solved

STM32 Cube IDE 1.15 USB Middleware Codegen Bug

  • March 26, 2024
  • 6 replies
  • 2934 views

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.

 

This topic has been closed for replies.
Best answer by Souhaib MAZHOUD

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

 

6 replies

Associate II
March 27, 2024

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 MAZHOUDBest answer
ST Technical Moderator
March 28, 2024

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

 

To give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Explorer II
April 26, 2024

This is great to hear Dev team knows about issue

 

BUT

 

Can we get fix ASAP PLEASE ?!

Associate II
April 4, 2024

same problem here

LLeva.1
Associate II
April 5, 2024

same problem in STM32F1xxx

 

STM32CubeMX 6.11.0,

 

software package 1.8.5

 

ST Technical Moderator
April 26, 2024

Hello @PR1G0RYAN !

The issue is fixed in STM32CubeMX 6.11.1 

Thank you.

Souhaib

To give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.