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.

Link Error when using two programs N2HET1 and N2HET2 with the microcontroller RM48L952

Other Parts Discussed in Thread: HALCOGEN, RM48L952, TMS570LS1224

I am using the Tools HET-IDE, HCG, CCS V6.
In a project with using N2HET1 and N2HET2 I developed two HET programs, the first one is running on HET1 and the other is running on HET2.
Both programs are transferred in CCS studio with HCG Tool.
But, when I compile the code, a link error appears because the symbol HET_INIT0_PST is declared twice.
What can I do?
Thanks a lot for your Help

Jerome

  • Hello Jerome,

      For the 2nd NHET, please use the command line to assemble the code. Depends where your assebler is installed it will be something like below.

      c:/ti/Hercules/Texas Instruments/Hercules/HET/bin/hetp.exe" -n1 -hc32 -v2 <filename>.het.

      The -n1 switch will ask the assembler to produce a unique .h and .c files for the 2nd NHET instance. You will see HET_INIT1_PST instead of HET_INIT0_PST.

     

  • Hello Charles,
    I tried this Command:

    C:\ti\Texas Instruments\Hercules\HET\bin\hetp.exe -n1 -hc32 -v2 D:\A_TI_HET_IDE\Application\Zumo\Zumo_HET2_01\Zumo_HET2_01.het

    But I got an error because there is a space between Texas and Instruments.
    The command C:\ti\Texas is not recognized.
    May be the easiest way is to copie and past the file.C in CCS and then to manage the code without HCG ?
    Thanks for your help
    Kind regards
    Jerome
  • Hi Jerome,

     I think you can setup your search path for hetp.exe so you just invoke the command without the full path.  Or try to copy the stated command into a batch file and just run it.

  • Hello Charles,
    Thank for your Help.
    I tried the command from the directory: C:\ti\Texas Instruments\Hercules\HET\bin hetp.exe -n1 -hc32 -v2 D:\A_TI_HET_IDE\Application\Zumo\Zumo_HET2_01\Zumo_HET2_01.het
    The command is OK and the assembler ran without any error nor warning.
    When I loaded the program in CCS, as you said I got “HET_INIT1_PST” in file.c
    So the CCS program is compiled without error.
    After the execution of het.ini function, HET1 program is correctly loaded in het1RamAdd but nothing is loaded in het2RamAdd.
    Is it necessary to load the HET2 program in het2RamAdd with another function ?
    Thanks a lot for your help.
    Jerome
  • Hi Jerome,

     When you call the hetInit() it is supposed to load your HET2 program to the N2HET2. Please check if the hetInit() contains the below memory copy call. The hetInit() not only load the HET2 code to the HET2 RAM but also initialize the HET2 registers. The hetInit() should begin with initialization of HET1 register followed by intialization of HET1 RAM and then followed by initialization of HET2 registers and finally the the initialization of the HET2 RAM.

    (void)memcpy((void*)hetRAM2, (void*)HET_INIT1_PST, sizeof(HET_INIT1_PST));

    If you don't see the above line in the hetInit() then please check two things.

    1. In HalCoGen make sure in the "Driver Enable" tab you have selected both HET1 and HET2 drivers.

     2. In the HET2 tab->HET2 Global Timing Configuration tab you have selected the checkbox "Enable Advanced Config  Mode / Disable BlackBox Driver" and also provided both the header file and the C source file.

  • 6014.N2HET_ERRATA_CHECK_CHAMP_PGE.zipDon't know if it helps, but here is a program that loads one het program into HET1 and another into HET2.

    I believe it's setup for the TMS570LS1224 so it won't run on RM48L952 without changing the HalCoGen startup code.
    But you should be able to examine the project to see how it is setup.     I also manually assembled for the 2nd HET like Charles mentioned.

    One thing I remember tripping me up was forgetting to include both header files from both HET programs. 

  • Charles,

    In the "Driver Enable" tab the HET2 driver was not selected.

    So now all is working well.

    Thanks for all.

    Kind regards

  • Hi Jerome,

      Glad you problem is resolved.