Exemple #1
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* disable interrupt first */
	rt_hw_interrupt_disable();
	/* initialize hardware interrupt */
	rt_hw_interrupt_init();

	/* initialize mmu */
	rt_hw_mmu_init(fh_mem_desc, sizeof(fh_mem_desc)/sizeof(fh_mem_desc[0]));

	rt_system_heap_init((void*)&__bss_end, (void*)FH_RTT_OS_MEM_END);

#ifdef RT_USING_DMA_MEM
	//just use the last 100KB
	fh_dma_mem_init((rt_uint32_t *)FH_RTT_OS_MEM_END, FH_DMA_MEM_SIZE);
#endif

	/* initialize board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

	/* initialize tick */
	rt_system_tick_init();

	/* initialize kernel object */
	rt_system_object_init();

	/* initialize timer system */
	rt_system_timer_init();

	/* initialize scheduler system */
	rt_system_scheduler_init();

	/* initialize application */
	rt_application_init();

	/* initialize system timer thread */
	rt_system_timer_thread_init();

	/* initialize idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */

	return ;
}
Exemple #2
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* init board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

	/* init tick */
	rt_system_tick_init();

	/* init kernel object */
	rt_system_object_init();

	/* init timer system */
	rt_system_timer_init();

#ifdef RT_USING_HEAP
	#ifdef __CC_ARM
		rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)FM3_SRAM_END);
	#elif __ICCARM__
		rt_system_heap_init(__segment_end("HEAP"), (void*)FM3_SRAM_END);
	#else
		/* init memory system */
		rt_system_heap_init((void*)&__bss_end, (void*)FM3_SRAM_END);
	#endif
#endif

	/* init scheduler system */
	rt_system_scheduler_init();

#ifdef RT_USING_DEVICE
	/* init all device */
	rt_device_init_all();
#endif

	/* init application */
	rt_application_init();

    /* init timer thread */
    rt_system_timer_thread_init();

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #3
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* init board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

	/* init tick */
	rt_system_tick_init();

	/* init kernel object */
	rt_system_object_init();

	/* init timer system */
	rt_system_timer_init();

#ifdef RT_USING_HEAP
    rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END);
#endif

	/* init scheduler system */
	rt_system_scheduler_init();

#ifdef RT_USING_DEVICE
	/* init all device */
	rt_device_init_all();
#endif

	/* init application */
	rt_application_init();

#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
	finsh_set_device( FINSH_DEVICE_NAME );
#endif

    /* init timer thread */
    rt_system_timer_thread_init();

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #4
0
void rtthread_startup()
{
	/* init hardware interrupt */
	rt_hw_interrupt_init();

	/* init board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

	/* init tick */
	rt_system_tick_init();

	/* init kernel object */
	rt_system_object_init();

	/* init timer system */
	rt_system_timer_init();

	/* init heap memory system */
	rt_system_heap_init(&__bss_end, (void*)0x45000000);

	/* init scheduler system */
	rt_system_scheduler_init();

	/* init application */
	rt_application_init();

#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
#ifdef RT_USING_DEVICE
	finsh_set_device("uart0");
#endif
#endif

  rt_system_timer_thread_init();

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;

}
Exemple #5
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* init board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

	/* init tick */
	rt_system_tick_init();

	/* init kernel object */
	rt_system_object_init();

	/* init timer system */
	rt_system_timer_init();

#ifdef RT_USING_HEAP
    /* init memory system */
    rt_system_heap_init((void*)&_ramfunc_end, (void*)PIC32_SRAM_END);
#endif

	/* init scheduler system */
	rt_system_scheduler_init();

	/* init application */
	rt_application_init();

#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
#ifdef RT_USING_DEVICE
	finsh_set_device("uart1");
#endif
#endif

    /* init timer thread */
    rt_system_timer_thread_init();

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #6
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
    /* init board */
    rt_hw_board_init();

    /* show version */
    rt_show_version();

    /* init tick */
    rt_system_tick_init();

    /* init kernel object */
    rt_system_object_init();

    /* init timer system */
    rt_system_timer_init();

