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.

HALCOGEN: Incorrect dmmPORT address in HALCoGen-generated HL_reg_dmm.h for TMS570LC4357

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

When HALCoGen generates code for the TMS570LC4357 it creates the following definition in HL_reg_dmm.h:

/** @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)

FYI, this address is incorrect.  The correct address is 0xFFFFF770U.

--thx

  • Hello,

    Which version of HALCoGen is this for? I see the correct address being used for the DMM port definition with the latest v4.07.01.

    Regards,

    Sunil

  • My apologies; I had not recalled that I had reported this issue earlier:

    https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/686181

    The problem is that we have a contaminated .dil file, most likely because we started our development using the .dil file from the Launchpad example project here:  http://processors.wiki.ti.com/index.php/File:Proj1_launchxl2_rm57l_570lc43.zip

    Once you have bad data in a .dil file, HALCoGen does not try to correct or even warn about the problem (not even a message in the HAL Code Generator's Output pane).  I believe you'll find that if you extract the .hcg and .dil files from your Launchpad project and then use HALCoGen v4.07.01 to generate code from them, you will find that the generated code has the error.

  • You are correct. The .dil file holds all your configuration information and also the register base addresses for the header files it generates. I changed this DMM port address manually by editing the .dil file in a text editor. I had to delete any backup .hcg and .dil files in the folder. Then when you open the .hcg file in HALCoGen v4.07.01 and re-generate code, the correct DMM port address is used for the DMM port.

    Regards,

    Sunil

  • Are you recommending that we edit our .dil file by hand in order to correct this issue?

    We are not accustomed to editing the .dil file by hand.  In addition to editing the "DRIVER.DMM.VAR.DMM_BASE_PORT.VALUE" line, would there be other lines we would need to edit?

    --thx

  • Yes, that is one way to maintain HALCoGen generated code across multiple versions. Another option is to recreate the same GUI settings as you had in the original HALCoGen configuration you had in a new project that you start in the latest version.

    There was only one line in the .dil file that held the incorrect DMM port address.

    Regards,

    Sunil