2025-01-14 12:14 PM
After editing the .IOC file, the code generator will mess up the app_usbx_device.c\MX_USBX_Device_Init() function by placing the code
if (ux_device_stack_initialize(...)
right after the variable declarations at the top of the function.
Typically, that function call should be around line 151 after 6 other function calls initialize all the pointer variables.
The end result is 8 compile warnings about using uninitialized variables.
Attempts to wrap the stack initialization in /* USER CODE BEGIN MX_USBX_Device_Init0 */ don't work, and the code generator will just move it to the top of the file anyway.
What is the work-around for this?
STM32H562VGTx
STM32CubeMX 6.12.0
STM32CubeIDE 1.16.0