Example #1
0
int aos_kernel_init(kinit_t *kinit)
{
#ifdef AOS_VFS
    vfs_init();
    vfs_device_init();
#endif
    
#ifdef CONFIG_AOS_CLI
    if (kinit->cli_enable)
        aos_cli_init();
#endif
    
#ifdef AOS_KV
    aos_kv_init();
#endif

#ifdef WITH_SAL
    sal_device_init();
#endif

#ifdef AOS_LOOP
    aos_loop_init();
#endif

#ifdef VCALL_RHINO
    trace_start();
#endif

#ifdef AOS_FOTA 
    ota_service_init();
#endif

#ifdef AOS_SENSOR
    sensor_init();
#endif
// auto_component generated by the compiler system, now gcc support
#if defined (__GNUC__)
    aos_components_init();
#endif

#ifdef AOS_BINS
    app_pre_init();
    framework_pre_init();

    if (framework_info->framework_entry) {
        framework_info->framework_entry((void *)syscall_ktbl, kinit->argc, kinit->argv);
    }
#else

#ifdef AOS_FRAMEWORK_COMMON
    aos_framework_init();
#endif

    application_start(kinit->argc, kinit->argv);
#endif

    return 0;
}
Example #2
0
int main(void)
{
    krhino_init();

	
#ifdef CONFIG_AOS_CLI
    extern int aos_cli_init(void);
    aos_cli_init();
#endif

    krhino_task_create(&demo_task_obj, "demo_task", 0,DEMO_TASK_PRIORITY, 
        50, demo_task_buf, DEMO_TASK_STACKSIZE, demo_task_3, 1);
    
    krhino_start();
    
    return 0;
}