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.

LAUNCHXL2-TMS57012: How to use HalCoGen with an existing CCS project

Part Number: LAUNCHXL2-TMS57012
Other Parts Discussed in Thread: HALCOGEN

Hi Team,

I'm new to working with both the TMS570xx MCUs and HalCoGen. I have expansive existing code for the Launchpad, and I need to add additional features. HalCoGen creates all of the needed .c and .h files, not just the ones directly associated with the customized configurations in HalCoGen. Is there an easy way to see the short snippets of code that I need to add to my project? 

The feature I need to add is an 8MHz clock output. Would you recommend using the N2HET to toggle a GIO? If not, what approach would you recommend? Is there sample code for this?

Thanks so much,

  • Hi Jones,

    Clicking the existing HALCOGen project file (*.hcg) will open it in HALCOGen GUI. You can enable/disable any features in HALCoGen and generate the updated code. But if you disable one peripheral which was enabled before, for example ADC, you need to delete the adc.c manually. 

     You can output a clock signal using ECLK pin. The ECLK pin configuration code is located in system.c:

  • If you want to add your own code to the files generated through HALCOGen, please insert your code in the "USER CODE" section:

    /* USER CODE BEGIN (25) */

    your code

    /* USER CODE END */