现象: 上电后 Lua VM 报 uart_app.lua:28 attempt to index a boolean value
→ VM exit → 15s 后自动复位, 死循环, 永远走不到 MQTT 连接
根因(4 处叠加, 第 1 处致命):
1. config.lua 末尾漏 return —— require 对无返回值模块返回 true,
local CFG = require "config" 后访问 CFG.CFG_xxx 直接报错
2. 全工程 10 处调用 mstick(), 但 LuatOS 并无此 API(正确为 mcu.ticks())
3. MQTT 服务器仍是合宙官方测试服 lbsmqtt.airm2m.com:1884
4. MQTT 鉴权用户名/密码硬编码为空串
修复:
1. config.lua 末尾加 return _G(配置项本就是全局变量);
另: ClientID 的 mobile.imei() 加空值防护(or "unknown")
2. 新增 mstick.lua: 全局 mstick() = mcu.ticks() 封装(回退 os.time()*1000),
原 10 处调用点零改动; main.lua 在 require "config" 之后 require "mstick"
3. 服务器改为 110.41.131.144:1883(明文非 TLS), 新增 CFG_MQTT_USER/PASS,
mqtt_main 改为 auth(CLIENT_ID, CFG_MQTT_USER, CFG_MQTT_PASS, true)
4. .gitignore 放行 vd960Air/tools/ —— 官方 tools/ 忽略规则导致自检脚本
无法入库(sim_frame_test.py 自 8/31 起一直未入库)
新增工具:
- tools/sim_load_test.lua: 离线加载+冒烟自检(lua5.3 + LuatOS API 桩 + 严格全局
检查), 按 main.lua 真实顺序加载全部模块并冒烟调用关键函数, 用于抓取
"require 返回值缺失""调用了不存在的 API"这类语法检查抓不到的运行时问题
验证:
- luac5.3 -p 全部 14 个 lua 文件通过
- 离线自检: 16 项断言 + 8 项冒烟全部通过
- Python 帧协议参考验证全部通过
- readme Markdown 表格列数 0 异常
文档: readme 补 §8 板级问题修复记录, 更新文件结构/待确认清单/计划表
177 lines
2.5 KiB
Plaintext
177 lines
2.5 KiB
Plaintext
# Prerequisites
|
|
*.d
|
|
*.luac
|
|
*.lnks
|
|
*.pdf
|
|
.vscode
|
|
vscode.code-workspace
|
|
.idea
|
|
|
|
# Object files
|
|
*.o
|
|
*.ko
|
|
*.obj
|
|
*.elf
|
|
|
|
# Linker output
|
|
*.ilk
|
|
*.map
|
|
*.exp
|
|
|
|
# Precompiled Headers
|
|
*.gch
|
|
*.pch
|
|
|
|
# Libraries
|
|
*.lib
|
|
*.a
|
|
*.la
|
|
*.lo
|
|
|
|
# Shared objects (inc. Windows DLLs)
|
|
*.dll
|
|
*.so
|
|
*.so.*
|
|
*.dylib
|
|
|
|
# Executables
|
|
*.exe
|
|
*.out
|
|
*.app
|
|
*.i*86
|
|
*.x86_64
|
|
*.hex
|
|
|
|
# Debug files
|
|
*.dSYM/
|
|
*.su
|
|
*.idb
|
|
*.pdb
|
|
|
|
# Kernel Module Compile Results
|
|
#*.mod*
|
|
*.cmd
|
|
.tmp_versions/
|
|
modules.order
|
|
Module.symvers
|
|
Mkfile.old
|
|
dkms.conf
|
|
|
|
bsp/air302/FlashToolCLI/
|
|
bsp/air302/tmp/
|
|
bsp/air302/local*
|
|
bsp/air302/disk/
|
|
*.zip
|
|
tools/
|
|
testcase/
|
|
oldmodule/
|
|
olddemo/
|
|
script/
|
|
|
|
|
|
bsp/air640w/disk/
|
|
bsp/air640w/tmp/
|
|
bsp/air640w/local*
|
|
|
|
__pycache__
|
|
*.pyc
|
|
|
|
*.tlv
|
|
*.fs
|
|
bsp/air302/air302_sdk/**
|
|
/bsp/air724/sdk/out
|
|
/bsp/air724/sdk/hex
|
|
/bsp/air724/sdk/prebuilts/win32
|
|
|
|
*.cmake
|
|
*.xmake
|
|
|
|
debug.log
|
|
|
|
量产文件
|
|
|
|
CMakefiles
|
|
bsp/pc/build/
|
|
bsp/win32/build/
|
|
bsp/win32/release/
|
|
bsp/pico/build/
|
|
bsp/linux/build/
|
|
bsp/zephyr/
|
|
|
|
|
|
build/
|
|
*.bat
|
|
cmd.lnk
|
|
|
|
luat/demo/
|
|
tools/snippet.json
|
|
|
|
self_docs/
|
|
# cursor编程相关文件
|
|
.cursor/*
|
|
openspec/*
|
|
.codex
|
|
|
|
app_engine/
|
|
bsp/
|
|
luat/
|
|
|
|
# MCP server
|
|
.chroma_code/
|
|
components/
|
|
components/h264/test/test_h264
|
|
testcase/ctx.json
|
|
bsp/pc/pclogs/
|
|
bsp/pc/spidrv/
|
|
bsp/pc/fskv.bin
|
|
bsp/pc/otp.bin
|
|
|
|
.worktree
|
|
.worktrees/
|
|
*.log
|
|
|
|
# Local AI / IDE tooling state (Mavis, Antigravity, OpenCode, etc.)
|
|
.mavis/
|
|
.antigravitycli/
|
|
.opencode/
|
|
/docs/superpowers
|
|
# Media artifacts accidentally saved at repo root by tooling
|
|
/matrix-media-*.mp4
|
|
/pgfs_flow.mp4
|
|
/pcconf/
|
|
/pgfs_video/
|
|
/bsp/air1601/artifacts/
|
|
|
|
# Local worktrees (not to be tracked from the main checkout)
|
|
# Note: .claude/skills/ is intentionally tracked so /luatos-hw-test ships with the repo.
|
|
/.claude/settings.local.json
|
|
/.claude/worktrees/
|
|
/.fleet-worktrees/
|
|
|
|
# PC BSP runtime artifacts (not to be tracked)
|
|
/bsp/pc/CrashDump_*.dmp
|
|
/bsp/pc/LastCoverageResults.log
|
|
/bsp/pc/test_output.txt
|
|
/bsp/pc/test_sqlite3_suite.db*
|
|
/bsp/pc/test_dir/
|
|
/bsp/pc/test_dir1/
|
|
/bsp/pc/test_fs_dir/
|
|
/bsp/pc/file2.txt
|
|
/bsp/pc/mount_test.txt
|
|
/bsp/pc/os_test_*.txt
|
|
/bsp/pc/test_io.txt
|
|
|
|
*.dmp
|
|
testresult/
|
|
app_store/
|
|
*.bin
|
|
single_app.json
|
|
.qoder/
|
|
|
|
# --- vd960Air 自检工具需入库(2026-09-10) ---
|
|
# 官方 tools/ 为忽略规则, 但本工程 PC 侧自检脚本属重要资产, 需随工程入库:
|
|
# tools/sim_frame_test.py 帧协议参考验证(Python 1:1 复刻解析公式)
|
|
# tools/sim_load_test.lua 离线加载+冒烟自检(lua5.3 + LuatOS API 桩)
|
|
!module/Air780EPM/demo/vd960Air/tools/
|
|
!module/Air780EPM/demo/vd960Air/tools/**
|