init.h
浏览该文件的文档.
1 /*
2  * Copyright (C) 2015-2017 Alibaba Group Holding Limited
3  */
4 
5 #ifndef AOS_INIT_H
6 #define AOS_INIT_H
7 
8 #include <stdbool.h>
9 
14 /* aos_component_init初始化参数 */
15 typedef struct {
16  int argc;
17  char **argv;
19  bool cli_enable;
20 } kinit_t;
21 
29 extern int aos_components_init(kinit_t *kinit);
30 
31 #ifndef AOS_BINS
40 extern int application_start(int argc, char **argv);
41 #endif
42 
51 #ifdef AOS_BINS
52 #include <k_api.h>
53 
54 struct app_info_t {
55  void (*app_entry)(void *ksyscall_tbl, void *fsyscall_tbl, int argc, char *argv[]);
56  unsigned int data_ram_start;
57  unsigned int data_ram_end;
58  unsigned int data_flash_begin;
59  unsigned int bss_start;
60  unsigned int bss_end;
61  unsigned int heap_start;
62  unsigned int heap_end;
63 };
64 
65 struct framework_info_t {
66  void (*framework_entry)(void *syscall_tbl, int argc, char *argv[]);
67  unsigned int data_ram_start;
68  unsigned int data_ram_end;
69  unsigned int data_flash_begin;
70  unsigned int bss_start;
71  unsigned int bss_end;
72  unsigned int heap_start;
73  unsigned int heap_end;
74 };
75 
76 struct m_app_info_t {
77  void (*app_entry)(void *ksyscall_tbl, int argc, char *argv[]);
78  unsigned int data_ram_start;
79  unsigned int data_ram_end;
80  unsigned int data_flash_begin;
81  unsigned int bss_start;
82  unsigned int bss_end;
83  unsigned int heap_start;
84  unsigned int heap_end;
85  /* reserve for other */
86  unsigned int reserve0;
87  unsigned int reserve1;
88  /* this bin_type must be here, 0x28, uniform with single bin & kernel bin,
89  arm cortex not used */
90  unsigned int bin_type;
91  unsigned int reserve2;
92  unsigned int reserve3;
93  unsigned int reserve4;
94  unsigned int reserve5;
95  unsigned int reserve6;
96 };
97 
98 #endif
99 
100 #endif /* AOS_INIT_H */
int application_start(int argc, char **argv)
int aos_components_init(kinit_t *kinit)
Definition: init.h:15
bool cli_enable
Definition: init.h:19
int argc
Definition: init.h:16
char ** argv
Definition: init.h:17