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 register address is wrong for dmmPORT

Expert 1226 points
Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN,

HALCoGen version: 4.07.00

Part number: TNMS570LC4357ZWT

HALCoGen generates a file HL_reg_dmm.h which has the following #define:

/** @def dmmPORT
*   @brief DMM Port Register Pointer
*
*   Pointer used by the GIO driver to access I/O PORT of DMM
*   (use the GIO drivers to access the port pins).
*/
#define dmmPORT ((gioPORT_t *)0xFFFFF738U)

This value is incorrect.  It should be 0xFFFFF770U.

--thx

  • Hello,

    Just checked the HL_reg_dmm.h generated through the HALCoGen 4.07.00: the address for the dmmPORT is 0xFFFFF770 which is correct.

  • Hello QJ Wang,

    Thank you for trying to reproduce our result. I get the same results as you if I start a brand-new halcogen project. However, if I use our existing project, manually delete the HL_reg_dmm.h file, and then re-create the file using halcogen, I continue to get the incorrect value as I described earlier.

    I assume that this is because our .dil project file includes the following line in it:

    DRIVER.DMM.VAR.DMM_BASE_PORT.VALUE=0xFFFFF738

    Why would this line be in our .dil file? We do not edit the .dil file by hand. I don't see any place in the halcogen GUI to enter any kind of port value for DMM.

    We have updated our halcogen version a couple of times, while continuing to use our .dil file.

    --thx

  • Hello,

    Sorry for the issues in .dil file. I will stress this phenomenon to our SW team.
  • I have taken a look at one of the example TMS570LC4357 projects:

    processors.wiki.ti.com/.../File:Proj1_launchxl2_rm57l_570lc43.zip

    This project has a HALCoGen .dil file in it which has an invalid line using the invalid address 0xFFFFF738 in it.

    (The HL_reg_dmm.h file in that example project also has a #define using that invalid value.)

    It is possible that this is the origin of how an invalid line came into our own .dil file; it is possible that we started with a TI example project (the one in the link or hypothetically some other TI example project).

    Or perhaps we started from scratch; but whatever the cause was that led to a TI example project having an invalid configuration line also resulted in us independently also getting an invalid configuration line.

    Either way, they are at least three issues here:
    1) Whatever led to the initial cause of the invalid configuration line
    2) HALCoGen not detecting and handling an invalid configuration line
    3) TI is providing at least one and potentially many example projects which have at least one invalid configuration line

    --thx
  • Thanks. I think it was caused by the SW bug in HALCoGen 4.04 which has been fixed in the later version HALCoGen.
  • I think you have something specific in mind when you say that it has been fixed in later versions of HALCoGen. I believe the earliest version of HALCoGen we used on this project was either 4.06.01 or 4.06.00. Regardless, the one we're currently using is 4.07.00, and it has not fixed the problem.

    Presumably the bad line in the .dil file is something of a "poison pill", which permanently breaks our HALCoGen-generated code, and no version of HALCoGen does anything to correct or even just to detect this. I assume we picked up this "pill" from starting our project from one of your Launchpad projects for our TMS570LC4357 MCU.

    At this stage it isn't going to affect our team, but I'd encourage you to either implement a more extensive fix in HALCoGen, or to fix your example projects (do your projects for the other Hercules MCUs also include this pill?), or both.

    Regardless, can you give us some clear direction as to the correct way to fix our project?

    Should we edit the .dil file by hand to correct the address? Are there any consequences of editing the .dil file by hand? Are there any other "poison pills", or other problems, that might be in our .dil file that we should look for and fix?

    Or should we start over from scratch, generate a fresh HALCoGen project, and manually go through every tab, every checkbox, in the HALCoGen GUI to bring over our configuration?

    Or is there some other approach that we should take?

    --thx
  • Hello,

    I am sorry for the inconvenience that the difference of .dil has caused.

    I have HALCoGen 4.06.01 and 4.07.00 on my machine. I just created a HAL project with 4.06.01, enabled all the modules, the saved the project as HAL461_Orig.hcg and generated code. I opened the project with 4.07.00, then generated code and saved the project without changing anything (HAL461_470.hcg). I compared the two .dil files (HAL461_Orig.dil, and HAL461_470.dil), and didn't see the difference.

    Both DMM header file has the correct GIO port address. I will dry the earlier version.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/312/5086.HAL461_5F00_Orig.dilhttps://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/312/7571.HAL461_5F00_470.dil