This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS1224: Code Security against Halcogen changes

Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN

Hello Team,

In our product we are using Halcogen for code generation. whenever we modify the halcogen GUI, the Source and Include folders will be modified by the changes made in the GUI(it is expected).

Now i have a  question regarding Halcogen GUI 

1) Is there any way by which the changes in Halcogen GUI will not be reflected in the Source & include files??

2) Is there any way by which my code will not be changed against any Halcogen GUI changes??

I see this as a limitation because any one can change the halcogen gui which will change the functionality of the code. Any way to counter resist this halcogen changes??

Thanks In advance 

  • Hello Mallela,

    How id this different than the risk that a value is inadvertently changed by a cut and past or accidental key press in the code editor? It is really a question of testing by the integrator to insure the requirments are met and that the device is operating as intended. However, once the HalCoGen config is locked in, why would it be opened in Halcogen again? And why would you not keep the production code in a separate folder than the Halcogen accessible code?

    Finally, given your use case, you could write protect the .hcg and .dll files associated with the project so they are read only. This would prevent the Halcogen project specific files from being overwritten when the file is saved. I've not tried this final suggestion to see what impact it would have and if there would still be a possibility to modify the code with an unsaved project. There is also a backup file created that could be used to restore the project if it were inadvertently changed. I would also recommend the use of a configuration management tool to modify the mainline project files such as the HCG and DLL files. This way it would have to be checked out, modified, and checked in to change it intentionally.
  • Hello Kumar,

    HALCoGen is able to maintain edits that you make to the generated source code, as long as these edits appear between comments USER CODE BEGIN and USER CODE END.

    For example, by default HALCoGen generates the empty main() function (in file ‘sys_main.c’) as shown below.

    Any code that you add to main() between the comments USER CODE BEGIN (x) and USER CODE END will be maintained even if you make another pass through HALCoGen and regenerate code after having changed various settings. You can edit sys_main.c through the Code Composer Studio IDE, and add functionality.

    After you build the code, and start debugging, and then decide to change some settings for example PLL settinfs.

    You can go back to the HALCoGen GUI, make changes to the PLL settings, and regenerate the code. Any code additions that you made in the areas marked for user additions will be preserved through the regeneration process. (between USER CODE BEGIN and USER CODE END comments); then the code changes are preserved through a cycle of regeneration.

    regards,

    QJ