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.

TMS570LC4357: HALCoGen Oddities, needing improvement.

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Upgraded to HALCoGen v 04.07.01

  • HALCoGen adds Carriage-Return to Line Endings

When I do a "git diff" on the *.dil file, git reports several changed lines where
the only change is that a "Carriage-Return" is added to the line.
You do not want such changes.

  • There is no way to comment away complete functions.

I might want to replace a function in the generated code with something else.
For this, I need to be able to comment away the complete function.
There should be a user comment block between each function in the generated code.

 If I define the part to use FTCA interrupt, an interrupt routine is created in HL_sys_dma.c
I would like to be able to comment that away with

/* USER CODE 41 */

#if 0

/* END USER CODE */

void FTCAIRQ(void)

{

}

/* USER CODE 41 */

#endif

/* END USER CODE */

Then I want to define the FTCAIRQ in another file.

BR

Ulf

  • Hi,

    1. We have not added Carriage returns in v04.07.01. I did a diff of the *.dil files on my end and I didn't see any Carriage-Returns.

    2. User codes are added at the beginning and at the end of every function so that the user could modify as per the requirements. If a new
    user code section is added in between a file, the user code section below will get messed up .
    You could use the existing user code sections to comment out a function completely.

    Thanks and Regards,
    Akshay
  • I am not asking for usercode between files, but between functions.

    Adding user code comments between function will not mess up anything.

    Why do you think that?

    Note that you do not need to have the user code number in sequential order.

    I need to be able to remove functions completely from the compiled module,

    since I want to use a replacement function defined in another file.

    I do not see how I can get a CLEAN solution with todays user codes.

    Please give an example.

  • Hi,

    I apologize for the confusion. I meant that it is not recommended to add a new user code section anywhere within the same file, except at the bottom of all the existing user codes.

    The user code is not just a comment in the driver file, but is more like a command which creates a user code begin and end block and retains the changes made by the user when the project is generated again using HALCoGen.

    For ex: Take a look at the image below. There are some changes in  the user code sections. Now if a new user code section is added before user code 33, this newly added user code section will be user code 33 and the changes gets shifted here when the project is generated again using HALCoGen. Hence it is recommended to only add new user code sections at the bottom of all the existing user codes.

    Here's an example of how i managed to remove a function completely with the existing user code :

    I’m commenting out the function dmaFTCAInterrupt(void) here. 

    Thanks and Regards,

    Akshay