Wendal Chen 4bbaf95dee remove: 移除bsp目录里的sys.lua hace 2 años
..
include df78d74b53 add:linux添加lcd lvgl编译 hace 3 años
port cba7ccd88c fix: bsp/linux编译失败 hace 2 años
src 601b7450bc fix: bsp/linux的sys可用了,sys.wait正常 hace 3 años
README.md 39ec295cb2 update: 更新bsp/linux的README hace 2 años
main.lua 0e705d7ed3 update: 更新bsp/linux,能出现窗口了 hace 4 años
xmake.lua 39ec295cb2 update: 更新bsp/linux的README hace 2 años

README.md

LuatOS@Linux

  • 编译工具xmake
  • 文件系统,posix原生文件系统,以工作目录为基点
  • 默认luavm和rtos内存分配均为 1MByte

简易编译说明

  1. 先安装xmake

    curl -fsSL https://xmake.io/shget.text | bash
    
  2. 安装必要的库

    apt install -y libssl1.1-dev llvm clang libreadline-dev libsdl2-dev
    
  3. 执行编译,要进入本bsp的目录

    xmake -y --root
    

编译完成后, 会在build目录生成 luatos

简单用法

./luatos
local sys = require "sys"

log.info("sys", "from win32")

sys.taskInit(function ()
    while true do
        log.info("hi", os.date())
        log.info("sys", rtos.meminfo("sys"))
        log.info("lua", rtos.meminfo("lua"))
        sys.wait(1000)
    end
end)

sys.run()

常见问题

TODO