2018-02-19 03:13 AM
How can one keep the custom codes in a subroutine where there is no by default a special place for it?
For instance I'm using
MX_TIM1_Init(void)
in which there is no dedicated space for my codes such as
/* USER CODE BEGIN MX_TIM1_Init*/
or something like this.
I tried to put it in different way by naming it as/* USER CODE BEGIN MX_TIM1_Init*/ ,
/* USER CODE BEGIN 10*/ etc
.
Bit still my codes are being deleted after a restart.
2018-04-20 08:04 AM
Hi,
Can you tell me please where you want exactly to add the new user section, and why the existing ones are not enough?
Regards,
Houda
2018-04-20 10:18 AM
You might try to edit that without formatting.
More generally the request would be for automated tools to leave whatever regions of the file are that are explicitly marked with BEGIN/END USER regions alone. The user shouldn't need a 'why', and the tool shouldn't have inflexibility in how it imports/merges boiler plate code.
Automated tools might want to identify and log area of user inserted code if it is not marked properly, or place it within comments. Code being damaged/destroyed is a high frequency complaint in the forum, the tools should 'do no harm' where at all possible.
2018-04-20 10:39 AM
But then, why can't we wish a complete AI tool that writes the code for us? It's close ...
2018-04-20 10:50 AM
People have been promising this for at least 3 decades, and I'm frankly still waiting for my kitchen of the future and my flying car..
I'm just asking for a robot that doesn't indiscriminately stomp on stuff, or purposefully for that matter.
The goal of automation is not to duplicate defects into everything.