#ifdef RT_USING_HEAP
    /* init memory system */
    rt_system_heap_init((void *)heap, (void *)&heap[RT_HEAP_SIZE - 1]);
#endif

    /* init scheduler system */
    rt_system_scheduler_init();

    /* init all device */
#ifdef RT_USING_DEVICE
    rt_device_init_all();
#endif
    /* init basic system */
    rt_basic_system_init();

    /* init application */
    rt_application_init();

    /* init timer thread */
    rt_system_timer_thread_init();

    /* init idle thread */
    rt_thread_idle_init();

    /* start scheduler */
    rt_system_scheduler_start();

    /* never reach here */
    return ;
}
Exemple #7
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* init cache */
	rt_hw_cache_init();
	/* init hardware interrupt */
	rt_hw_interrupt_init();

	/* init board */
	rt_hw_board_init();
	rt_show_version();

	/* init tick */
	rt_system_tick_init();

	/* init timer system */
	rt_system_timer_init();

#ifdef RT_USING_HEAP
	rt_system_heap_init((void*)&__bss_end, (void*)RT_HW_HEAP_END);
#endif

	/* init scheduler system */
	rt_system_scheduler_init();

#ifdef RT_USING_DEVICE
	/* init all device */
	rt_device_init_all();
#endif

	/* init application */
	rt_application_init();

#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
	finsh_set_device(FINSH_DEVICE_NAME);
#endif

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
    /* init board */
    rt_hw_board_init();

    /* show version */
    rt_show_version();

#ifdef RT_USING_HEAP
#if STM32_EXT_SRAM
	
    rt_system_heap_init((void*)STM32_EXT_SRAM_BEGIN, (void*)STM32_EXT_SRAM_END);
	  //rt_system_heap_init((void*)(0x10000000), (void*)(0x10000000 + UTIL_CCM_HEAP_SIZE*4));
#else
#ifdef __CC_ARM
    rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)STM32_SRAM_END);
#elif __ICCARM__
    rt_system_heap_init(__segment_end("HEAP"), (void*)STM32_SRAM_END);
#else
    /* init memory system */
    rt_system_heap_init((void*)&__bss_end, (void*)STM32_SRAM_END);
#endif
#endif  /* STM32_EXT_SRAM */
#endif /* RT_USING_HEAP */

    /* init scheduler system */
    rt_system_scheduler_init();
		
    /* initialize timer */
    rt_system_timer_init();		

    /* init timer thread */
    rt_system_timer_thread_init();

    /* init application */
    rt_application_init();

    /* init idle thread */
    rt_thread_idle_init();

    /* start scheduler */
    rt_system_scheduler_start();

    /* never reach here */
    return ;
}
Exemple #9
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
    /* init board */
    rt_hw_board_init();

    /* show version */
    rt_show_version();

    /* init tick */
    rt_system_tick_init();

    /* init kernel object */
    rt_system_object_init();

    /* init timer system */
    rt_system_timer_init();

#if STM32_EXT_SRAM
    ext_sram_init();
    rt_system_heap_init((void*)STM32_EXT_SRAM_BEGIN,
                        (void*)STM32_EXT_SRAM_END);
#else
    rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END);
#endif /* STM32_EXT_SRAM */

    /* init scheduler system */
    rt_system_scheduler_init();

    /* init all device */
    rt_device_init_all();

    /* init application */
    rt_application_init();

    /* init timer thread */
    rt_system_timer_thread_init();

    /* init idle thread */
    rt_thread_idle_init();

    /* start scheduler */
    rt_system_scheduler_start();

    /* never reach here */
    return ;
}
Exemple #10
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* initialize board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

#ifdef RT_USING_HEAP
	/* initialize memory system */
	#ifdef __CC_ARM
		rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)(0x10000000 + 1024*64));
	#elif __ICCARM__
	    rt_system_heap_init(__segment_end("HEAP"), (void*)(0x10000000 + 1024*64));
	#else
		rt_system_heap_init((void*)&__bss_end, (void*)(0x10000000 + 1024*64));
	#endif
#endif

	/* initialize scheduler system */
	rt_system_scheduler_init();

	/* initialize application */
	rt_application_init();

