验证 tooldata NML 非空表注册路径

This commit is contained in:
cnc
2026-06-06 05:08:00 +08:00
parent 3c05202097
commit 23a4679c28

View File

@@ -224,6 +224,12 @@ int main() {
}
alignas(EMC_TOOL_STAT) unsigned char toolstat_storage[sizeof(EMC_TOOL_STAT)] = {};
auto *toolstat = reinterpret_cast<EMC_TOOL_STAT *>(toolstat_storage);
// LinuxCNC src/emc/tooldata/tooldata_nml.cc accepts a non-null table
// pointer before NML-backed tooldata operations can use it.
CANON_TOOL_TABLE nml_tool_table[CANON_POCKETS_MAX] = {};
if (tool_nml_register(nml_tool_table) != 0) {
return 77;
}
if (tool_mmap_creator(toolstat, 1) != 0) {
return 15;
}