cancel
Showing results for 
Search instead for 
Did you mean: 

How do you have to change an ST sample program so that you can use it as your own program

JMüll.1
Associate II

I would like to use the Bluetooth sample program SampleApp as the basis of my own program in such a way that you can call up the ioc file afterwards, change it and save it again without losing the changes in the Bluetooth part. I am not an experienced programmer and therefore not able to create my own program in the time I have. It is therefore important for me that I can integrate my changes into the existing environment without having understood the whole thing in detail. Is there any documentation or best practice for this?

2 REPLIES 2
TDK
Guru

IOC files generate code with USER CODE sections in them. If you put your code within those sections, it should be preserved on code re-generation.

Some examples don't have IOC files, in which case you can just modify the source file directly.

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

> If you put your code within those sections, it should be preserved on code re-generation.

That is true, if it is activated (default):

Project Manager > Code Generator --> Keep User Code when re-generated

In order 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.