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.

initalise contructors in HALCOGEN

Other Parts Discussed in Thread: HALCOGEN

I am looking at the HALCOGEN generated code file sys_startup.c and I see the following code...

    /* initalise contructors */

if (__TI_PINIT_Base < __TI_PINIT_Limit)
    {
        void (**p0)() = (void *)__TI_PINIT_Base;

        while ((unsigned)p0 < __TI_PINIT_Limit)
        {
            void (*p)() = *p0++;
            p();
        }
    }

 

Is it required if I have only C files ?

 

  • When you do not use constructors you should be able to remove the initialization of constructors.

    The .pinit section consits of a list of addresses of constructors to be called.

    When you do not use constructors the list will just contain a NULL word, which is the list terminator.

    For details please refer to the TMSx70 C/C++ Compiler usre guide.  

     

    Cheers

    Marcus