下载core
打开http://www.openluat.com/Product/gprs/Air202.html–> 资料下载 –> 下载源码
把压缩包里的文件解压到一个位置
添加模块
假设新增的模块叫test,调用test.get(a)返回a+1后的值
在core\cust_src\elua\modules\src新建一个文件test.c:
放入如下示例代码:
1 |
|
接着,打开文件core\cust_src\elua\modules\include\auxmods.h
在合适位置加上:
1 |
|

打开core\cust_src\elua\platform\coolsand\include\platform_conf.h
在合适位置加上_ROM( AUXLIB_TEST, luaopen_test, test_map ) \
编译
下载csdtk4,解压到c盘根目录:
https://1dv.papapoi.com/%E8%BD%AF%E4%BB%B6/csdk%E7%9B%B8%E5%85%B3/CSDTK4.7z
运行core\project\你需要的lua运行版本\build\ cust_build.bat编译即可
运行core\project\你需要的lua运行版本\build\ cust_clean.bat可完全重新编译
Lod文件可在core\hex\你需要的lua运行版本\目录找到

测试


