cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a directive to demarcate the user code entered?

Not applicable

Device Configuration Tool Code Generation performs a code update, and if the user enters a code in an unmarked location, that code will be deleted.

Is there a directive (something like #codeuser #endcodeuser) to demarcate the user code entered?

5 REPLIES 5
KnarfB
Principal III

/* USER CODE BEGIN ... */

your code here

/* USER CODE END ... */

Not applicable

Yes, that I know, thank you,

But what about subroutines that don't have this comment?

Can i add this comment wherever i want and the generator will keep my code?

Not applicable

I tried to add comments to delimit the user code, but the compiler did not respect the delimitation and deleted the code while updating the code through the generator tool.

It will be very useful to have a tag for the user to be able to modify the library without the generator deleting the manually entered code.

Not applicable

I am getting around the lack of user code policy, with the cloning of modified subroutines saved in the predefined locations for user code, but it is very irritating to have to make comments in parts of code when performing a hardware selection update, via Device Configuration Tool.

Pavel A.
Evangelist III

Microsoft has #pragma region. For similar purposes IIRC.

-- pa