> 文章列表 > v851s 在 eyesee-mpp 中添加一个hello_world sample 的流程

v851s 在 eyesee-mpp 中添加一个hello_world sample 的流程

v851s 在 eyesee-mpp 中添加一个hello_world sample 的流程

1. 为什么要在eyesee-mpp 中添加sample?
1)保持整个openwrt 应用程序编写的完成性;
2)eyesee-mpp 中包含了几乎所有全志视频音频模块的sample 以及 头文件,参考以及头文件调用起来非常方便,而且可以学习各种模块的使用流程;
3)可以直接在make menuconfig 中管理应用程序,是否编译;
4)不需要将交叉编译工具链放到外面,只要按照步骤添加好sample ,就可以直接mm -B 进行编译;

2. 以hello_world为例创建sample

路径:tina-v853-docker/platform/allwinner/eyesee-mpp/middleware/sun8iw21/sample

在该路径下创建文件夹: sample_hello_world

在该文件夹下创建三个文件:
sample_hello_world.c

#include <stdio.h>void main(void){printf(\"hello world!\\n\");
}

sample_hello_world.h

#ifndef __SAMPLE_HELLO_WORLD_H__
#define __SAMPLE_HELLO_WORLD_H__ #ifdef __cplusplus
extern \"C\"{
#endif /* __cplusplus *///
#ifdef __cplusplus
}
#endif /* __cplusplus */#endif

readme.txt

Author:na