#ifdef RT_USING_FINSH
	/* initialize finsh */
	finsh_system_init();
	finsh_set_device( FINSH_DEVICE_NAME );
#endif

    /* initialize timer */
    rt_system_timer_init();

    /* initialize timer thread */
    rt_system_timer_thread_init();

	/* initialize idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #11
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* init hardware interrupt */
	rt_hw_interrupt_init();

	/* init board */
	rt_hw_board_init();
	rt_show_version();

	/* init tick */
	rt_system_tick_init();

	/* init timer system */
	rt_system_timer_init();

	/* init memory system */
#ifdef RT_USING_HEAP
	rt_system_heap_init((void*)&__heap_start, (void*)&__heap_end);
#endif

	/* init scheduler system */
	rt_system_scheduler_init();

	/* init application */
	rt_application_init();

#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
	finsh_set_device("uart1");
#endif

	/* init soft timer thread */
	rt_system_timer_thread_init();

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #12
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* initialize board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

	/* initialize tick */
	rt_system_tick_init();

	/* initialize kernel object */
	rt_system_object_init();

	/* initialize timer system */
	rt_system_timer_init();

#ifdef RT_USING_HEAP
#if LPC_EXT_SDRAM
    rt_system_heap_init((void *)LPC_EXT_SDRAM_BEGIN, (void *)LPC_EXT_SDRAM_END);
    sram_init();
#else
    rt_system_heap_init((void *)HEAP_BEGIN, (void *)HEAP_END);
#endif
#endif

	/* initialize scheduler system */
	rt_system_scheduler_init();

	/* initialize application */
	rt_application_init();

    /* initialize timer thread */
    rt_system_timer_thread_init();

	/* initialize idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #13
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* initialize board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

	/* initialize timer system */
	rt_system_timer_init();

#ifdef RT_USING_HEAP
    rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END);
#endif

#ifdef RT_USING_MODULE
    rt_system_module_init();
#endif

	/* initialize scheduler system */
	rt_system_scheduler_init();

	/* initialize application */
	rt_application_init();

#ifdef RT_USING_FINSH
	/* initialize finsh */
	finsh_system_init();
	finsh_set_device( FINSH_DEVICE_NAME );
#endif

    /* initialize timer thread */
    rt_system_timer_thread_init();
	/* initialize idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #14
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* initialize board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

#ifdef RT_USING_HEAP
	/* initialize memory system */
	#ifdef __CC_ARM
		/*rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x10004000);*/
		rt_system_heap_init((void*)0x2007C000, (void*)(0x2007C000 + 0x4000));
	
	#elif __ICCARM__
	    rt_system_heap_init(__segment_end("HEAP"), (void*)0x10004000);
	#else
		rt_system_heap_init((void*)&__bss_end, (void*)0x10004000);
	#endif
#endif

	/* initialize scheduler system */
	rt_system_scheduler_init();

	/* initialize application */
	rt_application_init();
    
	/* initialize timer */
    rt_system_timer_init();

    /* initialize timer thread */
    rt_system_timer_thread_init();

	/* initialize idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #15
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
    /* init board */
    rt_hw_board_init();

    /* show version */
    rt_show_version();

#ifdef RT_USING_HEAP
#if STM32_EXT_SRAM
    rt_system_heap_init((void*)STM32_EXT_SRAM_BEGIN, (void*)STM32_EXT_SRAM_END);
#else
#ifdef __CC_ARM
    rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)STM32_SRAM_END);
#elif __ICCARM__
    //初始化系统堆空间(除去编译时分配的全局变量、静态局部变量外的其他剩余内存被设置为系统堆空间,被系统管理起来)
    rt_system_heap_init(__segment_end("HEAP"), (void*)STM32_SRAM_END);
#else
    /* init memory system */
    rt_system_heap_init((void*)&__bss_end, (void*)STM32_SRAM_END);
