Browse Source

add: 引用性能测试库 coremark,随时跑分

Wendal Chen 4 years ago
parent
commit
3adb95204c
2 changed files with 6 additions and 1 deletions
  1. 4 1
      app/port/luat_base_air101.c
  2. 2 0
      app/port/luat_conf_bsp.h

+ 4 - 1
app/port/luat_base_air101.c

@@ -35,7 +35,7 @@ static const luaL_Reg loadedlibs[] = {
   {LUA_OSLIBNAME, luaopen_os},        // os库,已精简
   {LUA_STRLIBNAME, luaopen_string},   // string库,字符串操作
   {LUA_MATHLIBNAME, luaopen_math},    // math 数值计算
-// //  {LUA_UTF8LIBNAME, luaopen_utf8},
+//  {LUA_UTF8LIBNAME, luaopen_utf8},
   {LUA_DBLIBNAME, luaopen_debug},     // debug库,已精简
 #if defined(LUA_COMPAT_BITLIB)
   {LUA_BITLIBNAME, luaopen_bit32},    // 不太可能启用
@@ -151,6 +151,9 @@ static const luaL_Reg loadedlibs[] = {
 #endif
 #ifdef LUAT_USE_VMX
   {"vmx",       luaopen_vmx},
+#endif
+#ifdef LUAT_USE_COREMARK
+  {"coremark", luaopen_coremark},
 #endif
   {NULL, NULL}
 };

+ 2 - 0
app/port/luat_conf_bsp.h

@@ -50,6 +50,8 @@
 // #define LUAT_USE_SENSOR  1
 // #define LUAT_USE_SFUD  1
 // #define LUAT_USE_STATEM 1
+// 性能测试,跑完就是玩,不要与lvgl一起启用,生产环境的固件别加这个库
+// #define LUAT_USE_COREMARK 1
 
 //----------------------------
 // 高通字体, 需配合芯片使用