Hello @DavePfz
Let me thank you for your feedback.
When CubeMX regenerates the project, files that are part of the user/application layer may be overwritten by the generated template content. If hrs_app.c in the generated project is smaller than the version in the example package, it usually means the file was regenerated from the CubeMX template rather than copied as-is from the reference example.
The BLE example contains application code that is not always preserved automatically during regeneration. Copying the reference hrs_app.c from the example into the generated project restores the complete implementation and removes the warnings, which is consistent with the example structure.
What to check
- Verify that the correct BLE middleware/example package version is being used.
- Compare the generated
hrs_app.c with the one from the original example package. - Ensure user code is placed only in the designated
/* USER CODE BEGIN */ sections, so it survives regeneration. - If the project was created by modifying an example, re-importing the example structure may be safer than regenerating only from CubeMX.
Thanks.
Mahmoud
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.