#endif
#endif  /* STM32_EXT_SRAM */
#endif /* RT_USING_HEAP */

    rt_system_scheduler_init();//系统调度器初始化

    rt_system_timer_init();//系统定时器初始化

    rt_system_timer_thread_init();//系统软件定时器线程初始化
    
    rt_application_init();//应用程序初始化
       
    rt_thread_idle_init();//初始化空闲线程

    rt_system_scheduler_start();//开始线程调度此后便进入各个线程的无限循环

    /* never reach here */
    return ;
}
Exemple #16
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* initialize board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

	/* initialize tick */
	rt_system_tick_init();

	/* initialize kernel object */
	rt_system_object_init();

	/* initialize timer system */
	rt_system_timer_init();

    /* initialize system heap */
    rt_system_heap_init(HEAP_BEGIN, HEAP_END);

	/* initialize scheduler system */
	rt_system_scheduler_init();

	/* initialize application */
	rt_application_init();

    /* initialize timer thread */
    rt_system_timer_thread_init();

	/* initialize idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #17
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
    // platform_init();
    // print_version();

    /* initialzie hardware interrupt */
    rt_hw_interrupt_init();

    /* initialize board */
    rt_hw_board_init();

    /* show RT-Thread version */
    rt_show_version();

    /* initialize memory system */
#ifdef RT_USING_HEAP
    rt_system_heap_init(HEAP_BEGIN, HEAP_END);
#endif

    /* initialize scheduler system */
    rt_system_scheduler_init();

    /* initialize timer and soft timer thread */
    rt_system_timer_init();
    rt_system_timer_thread_init();

    /* initialize application */
    rt_application_init();

    /* initialize idle thread */
    rt_thread_idle_init();

    /* start scheduler */
    rt_system_scheduler_start();

    /* never reach here */
    return ;
}
Exemple #18
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* init board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

#ifdef RT_USING_HEAP
    rt_system_heap_init((void*)HEAP_BEGIN, (void*)HEAP_END);
#endif
	
    /* initialize scheduler system */
    rt_system_scheduler_init();
	
    /* initialize system timer*/
    rt_system_timer_init();
	
	  wifi_low_level();
	  uart_config();
    /* initialize application */
    rt_application_init();

    /* initialize timer thread */
    rt_system_timer_thread_init();

    /* initialize idle thread */
    rt_thread_idle_init();

    /* start scheduler */
    rt_system_scheduler_start();

    /* never reach here */
    return ;

}
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
    /* init board */
    rt_hw_board_init();

    /* init tick */
    rt_system_tick_init();

    /* init kernel object */
    rt_system_object_init();

    /* init timer system */
    rt_system_timer_init();

#ifdef RT_USING_HEAP
    rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END);
#endif

    /* init scheduler system */
    rt_system_scheduler_init();

    /* init application */
    rt_application_init();

    /* init timer thread */
    rt_system_timer_thread_init();

    /* init idle thread */
    rt_thread_idle_init();

    /* start scheduler */
    rt_system_scheduler_start();

    /* never reach here */
    return ;
}
Exemple #20
0
/***************************************************************************//**
 * @brief
 *  Startup RT-Thread
 *
 * @details
 *
 * @note
 *
 ******************************************************************************/
void rtthread_startup(void)
{
    /* init board */
    rt_hw_board_init();

#ifdef RT_USING_HEAP
    #ifdef __CC_ARM
    rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)EFM32_SRAM_END);
    #elif __ICCARM__
    rt_system_heap_init(__segment_end("HEAP"), (void*)EFM32_SRAM_END);
    #else
    /* init memory system */
    rt_system_heap_init((void*)&__bss_end__, (void*)EFM32_SRAM_END);
    #endif
#endif

    /* enable interrupt */
    rt_hw_interrupt_enable(0x0UL);

    /* init drivers */
    rt_hw_driver_init();

    /* show version */
    rt_show_version();

    /* init tick */
    rt_system_tick_init();

    /* init kernel object */
    rt_system_object_init();

    /* init timer system */
    rt_system_timer_init();

    /* init scheduler system */
    rt_system_scheduler_init();

    /* init all devices */
    rt_device_init_all();

    /* init finsh */
#ifdef RT_USING_FINSH
    finsh_system_init();
    finsh_set_device(CONSOLE_DEVICE);
#endif

    /* Initialize gui server */
