2023-01-16 06:36 PM
As an example, I have added Segger System View to the FreeRTOS and decided to add (say) SPI HAL driver or modify the system clock from CubeMX from LL driver, how to make Cube MX aware I do not want to overwrite/update the FreeRTOS or similar code blocks?, any suggestion?. The FreeRTOS does not have all the protected domains, especially from the segger patch file.
2023-01-17 06:50 AM
Hello @Community member
First let me thank you for posting.
I want to start by asking you to be a little more clearer about the modification you have done which you want to protect.
If I am well understanding the question, you made modification to the FreeRtos middleware's file and you want to protect the modification when regenerating code with CubeMx.
Waiting for your feedback.
Kind regards,
Semer.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-01-20 05:32 PM
Sorry for late reply, I have been busy of late. Yes, that is correct. I have looked into the backup code before changing as well as generating peripheral pairs within Code Generator, but they do not protect middleware. I have offloaded the non-CubeMX regulated code into another folder to preserve them so I can apply the CubeMX config change, but I need more protection options from middleware and alike.
2023-01-23 07:43 AM
Hello @Community member
Thanks for your reply.
What I want to say is that as you already know, the CubeMX tool will keep only the user code put between the "USER CODE BEGIN" and the "USER CODE END" comment in the files generated by the tool.
However, the drivers and middleware's source code files are not generated by CubeMX when generating the project; but they are copied from the firmware package.
So, whenever you make a modification for the middleware's files and regenerate the project, the tool will copy again those files from the FW pack and overwrite your modifications.
So, in this use case this is my advice:
Try this approach and give me your feedback.
Kind regards,
Semer.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.