Skip to main content
Renesas Electronics Europe - Knowledgebase

How to keep the code changed?

Last Updated:11/22/2017


Even when I change the source code generated by the code generator plug-in or AP4, it is restored to its original form if I re-execute code generation. How do I keep the code changed?


Any codes out of user code comment block can be overwritten by the code generation tools.
With the file operation below, you can prevent code generation overwriting changes to files.

  1. Open the folder containing the source file generated by the coding assistance tool in the Internet Explorer.
  2. Copy the file which is not to be overwritten, and give it a desired name.
  3. Add the file with the new name to the project in the integrated development environment.
  4. Remove the file from which you copied it from the list of targets for building.

Note: A user code protection function is provided for the coding assistance tool so that users can add unique code within the comments stating that user code is to be placed within them. If you write code between the comments, the code you add will be protected even when you run code generation again.

[Comments for the writing of user code]
/* Start user code. Do not edit comment generated here */
/* End user code. Do not edit comment generated here */

Related FAQ: No. FAQ 1011724

Suitable Products
e² studio
CS+ (formerly CubeSuite+)
Coding Assistance