#ifdef RT_USING_RTGUI
    rtgui_system_server_init();
#endif

    /* init timer thread */
    rt_system_timer_thread_init();

    /* init idle thread */
    rt_thread_idle_init();

    /* init energy mode thread */
    efm32_emu_init();

    /* init application */
    rt_application_init();

    /* start scheduler */
    rt_system_scheduler_start();

    /* never reach here */
    return ;
}
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* init board */
	rt_hw_board_init(); 
	

          //------------------------------------------
      #if 0    
       rt_kprintf("\n\r   starting...--------->>>>>>\r\n ");   

	//WatchDogInit();    
		 while(1)
	   	{      
	   	/* Insert 40 ms delay */
              DF_delay_us(1000);
		//IWDG_ReloadCounter();  
		}
     #endif     	


     #if  0
      rt_kprintf("\n\r   starting...\r\n ");   
	 


  while (1)
  {
     DF_delay_us(1000);
    /* Reload IWDG counter */
    //IWDG_ReloadCounter();  
  }
	 
 
	 
    #endif 	 
   rt_kprintf("\n\r   天津广通公司 北斗车载终端 GGHYPT  TW703-BD--14-9-17   Version 1.5 双Module  客运+货运    \r\n ");       
	/* show version */
	rt_show_version(); 

	/* init tick */
	rt_system_tick_init();

	/* init kernel object */
	rt_system_object_init();

	/* init timer system */
	rt_system_timer_init();

      rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END);

	/* init scheduler system */
	rt_system_scheduler_init();

	/* init all device */
	rt_device_init_all();   

//------------------- Device  thread ----------------------------------
       


#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
	finsh_set_device( FINSH_DEVICE_NAME ); // mount on
#endif

    
     //---------------App Thread	 -----------------------	     
     Init_lcdkey(); //  提前初始化LCD  pins	
     delay_ms(1000); // 屏rst 拉低    维持一段时间 
     lcd_init();
// #ifdef  GSM_UART
		_gsm_startup();
 //#endif

 // #ifdef APP808
        Protocol_app_init();   
 // #endif
 
 // #ifdef _485_DEVICE
      _485_startup();
 // #endif

 // #ifdef GPS_UART
	  // gps_init();     
       mma8451_driver_init();      
 // #endif

     printer_driver_init();   

   //---  RTC  device Register--------------- 
    if( rt_hw_rtc_init()==1)
	{
	    RTC_Demo_init();   // Debug  Test  use  
	    rt_kprintf("\n\r   RTC -first conifg\r\n "); 
    }
  
	/* init application_ demo */
	rt_application_init();
  


// -------------------------------------------------------------------------

    /* init timer thread */
      rt_system_timer_thread_init(); 

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #22
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
    /* init board */
    rt_hw_board_init();

    /* show version */
    rt_show_version();

    /* init tick */
    rt_system_tick_init();

    /* init kernel object */
    rt_system_object_init();

    /* init timer system */
    rt_system_timer_init();

#ifdef RT_USING_HEAP
#ifdef __CC_ARM
    rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)STM32_SRAM_END);
#elif __ICCARM__
    rt_system_heap_init(__segment_end("HEAP"), (void*)STM32_SRAM_END);
#else
    /* init memory system */
    rt_system_heap_init((void*)&__bss_end, (void*)STM32_SRAM_END);
#endif
#endif

    /* init scheduler system */
    rt_system_scheduler_init();

    /* initialize timer */
    rt_system_timer_init();

    /* init timer thread */
    rt_system_timer_thread_init();

    /* Add CPU usage to system */
    cpu_usage_init();

#ifdef RT_USING_COMPONENTS_INIT
    /* initialization RT-Thread Components */
    rt_components_init();
#endif

#ifdef  RT_USING_FINSH
    /* init finsh */
    finsh_system_init();
    finsh_set_device(RT_CONSOLE_DEVICE_NAME);
#endif

#ifdef RT_USING_COMPONENTS_INIT
    /* initialization RT-Thread Components */
    rt_components_init();
