Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User code is overwritten on CubeMX code generation #2

Open
lbthomsen opened this issue Sep 22, 2021 · 4 comments
Open

User code is overwritten on CubeMX code generation #2

lbthomsen opened this issue Sep 22, 2021 · 4 comments

Comments

@lbthomsen
Copy link

lbthomsen commented Sep 22, 2021

When generating code from CubeMX all source files are completely overwritten. Even "user code" sections - like this (from usbd_msc_if.c:

/* USER CODE BEGIN PV */
/* Private variables ---------------------------------------------------------*/
uint8_t MSC_Storage[32*1024];
/* USER CODE END PV */

(just one example)

@alambe94
Copy link
Owner

alambe94 commented Oct 6, 2021

CubeMX Templates are not implemented yet.

@lbthomsen
Copy link
Author

Sure :) Let me know if you want me to test something when or if you implement it.

@sammok
Copy link

sammok commented May 17, 2023

for me, the way to solve this problem is make this middleware as yourself's code

once you completed your config, you can try move AL94_USB_Composite/ to root directory out of Middlewares/ and make a copy of Composite/ which in root directory created by I-CUBE-USBD-Composite

then go to the IOC, cancel the I-CUBE-USBD-COMPOSITE

then go to project properties -> C/C++ General -> Paths and Symbols, add AL94_USB_Composite/ and Composite/ path to your compiler

@lbthomsen
Copy link
Author

Been doing the same pretty much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants