cancel
Showing results for 
Search instead for 
Did you mean: 

my USB CDC IF File was deleted by code automatically without asking

Laksahan
Visitor

I don't know we are going where with this software. after update i was tried some pin name changes and pressed generate code.. and my USB CDC IF file gone.. with my codes.. how do i trust this software.. where do we go.. and now no where to config usb cdc and nothing work instead no usb descriptor error. how to recover? can i go back to old version? why is this software like this?

 

5 REPLIES 5
TDK
Super User

Please don't repost.

Normal USB CDC Cannot Define after update. - STMicroelectronics Community

 

While this may not be the exact same issue, it's clearly heavily related and should be in the same thread.

If you feel a post has answered your question, please click "Accept as Solution".

You might try recovering older instances of a file via File Manager

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Super User

If you have a Windows machine, you can use the Quick Assist app to request help from a remote expert.

Do you remember which version of CubeMX or IDE or libraries you had before update?

PavelA_0-1750278910304.png

 

 

Bob S
Principal

I know this is not any help for your current situation, but for the future:

  • Don't trust any code generator tool
  • Use version control ("git" is free an commonly used, and on Windows comes with a GUI interface as well as command line)
  • Always back up your files (i.e. commit to the version control repository) before you update any tools or re-generate any code
  • Back up your version control repo (clone to GitHub, GitLab, etc. web sites if your company policy allows, else copy to a networked or USB drive.

 

Karl Yamashita
Principal

Been there, done that. 1 hour of coding in main.c and generating code, then the program crashed. Puff, main.c file was gone.

So now you know what could possibly happen when writing your code within ST's file. Lesson learned. So moving forward, you train yourself to write your code in your own files that ST code generation tool can't touch.

I was told that if a devices starts to smoke, put the smoke back in. I guess I never got all the smoke because the device never worked afterwards.
Don't worry, I won't byte.
TimerCallback tutorial! | UART and DMA Idle tutorial!

If you find my solution useful, please click the Accept as Solution so others see the solution.