#endif

    /* init application */
    rt_application_init();

    /* init idle thread */
    rt_thread_idle_init();

    /* start scheduler */
    rt_system_scheduler_start();

    /* never reach here */
    return;
}
Exemple #23
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* init board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

	/* init tick */
	rt_system_tick_init();

	/* init kernel object */
	rt_system_object_init();

	/* init timer system */
	rt_system_timer_init();

#ifdef RT_USING_HEAP
#if STM32_EXT_SRAM
	rt_system_heap_init((void*)STM32_EXT_SRAM_BEGIN, (void*)STM32_EXT_SRAM_END);
#else
	#ifdef __CC_ARM
		rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)STM32_SRAM_END);
	#elif __ICCARM__
	    rt_system_heap_init(__segment_end("HEAP"), (void*)STM32_SRAM_END);
	#else
		/* init memory system */
		rt_system_heap_init((void*)&__bss_end, (void*)STM32_SRAM_END);
	#endif
#endif
#endif

	/* init scheduler system */
	rt_system_scheduler_init();

#ifdef RT_USING_DFS
	/* init sdcard driver */
#if STM32_USE_SDIO
	rt_hw_sdcard_init();
#else
	rt_hw_msd_init();
#endif
#endif

	rt_hw_rtc_init();

	/* init application */
	rt_application_init();

#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
	finsh_set_device("uart1");
#endif

    /* init timer thread */
    rt_system_timer_thread_init();

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #24
0
void rtthread_startup(void)
{
    /* init hardware interrupt */
    rt_hw_interrupt_init();

    /* init board */
    rt_hw_board_init();

    /* show version */
    rt_show_version();

    /* init tick */
    rt_system_tick_init();

    /* init kernel object */
    rt_system_object_init();

    /* init timer system */
    rt_system_timer_init();

#ifdef RT_USING_HEAP
    rt_system_heap_init((void*)&rtt_heap_start, (void*)&rtt_heap_end);
#endif

#ifdef RT_USING_MODULE
    /* init module system*/
    rt_system_module_init();
#endif

    /* init scheduler system */
    rt_system_scheduler_init();

#ifdef RT_USING_DEVICE
    /* register uart0 */
    rt_hw_serial_register(&uart0_device, "uart0",
        RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM,
        &uart0);

    rt_console_set_device("uart0");
#endif

    /* init application */
    rt_application_init();

#ifdef RT_USING_FINSH
    /* init finsh */
    extern void finsh_system_init(void);
    finsh_system_init();
    finsh_set_device("uart0");
#endif

    rt_system_timer_thread_init();

    /* init idle thread */
    rt_thread_idle_init();

    /* start scheduler */
    rt_system_scheduler_start();

    /* never reach here */
    return ;
}
Exemple #25
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
    /*// RM48 does not have cache implemented
     *rt_hw_cpu_icache_enable();
     *rt_hw_cpu_dcache_enable();
     */

	/* init hardware interrupt */
	rt_hw_interrupt_init();

	/* init board */
	rt_hw_board_init();

	/* init tick */
	rt_system_tick_init();

	/* init kernel object */
	rt_system_object_init();

	rt_show_version();

	/* init timer system */
	rt_system_timer_init();

	/* init memory system */
#ifdef RT_USING_HEAP
#ifdef __CC_ARM
	rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)MEMEND);
#elif defined(__GNUC__)
    rt_system_heap_init((void*)&__bss_end, (void*)MEMEND);
#elif defined(__TI_COMPILER_VERSION__)
    rt_system_heap_init((void*)&system_data_end, (void*)MEMEND);
#else
#error Unkown compiler
#endif
#endif

	/* init scheduler system */
	rt_system_scheduler_init();

	/* init application */
	rt_application_init();

#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
	finsh_set_device("sci2");
#endif

	/* init soft timer thread */
	rt_system_timer_thread_init();

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #26
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	char buf[128];
	char *psrc;
	char *pdst=RT_NULL;
	int i,linkno,infolen;


	/* init board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

	/* init tick */
	rt_system_tick_init();

	/* init kernel object */
	rt_system_object_init();

	/* init timer system */
	rt_system_timer_init();

    rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END);

	/* init scheduler system */
	rt_system_scheduler_init();

	/* init all device */
	rt_device_init_all();


	rt_kprintf("\r\nrcc.csr=%08x",RCC->CSR);

/*
	sprintf(buf,"%s","%IPDATA:1,3,\"123\"");

	psrc=buf;
	pdst=buf;
	rt_kprintf("buf=%s\r\n",psrc);
	i = sscanf( psrc, "%%IPDATA:%d,%d,%s", &linkno, &infolen, pdst );
	rt_kprintf("\r\ni=%d,linkno=%d,infolen=%d,pdst=%s\r\n",i,linkno,infolen,pdst);
*/	
	/* init application */
	sst25_init(); /*在此初始化,gsm才能读取参数,放在app_thread中不会先执行*/
	rt_application_init();
	RS485_init();
	gps_init();
	gsm_init();
	hmi_init();
	jt808_init();
 	

#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
	finsh_set_device( FINSH_DEVICE_NAME );
#endif

    /* init timer thread */
    rt_system_timer_thread_init();

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #27
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* 初始化硬件平台相关:时钟设置、中断设置、系统滴答设置、串口设置 */
	rt_hw_board_init();

	/* init tick */
	rt_system_tick_init();

	/* 内核对象初始化 */
	rt_system_object_init();

	/* 系统定时器初始化 */
	rt_system_timer_init();

	/* 如果使用动态内存分配,则配置之 */
#ifdef RT_USING_HEAP
#if STM32_EXT_SRAM
	rt_system_heap_init((void*)STM32_EXT_SRAM_BEGIN, (void*)STM32_EXT_SRAM_END);
#else
	#ifdef __CC_ARM
		rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)STM32_SRAM_END);
	#elif __ICCARM__
	    rt_system_heap_init(__segment_end("HEAP"), (void*)STM32_SRAM_END);
	#else
		/* init memory system */
		rt_system_heap_init((void*)&__bss_end, (void*)STM32_SRAM_END);
	#endif
#endif
#endif

	/* 系统调度器初始化 */
	rt_system_scheduler_init();

#ifdef RT_USING_DFS
	/* init sdcard driver */
#if STM32_USE_SDIO
	rt_hw_sdcard_init();
#else
	rt_hw_msd_init();
#endif
#endif

	/*下面可加入用户所需的相关初始化 */

	/*上面可加入用户所需的相关初始化 */


    /* 实时时钟初始化 */
#if(0)
    rt_hw_rtc_init();
#endif

	/* 系统设备对象初始化 */
	rt_device_init_all();

	/* 用户应用初始化 */
	rt_application_init();

#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
	finsh_set_device("uart1");
#endif

    /* 初始化软件定时器 */
    rt_system_timer_thread_init();

	/* 初始化空闲线程 */
	rt_thread_idle_init();

	/* 开始线程调度 此后便进入各个线程的无限循环 */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #28
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* init board */
	rt_hw_board_init();

	/* show version */
	rt_show_version();

	/* init tick */
	rt_system_tick_init();

	/* init kernel object */
	rt_system_object_init();

	/* init timer system */
	rt_system_timer_init();

#ifdef RT_USING_HEAP
#ifdef __CC_ARM
	rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)LM3S_SRAM_END);
#elif __ICCARM__
	rt_system_heap_init(__segment_end("HEAP"), (void*)LM3S_SRAM_END);
#else
	/* init memory system */
	rt_system_heap_init((void*)&__bss_end, (void*)LM3S_SRAM_END);
#endif
#endif

#ifdef RT_USING_MODULE
	/* init module system */
	rt_system_module_init();
#endif

	/* init scheduler system */
	rt_system_scheduler_init();

#ifdef RT_USING_LWIP
	eth_system_device_init();

	/* register ethernetif device */
	rt_hw_luminaryif_init();
#endif

	/* init hardware serial device */
	rt_hw_serial_init();
#ifdef RT_USING_DFS
	/* init sd card device */
	rt_hw_sdcard_init();
#endif

	/* init application */
	rt_application_init();

#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
#ifdef RT_USING_DEVICE
	finsh_set_device("uart1");
