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.

Bugs when using HalCoGen 2.11 for TMS570

Other Parts Discussed in Thread: HALCOGEN

When using HALCoGen to generate code for the TMS570LS3137ZWT I could observe some bugs:

- the start-up code seems to be buggy, the debugger gets stuck in the systemInit() and cannot be stopped

- when selectiog ADC channels in MIBADC1 Group 1/2 some are set properly while some not at all, e.g. enabling pins 1, 19, 20 and 21 produces code that enables pins 1 and 15

- the gioGet/SetBit funcitons cannot be used with the RTP and DMM ports in GIO mode since they seem to use a different register layout; please provide either special access functions for these registers or handle the difference in the GIO functions

- not really a bug but a welcome feature: function to toggle a GIO bit

  • Forgot two more:

    - when using sciSend(sciBASE_t *sci, uint32_t length, uint8_t *data), the length has to be larger by 2 than the size of the data to be sent

    - welcome feature: ability to select line endings for generated code, i.e. to be able to use just LF instead of CR+LF (some version control tools can have a problem with this i.e. when used in companies with fixed guidelines on line endings)

  • Hi Tarik,

    Thank you for using HALCoGEN !!!! We value your feedback.

    Most of your concerns are addressed , we request you to await and try the HALCoGen Release Version 3.00.00 expected next week.

    We aren't clear with your concern on SCI. As such we haven't faced any issue with sciSend() yet, can you elaborate on this ?

    You may refer to an example code  <halcogen>/examples/TMS570LS31x/example_sci_uart_9600.c  from the next release.

    -Pratip

     

  • Hello Pratip,

    exactly for this reason would it be very welcome to some kind of external access to the bug tracking - so people don't have to spend valuable time just to find out it's a known bug.

    What I meant with the SCI problem is that when I send the following over the SCI I can only read "Star" in a terminal program:

    sciSend(sciREG, 6, (unsigned char *) "Start\n");

    However, if I use

    sciSend(sciREG, 6, (unsigned char *) "Start\n");

    I get "Start<LF>" where <LF> is the line feed characted.

    Have you already observed such behavior with the drivers?

    Best regards,

    Tarik

  • Tarik,

    We would be providing the release notes in the coming release that would help you see the registered known issues.

    On the SCI since I dont have the older release to compare, but  I will put down what we have now on sciSend, hope it helps:

    #define  TSIZE1 10

    uint8_t  TEXT1[TSIZE1]= {'H','E','R','C','U','L','E','S',' ',' '};

    #define UART scilinREG


    sciDisplayText(UART,&TEXT1[0],TSIZE1);   /* send text code 1 */


    void sciDisplayText(sciBASE_t *sci, uint8_t *text,uint32_t length)
    {
        while(length--)
        {
            while ((UART->FLR & 0x4) == 4); /* wait until busy */
            sciSendByte(UART,*text++);      /* send out text   */
        };
    }

    void sciSendByte(sciBASE_t *sci, uint8_t byte)
    {

        while ((sci->FLR & SCI_TX_INT) == 0) { /* wait */ };
        sci->TD = byte;

    }

    We haven't seen any issue with this.

    Tip: In case you are using the CCSv4 , there is a terminal you can enable and configure it for the SCI port.

     

    On the boot issue you were mentioning earlier.

    At times you may find it get stuck at meminit if your memory initialization is not through.

    Otherwise you should not see any issue with the boot.

    -Pratip

     

  • Hi Tarik,

    Let us know if your issues on SCi are resolved.

    Do try to put your hands on the Halcogen 3.00.00 version.

    - Pratip

  • Hello Pratip,

    I've had the chance to look at the 3.00 version of Halcogen with mixed success... some of the issues seem to have been resolved but I'm still having problems with the startup code.

    The first thing is that the generated assembler files still have some placeholders (## .... ##), these are the first several lines of sys_core.asm and you can notice the invalid lines:

    ;-------------------------------------------------------------------------------
    ; sys_core.asm
    ;
    ; (c) Texas Instruments 2009-2012, All rights reserved.
    ;

        ##text##
        ##arm##

    ;-------------------------------------------------------------------------------
    ; Initialize CPU Registers

        ##def##     _coreInitRegisters_
        ##asmfunc##

    There are not a lot of configured features in my halcogen project, just the GIO driver and the SCI and HET with their pins used as GIOs.

    Is there a certain moduel that has to be marked for generation for the startup code to be properly generated?

    Best regards,

    Tarik