Pārlūkot izejas kodu

add: 添加xxtea库的编译

https://gitee.com/openLuat/LuatOS/issues/I8P11X
Wendal Chen 2 gadi atpakaļ
vecāks
revīzija
fe2b1f7ee6

+ 7 - 0
cloudbuild/esp32c2-idf5.meta.json

@@ -325,6 +325,13 @@
                   "rsize": 3008,
                   "fsize": 274360,
                   "dft": false
+               },
+               {
+                   "name": "xxtea",
+                   "content": "xxtea加密解密库",
+                   "rsize": 2008,
+                   "fsize": 274360,
+                   "dft": false
                }
             ],
             "fsize": 365376,

+ 7 - 0
cloudbuild/esp32c3-idf5.meta.json

@@ -411,6 +411,13 @@
                   "rsize": 3008,
                   "fsize": 274360,
                   "dft": false
+               },
+               {
+                   "name": "xxtea",
+                   "content": "xxtea加密解密库",
+                   "rsize": 2008,
+                   "fsize": 274360,
+                   "dft": false
                }
             ],
             "fsize": 365376,

+ 7 - 0
cloudbuild/esp32s3-idf5.meta.json

@@ -368,6 +368,13 @@
                   "rsize": 3008,
                   "fsize": 274360,
                   "dft": false
+               },
+               {
+                   "name": "xxtea",
+                   "content": "xxtea加密解密库",
+                   "rsize": 2008,
+                   "fsize": 274360,
+                   "dft": false
                }
             ],
             "fsize": 365376,

+ 3 - 0
luatos/components/luat/CMakeLists.txt

@@ -91,6 +91,8 @@ idf_component_register(SRC_DIRS ${LUATOS_ROOT}/luat/modules
                                 ${LUATOS_ROOT}/components/gmssl/bind
                                 ${LUATOS_ROOT}/components/repl
                                 ${LUATOS_ROOT}/components/ymodem
+                                ${LUATOS_ROOT}/components/xxtea/src
+                                ${LUATOS_ROOT}/components/xxtea/binding
                                 INCLUDE_DIRS ../../include
                                 ${LUATOS_ROOT}/components/max30102
                                 ${LUATOS_ROOT}/lua/include
@@ -156,6 +158,7 @@ idf_component_register(SRC_DIRS ${LUATOS_ROOT}/luat/modules
                                 ${LUATOS_ROOT}/components/gmssl/include
                                 ${LUATOS_ROOT}/components/repl
                                 ${LUATOS_ROOT}/components/ymodem
+                                ${LUATOS_ROOT}/components/xxtea/include
                     REQUIRES esp-tls lwip esp_http_client mbedtls spiffs driver heap esp_netif esp_event
                              esp_wifi esp_rom http_parser mqtt esp_adc bt console spi_flash esp_psram nvs_flash
                     )

+ 3 - 0
luatos/components/luat/port/luat_base_idf5.c

@@ -248,6 +248,9 @@ static const luaL_Reg loadedlibs[] = {
 #endif
 #ifdef LUAT_USE_REPL
   {"repl", luaopen_repl},
+#endif
+#ifdef LUAT_USE_XXTEA
+  {"xxtea", luaopen_xxtea},
 #endif
   {NULL, NULL}
 };

+ 2 - 1
luatos/include/luat_conf_bsp.h

@@ -35,7 +35,7 @@
 
 #define LUAT_USE_WLAN 1
 #define LUAT_USE_HTTPSRV 1
-#define LUAT_USE_NIMBLE 1
+// #define LUAT_USE_NIMBLE 1
 
 #define LUAT_USE_IOTAUTH 1
 
@@ -82,6 +82,7 @@
 #define LUAT_USE_RSA 1
 // #define LUAT_USE_ICONV 1
 // #define LUAT_USE_BIT64 1
+// #define LUAT_USE_XXTEA 1
 
 // ------------------