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.

CCS4 errors during linking.

Other Parts Discussed in Thread: HALCOGEN

I just went through this video to get started with HALCoGen in conjunction with CCS4. 

http://www.youtube.com/watch?v=BsN0XgiXJ2g

And i ended up with the following error:

esmGroup1Notification ./source/esm.obj
esmGroup2Notification ./source/esm.obj
error: unresolved symbols remain
error: errors encountered during linking; "Project1.out" not built

And i'm using Hercules Development kit TMS570LS3137. 
I have no idea how to fix it as i'm new to this.
It would be great if someone would help me explaining the problem and suggest me something.!!

Thanks in advance
Subbu
  • Good morning:

    We have received your post. We are reviewing it to provide an answer.

    Regards,

    Enrique Lizarraga

  • Subbu,

    Halcogen defines some function call, but the code has to be written by the end user.

    This is the case for all the notification calls.

    To fix your problem, in your sys_main.c add the following:

    /* USER CODE BEGIN (4) */

    /* ESM Group notification (Not used but must be provided) */
    void esmGroup1Notification(uint32_t channel)
    {
         return;
    }
    /* ESM Group2 notification (Not used but must be provided) */
    void esmGroup2Notification(uint32_t channel)
    {
         return;
    }

    /* USER CODE END */

    These 2 dummy routines are necessary for the linker build your code.
    It will be the same for all other driver Halcogen generates.(GIO, HET, CAN,,,,)
    Halcogen provides all the code to access your interrupt service routine (notification call), but this code is application dependent.

    Remember that any code you add in an Halcogen generated code has to be protected by:
    /* USER CODE BEGIN (4) */ 

    YOUR CODE HAS TO BE HERE

    /* USER CODE END */

    If any custom code is outside these comments, it will be destroyed on the next Halcogen Generate.

    Please have a try and let me know.

    Regards,

    Jean-Marc
  • Hi Jean and Enrique, 
    Thanks for your reply. It actually worked partially  :)

    But now i got struck with another problem.

    To begin with,
    As per the demo of that video, i want to blink only 1 LED. I chose LED1(Tri colour) which is on the left of the MCU. 
    In the HALCoGen,  i chose appropriate microcontroller (TMS570LS3137ZWT) and i did modifications in pin16(LED1) of HET1 as instructed in the video. And i generated the code. 
    In CCS, i modified the sys_main.c within the USER CODE space. 
    I configured the  target device. And i did build the project with no errors. 

    The program got flashed into the target, but i got the following error

    No source available for "C$$EXIT() at C:\Users\ssathyanarayana\Documents\workspace\pro1\Debug\pro1.out:{3} 0x1a84{4}" 

    BTW, This is what i have in the usercode space 4

    /* USER CODE BEGIN (4) */
    /* ESM Group notification (Not used but must be provided) */
    void esmGroup1Notification(uint32_t channel)
    {
    return;
    }
    /* ESM Group2 notification (Not used but must be provided) */
    void esmGroup2Notification(uint32_t channel)
    {
    return;
    }

    /* USER CODE END */
    void pwmNotification (hetBASE_t * hetREG, unsigned pwm, unsigned notification)
    {
    }
    void edgeNotification (hetBASE_t * hetREG, unsigned edge)
    {
    }
    /* USER CODE END */

    I just want to try and know how exactly to HALCoGen works with CCS. I got to know how, but it would have more satisfied if I had got a proper output. I'm not sure if i did miss anthing..!!!
     
    Please let me know where did i go wrong. And also, where can i get some better examples 

    Thanks and regards
    Subbu 
  • Subbu,

    It will be much easier if you can share your project. Can you zip your full project and send it to me via the forum?
    If not, I can share my email address so you can send it to me directly.

    Please let me know.

    Regards,

    Jean-Marc

  • 7357.pro1.rar

    Hi Jean-Marc, 

    I have attached the complete project. Please have a look.

    Regards

    Subbu 

  • Subbu,

    I'm a little confused with your code.

    Which board are you using? Is it the TMS570LS3HDK or the TMS570LS3 USB stick?

    I can't figure out which LED you are trying to toggle.

    Regards,

    Jean-Marc

  • Jean-Marc,

    Its TMS570LS3HDK.  0601.TMS570LS31 HDK User Guide SPNU509.pdf

    Page 19 of this guide has details of Demo LEDs. I'm trying to toggle LED1 (NHET1[16])

  • Jean-Marc,

    Its TMS570LS3HDK.  0601.TMS570LS31 HDK User Guide SPNU509.pdf

    Page 19 of this guide has details of Demo LEDs. I'm trying to toggle LED1 (NHET1[16])

  • Subbu,

    I'm trying to use these 3 colors LEDs and honestly there is something strange in the way they are controlled.
    I've asked the engineer in charge of this board to have a look.

    Back to your code.

    In your main routine, I suggest to put a while(1); at the end.

    Without it, after the execution of the hetinit(); is done the code jumps in the exit() routine.
    This routine is part of our runtime library, and because the source code is not available for ccs, you have this error message.

    Note: The source code of the runtime library is provided with the code generation tools.
    The code is zipped in a file named rtssrc.zip and it is located in your ccs installation/tools/compiler/tms570/lib

    Another point, with the latest release of Halcogen (03.00.01) the c and h generated files are now stored in 2 directories:
    Source and Include.

    I can see in your code that you add for all include file their absolute path.
    This is not necessary (and not recommended). Instead, right click on your project in CCS,  select "Build Options...", "CCS Build", "ARM Compiler", "Include Option"
    In this option, click on the green + button, select workspace, and add the Halcogen Include directory.
    Now the compiler will be able to find all the include files needed by Halcogen.

    I have modified your code and here is the 4118.pro1.zip file.

    This code uses the HET to generate a 1second PWM on PWM0 (50% duty cycle) on NHET1_PIN0  (LED D5 right top corner)
    At the same time, an interrupt, low level, is generated for both end of period and duty cycle.
    These interrupt will call the pwmNotification routine.
    In this routine, you will get:
    Which pwm is the source of this interrupt (0 in my case)
    What is the notification. In this case, 2 = pwmEND_OF_DUTY or 4 = pwmEND_OF_PERIOD.
    Base on this value, I set or clear NHET1_PIN31 (LED D4 top)

    The main point of this example is to see that NHET can set a pin high and low based on the code NHET is running (NHET_PIN0 in this example)
    NHET can generate interrupt on specific event.
    NHET pins can be control by software as a standard GIO pin (NHET_PIN31 in this example)

    Please let me know if this is helpful.

    Regards,

    Jean-Marc

  • Hi Jean-Marc,

    Thanks a lot. This actually helped me. 

    And regarding the runtime library, I'm not having a runtime library for TMS570. I'm using CCS version 4 as well as 5. But both of them doesn't provide TMS570 runtime library.(But it has msp430, tms470 libraries) Should i download them seperately?

    And the code, i understood how it works. :)

    But on the board, i see the top 2 LEDs toggling(perfectly) and the remaining LEDs are also on(but redundant). 
    LED1  has turned Red.!!!

    LED2 is completely OFF.

    Could you please update me, the problem with the LEDs. ?

    Thanks and regards

    Subbu

  • Subbu,

    For both CCS4 and CCS5 the code gen tool is located in the TMS470 directory.
    The run time is applicable for TMS470 and TMS570, so don't worry, you have all you need.

    For the LED question, could you open another thread with your question and verified this answer so I can close this thread.
    It will be better for follow up not to mix the different subject.

    Regards,

    Jean-Marc