Pārlūkot izejas kodu

add: 补齐luat_debug_assert函数

Wendal Chen 6 mēneši atpakaļ
vecāks
revīzija
37adf1bfc1
2 mainītis faili ar 11 papildinājumiem un 1 dzēšanām
  1. 10 0
      app/port/luat_base_air101.c
  2. 1 1
      app/port/luat_conf_bsp.h

+ 10 - 0
app/port/luat_base_air101.c

@@ -437,4 +437,14 @@ int  strncasecmp ( const char* s1, const char* s2, size_t len )
 
 	return x1 - x2;
 }
+
+void luat_debug_assert(const char *fun_name, unsigned int line_no, const char *fmt, ...){
+  printf("luat_debug_assert: %s:%d ", fun_name, line_no);
+  va_list args;
+  va_start(args, fmt);
+  vprintf(fmt, args);
+  va_end(args);
+  printf("\n");
+  while (1){};
+}
 //--------------

+ 1 - 1
app/port/luat_conf_bsp.h

@@ -84,7 +84,7 @@
 #define LUAT_USE_FS  1
 #define LUAT_USE_SENSOR  1
 #define LUAT_USE_SFUD  1
-// #define LUAT_USE_STATEM 1
+#define LUAT_USE_STATEM 1
 // 性能测试,跑完就是玩,不要与lvgl一起启用,生产环境的固件别加这个库
 // #define LUAT_USE_COREMARK 1
 // #define LUAT_USE_IR 1