Przeglądaj źródła

add: 关联ercoap库的编译,并添加云编译选项

Wendal Chen 2 lat temu
rodzic
commit
6d41376c3b

+ 3 - 0
app/port/luat_base_air101.c

@@ -105,6 +105,9 @@ static const luaL_Reg loadedlibs[] = {
 #ifdef LUAT_USE_LIBCOAP
   {"libcoap", luaopen_libcoap},           // 处理COAP消息
 #endif
+#ifdef LUAT_USE_ERCOAP
+  {"ercoap", luaopen_ercoap},           // 处理COAP消息
+#endif
 #ifdef LUAT_USE_LIBGNSS
   {"libgnss", luaopen_libgnss},           // 处理GNSS定位数据
 #endif

+ 3 - 0
app/port/luat_conf_bsp.h

@@ -57,6 +57,8 @@
 
 // 开启TLS
 // #define LUAT_USE_TLS
+// #define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
+// #define LUAT_USE_CRYPTO_AES_MBEDTLS 1
 
 // 其他网络功能
 // #define LUAT_USE_SNTP
@@ -129,6 +131,7 @@
 // #define LUAT_USE_YMODEM 1
 // #define LUAT_USE_MQTTCORE 1
 // #define LUAT_USE_LIBCOAP 1
+// #define LUAT_USE_ERCOAP 1
 
 //----------------------------
 // 高级功能, 推荐使用REPL, 因为SHELL已废弃

+ 7 - 0
cloudbuild/air101.meta.json

@@ -370,6 +370,13 @@
                         "fsize": 357620,
                         "dft": false
                     },
+                    {
+                        "name": "ercoap",
+                        "content": "新版COAP协议库",
+                        "rsize": 2200,
+                        "fsize": 357620,
+                        "dft": false
+                    },
                     {
                         "name": "shell",
                         "content": "控制台,与repl会冲突!!",

+ 7 - 0
cloudbuild/air103.meta.json

@@ -419,6 +419,13 @@
                         "fsize": 357620,
                         "dft": false
                     },
+                    {
+                        "name": "ercoap",
+                        "content": "新版COAP协议库",
+                        "rsize": 2200,
+                        "fsize": 357620,
+                        "dft": false
+                    },
                     {
                         "name": "shell",
                         "content": "控制台,搭配dbg功能才可以在LuatIDE使用",

+ 7 - 0
cloudbuild/air601.meta.json

@@ -428,6 +428,13 @@
                         "fsize": 357620,
                         "dft": false
                     },
+                    {
+                        "name": "ercoap",
+                        "content": "新版COAP协议库",
+                        "rsize": 2200,
+                        "fsize": 357620,
+                        "dft": false
+                    },
                     {
                         "name": "shell",
                         "content": "控制台,搭配dbg功能才可以在LuatIDE使用",

+ 5 - 0
xmake.lua

@@ -382,6 +382,11 @@ target("network")
     -- errdump
     add_includedirs(luatos.."components/network/errdump",{public = true})
     add_files(luatos.."components/network/errdump/*.c")
+
+    -- ercoap
+    add_includedirs(luatos.."components/network/ercoap/include",{public = true})
+    add_files(luatos.."components/network/ercoap/src/*.c")
+    add_files(luatos.."components/network/ercoap/binding/*.c")
 target_end()
 
 target("nes")