#endif
#endif

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #29
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* init board */
	rt_hw_board_init(); 
	

          //------------------------------------------
      #if 0    
       rt_kprintf("\n\r   starting...--------->>>>>>\r\n ");   

	//WatchDogInit();    
		 while(1)
	   	{      
	   	/* Insert 40 ms delay */
              DF_delay_us(1000);
		//IWDG_ReloadCounter();  
		}
     #endif     	


     #if  0
      rt_kprintf("\n\r   starting...\r\n ");   
	 


  while (1)
  {
     DF_delay_us(1000);
    /* Reload IWDG counter */
    //IWDG_ReloadCounter();  
  }
	 
 
	 
    #endif 	 
         rt_kprintf("\n\r   TCB 北斗车载终端 认证版本TW703-BD--13-1-24 - Version 1.0 !\r\n ");    
	/* show version */
	rt_show_version();

	/* init tick */
	rt_system_tick_init();

	/* init kernel object */
	rt_system_object_init();

	/* init timer system */
	rt_system_timer_init();

      rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END);

	/* init scheduler system */
	rt_system_scheduler_init();

	/* init all device */
	rt_device_init_all();   

//------------------- Device  thread ----------------------------------
       


#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
	finsh_set_device( FINSH_DEVICE_NAME ); // mount on
#endif

 #ifdef  GSM_UART
      _gsm_startup();
#endif

  #ifdef _485_DEVICE
      //_485_app_init();
      //_485_set_device(_485_DEVICE); // mount  on
      _485_startup();
  #endif

  #ifdef GPS_UART
      // gps_app_init(); 
      // gps_set_device(GPS_DEVICE);  // mount on
	   gps_init();     
       mma8451_driver_init(); 
  #endif

     printer_driver_init();   

   //---  RTC  device Register---------------
  //
      if( rt_hw_rtc_init()==1)
	{
	    RTC_Demo_init();   // Debug  Test  use  
	    rt_kprintf("\n\r   RTC -first conifg\r\n ");  
    	}
  //---------------App Thread    ---------------------------
  #ifdef HMI
        HMI_app_init();  
  #endif
  

	  /* init application_ demo */
	  rt_application_init(); 

      #ifdef APP808
       Protocol_app_init();
      #endif

      // GB_19056 thread
	  GB_Drv_app_init();  
// -------------------------------------------------------------------------

    /* init timer thread */
      rt_system_timer_thread_init(); 

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}
Exemple #30
0
/**
 * This function will startup RT-Thread RTOS.
 */
void rtthread_startup(void)
{
	/* init hardware interrupt */
	rt_hw_interrupt_init();

	/* init board */
	rt_hw_board_init();
	
	rt_show_version();

	/* init tick */
	rt_system_tick_init();

	/* init kernel object */
	rt_system_object_init();

	/* init timer system */
	rt_system_timer_init();

#ifdef RT_USING_HEAP
#ifdef __CC_ARM
	rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x00210000);
#elif __ICCARM__
    rt_system_heap_init(__segment_end("HEAP"), (void*)0x00210000);
#else
	rt_system_heap_init(&__bss_end, 0x00210000);
#endif
#endif

	/* init scheduler system */
	rt_system_scheduler_init();

#ifdef RT_USING_HOOK /* if the hook is used */
	/* set idle thread hook */
	rt_thread_idle_sethook(led_flash);
#endif

#ifdef RT_USING_DEVICE
	/* init hardware serial device */
	rt_hw_serial_init();

#ifdef RT_USING_LWIP
	eth_system_device_init();

	/* register AT91 EMAC device */
	sam7xether_register("E0");
#endif

#ifdef RT_USING_DFS
	rt_hw_sdcard_init();
#endif

	/*init all registed devices*/
	rt_device_init_all();
#endif

	/* init application */
	rt_application_init();

#ifdef RT_USING_FINSH
	/* init finsh */
	finsh_system_init();
	finsh_set_device("uart1");
#endif

	/* init idle thread */
	rt_thread_idle_init();

	/* start scheduler */
	rt_system_scheduler_start();

	/* never reach here */
	return ;
}