コード例 #1
0
ファイル: boot_3.2.c プロジェクト: mobiaqua/ti-sysbios
extern void __interrupt _c_int00()
{
   int preInitStatus;

   CLINK_DIRECTIVE();
   STACK_INIT();

   /*------------------------------------------------------------------------*/
   /* Call hook configured into Startup_resetFxn                             */
   /*------------------------------------------------------------------------*/
   if (&xdc_runtime_Startup__RESETFXN__C == (int*)1) {
      xdc_runtime_Startup_reset__I();
   }

   /*------------------------------------------------------------------------*/
   /* Allow for any application-specific low level initialization prior to   */
   /* initializing the C/C++ environment (global variable initialization,    */
   /* constructers).  If _system_pre_init() returns 0, then bypass C/C++     */
   /* initialization.  NOTE: BYPASSING THE CALL TO THE C/C++ INITIALIZATION  */
   /* ROUTINE MAY RESULT IN PROGRAM FAILURE.                                 */
   /*------------------------------------------------------------------------*/
   preInitStatus = _system_pre_init(); /* moved here to allow clear of .bss */

   INIT_EXIT_PTRS();
   INIT_LOCKS();

   if (preInitStatus != 0) _auto_init();

   /*------------------------------------------------------------------------*/
   /* Handle any argc/argv arguments if supported by an MSP430 loader.       */
   /*------------------------------------------------------------------------*/
   xdc_runtime_System_exit__E(_args_main());
}
コード例 #2
0
/*
 *  ======== startupC ========
 */
void startupC(void)
{
    int retVal;
    unsigned int * bs;
    unsigned int * be;
    unsigned int * dl;
    unsigned int * ds;
    unsigned int * de;
    size_t count;
    size_t i;

    /* initiailize .bss to zero */
    bs = & __bss_start__;
    be = & __bss_end__;
    while (bs < be) {
        *bs = 0;
        bs++;
    }

    /* relocate the .data section */
    dl = & __data_load__;
    ds = & __data_start__;
    de = & __data_end__;
    if (dl != ds) {
        while (ds < de) {
            *ds = *dl;
            dl++;
            ds++;
        }
    }

    /* run Startup_exec */
    xdc_runtime_Startup_exec__E();

    /* run any constructors */
    count = __init_array_end - __init_array_start;
    for (i = 0; i < count; i++) {
        __init_array_start[i]();
    }

    /* call main() */
    retVal = main();

    /* if get here call exit() */
    if (gnu_targets_arm_rtsv7M_exit != 0) {
        _exit(retVal);
    }
    else {
        xdc_runtime_System_exit__E(retVal);
    }

}
コード例 #3
0
ファイル: boot_3.2.c プロジェクト: mobiaqua/ti-sysbios
extern void __interrupt _c_int00_noinit()
{
   CLINK_DIRECTIVE();
   STACK_INIT();

   /*------------------------------------------------------------------------*/
   /* Call hook configured into Startup_resetFxn                             */
   /*------------------------------------------------------------------------*/
   if (&xdc_runtime_Startup__RESETFXN__C == (int*)1) {
      xdc_runtime_Startup_reset__I();
   }

   _system_pre_init(); /* moved here to allow clear of .bss */

   INIT_EXIT_PTRS();
   INIT_LOCKS();

   xdc_runtime_System_exit__E(_args_main());
}
コード例 #4
0
ファイル: boot_2.1.c プロジェクト: mobiaqua/ti-sysbios
extern void __interrupt _c_int00()
{
   /*------------------------------------------------------------------------*/
   /* Initialize stack pointer. Stack grows toward lower memory.             */
   /*------------------------------------------------------------------------*/
   __asm("\t   MOV.W\t    #_stack + __STACK_SIZE,SP");

   /*------------------------------------------------------------------------*/
   /* Allow for any application-specific low level initialization prior to   */
   /* initializing the C/C++ environment (global variable initialization,    */
   /* constructers).  If _system_pre_init() returns 0, then bypass C/C++     */
   /* initialization.  NOTE: BYPASSING THE CALL TO THE C/C++ INITIALIZATION  */
   /* ROUTINE MAY RESULT IN PROGRAM FAILURE.                                 */
   /*------------------------------------------------------------------------*/
   if(_system_pre_init() != 0)  _auto_init(CINIT);

   /*------------------------------------------------------------------------*/
   /* Handle any argc/argv arguments if supported by an MSP430 loader.       */
   /*------------------------------------------------------------------------*/
   xdc_runtime_System_exit__E(_args_main());
}