当前位置:网站首页>ESP-IDF 添加自己的组件
ESP-IDF 添加自己的组件
2022-06-12 17:56:00 【xiaoqi976633690】
在main 文件夹内新建自己的app文件夹,用来存放自己的组件。
app内文件如下:
修改2个地方的cmakelist.txt
main文件夹内的cmakelist.txt如下:
idf_component_register( SRCS "main.c"
SRCS "APP/GPIOX.C"
INCLUDE_DIRS "."
INCLUDE_DIRS "app"
)
SRCS 就是.c文件。
INCLUDE_DIRS 就是.h文件夹
APP文件夹内的cmakelist.txt如下:
idf_component_register(
SRCS "gpiox.c"
INCLUDE_DIRS "."
)
INCLUDE_DIRS “.” 表示当前目录
添加多个源文件
main文件夹内的cmakelist.txt如下:
idf_component_register( SRCS "main.c"
SRCS "APP/GPIOX.C"
SRCS "APP/1.C"
SRCS "APP/2.C"
SRCS "APP/3.C"
SRCS "APP/4.C"
INCLUDE_DIRS "."
INCLUDE_DIRS "app"
)
app文件夹内的cmakelist.txt如下:
idf_component_register(
SRCS "gpiox.c"
SRCS "1.C"
SRCS "2.C"
SRCS "3.C"
SRCS "4.C"
INCLUDE_DIRS "."
)
边栏推荐
猜你喜欢
全局锁、表锁、行锁
Byte flybook Human Resources Kit three sides
vant3+ts DropdownMenu 下拉菜单,数据多能滚动加载
Click the list page of vant3+ts+pinia tab to enter the details. The tab on the details page is highlighted in the original position, and the refresh highlight is in the first item by default
Hangzhou AI developer meetup registration opens!
DRM 驱动 mmap 详解:(一)预备知识
Unprecedented analysis of Milvus source code architecture
Hangzhou AI developer meetup registration opens!
Notes on user experience elements: user centered product design
An easy-to-use IDE for small programs
随机推荐
全局锁、表锁、行锁
Make good use of IDE, speed up R & D efficiency by 100%
Vant3+ts encapsulates uploader upload image component
1.5 什么是架构师(连载)
Getting started with grpc swift
在同花顺开户证券安全吗
Byte flybook Human Resources Kit three sides
error接口原创
Office application cannot start normally 0xc0000142
String的split方法的使用
徽商期货公司开户可靠,交易安全吗?
Codeforces Round #398 (Div. 2) D. Cartons of milk
The server time zone value ‘� й ��� ʱ ��‘ is unrecognized or represents more than one time zone. ......
Two ways of tensorflow2 training data sets
TensorFlow2训练数据集的两种方式
错误记录:IllegalStateException: Optional int parameter ‘xxxx‘ is
118. 杨辉三角(动态规划)
leetcode 718 最长公共子串
关于数据集
Arm64栈回溯