shibosoftwaredev/f1c100s-linux-nema17-stepper-controller
A four-layer NEMA 17 motor-controller PCB combining an Allwinner F1C100S Linux computer, USB‑PD/buck power system, W5500 Ethernet, STM32 real-time motion control, DRV8825 stepper driver, protection/temperature/current telemetry, USB interfaces, and local LED/buzzer diagnostics.
- Version
- 0.4.56
- License
- unset
- Stars
- 0
scripts/write-round7-status.mjs
import fs from "node:fs"
import crypto from "node:crypto"
import assert from "node:assert/strict"
const read=p=>JSON.parse(fs.readFileSync(p,"utf8"))
const hash=p=>crypto.createHash("sha256").update(fs.readFileSync(p)).digest("hex")
const circuit=read("dist/index/circuit.json"),sha=hash("dist/index/circuit.json")
const regression=read("reports/round7-regression.json"),verification=read("verification.json")
const stock=read("reports/jlcpcb-stock-audit.json"),solder=read("reports/solder-process-audit.json")
for(const report of [regression,verification,stock,solder])assert.equal(report.circuitSha256,sha)
assert.equal(circuit.filter(e=>e.type.endsWith("_error")).length,0)
assert.deepEqual(read("reports/round5-legend-audit.json").findings,[])
assert.match(fs.readFileSync("reports/round7-full-build.log","utf8"),/Circuits\s+1 passed/)
assert.match(fs.readFileSync("reports/round7-final-shorts.log","utf8"),/No shorts detected/)
const checks={nativeErrors:0,nativeWarnings:circuit.filter(e=>e.type.endsWith("_warning")).length,
gerberShorts:"pass, all four layers",emittedOnlyContinuity:"pass",independentCopper:"pass",
drillToForeignMetal:"pass, zero findings",kelvinChecks:"four pass",mechanicalAndPrintedLegend:"pass",
cliSchematicPlacement:"pass; not a claim of a fresh cloud AI style-analysis run",schematicSheetCount:12,
typecheckAndBoardTests:"pass",firmwareAndHostTests:"pass; not hardware flashed",
stock:{populated:stock.populatedComponentCount,codes:stock.uniquePartCount,checkedAt:stock.checkedAt,reserved:false},
moduleTests:read("reports/module-test-regression.json").status,
assemblyExport:"intentionally blocked by the unqualified solder-process gate; negative gates pass"}
const vias=circuit.filter(e=>e.type==="pcb_via")
assert.ok(vias.every(v=>v.hole_diameter===.3&&v.outer_diameter===.45&&v.layers.length===4))
const evidence=["verification.json","reports/round7-regression.json","reports/solder-process-audit.json",
"reports/drill-clearance-regression.json","reports/jlcpcb-stock-audit.json","reports/bom-validation.json",
"reports/round7-full-build.log","reports/round7-final-check.log","reports/round7-final-shorts.log",
"reports/round7-final-style.log","reports/round7-final-continuity.log","reports/round7-final-copper.log",
"reports/round7-final-drill.log","reports/round7-final-dfm.log","reports/round7-final-kelvin.log",
"reports/round7-final-mechanical.log","reports/round7-final-legend.log","reports/round7-final-typecheck.log",
"reports/round7-final-board-tests.log","reports/round7-final-bom.log","reports/round7-final-stock.log",
"reports/round7-final-stock-rebind.log","reports/round7-final-module-tests.log","reports/round7-final-module-regression.log",
"reports/round7-final-motion-tests.log","reports/round7-final-host-tests.log","reports/round7-final-export-gate.log",
"reports/round7-final-copper-gate.log","reports/round7-schematic-sheets/12-usb_attach.png","reports/round7-pcb-bottom.png"]
const report={checkedAt:new Date().toISOString(),circuitSha256:sha,replaySha256:hash("routing/complete-routes.json"),
fabricationReady:false,allIssuesResolved:false,localChangesNotPushed:true,publishedVersionUnchanged:"0.4.49-review-fixes-20261019",
fixes:["Hardware host-VBUS-controlled TS3USB31E isolation of both USB data channels, independent of Linux and ROM FEL",
"Host-only VBUS joins all DATA receptacle VBUS contacts, ESD bias and bypass; no system-power backfeed path",
"C7519 USBLC6-2SC6 footprint corrected to ST's SOT-23-6 land pattern, not the previous smaller SOT-666",
"Bottom-side placement and copper closure, real edge/drill clearances and the local 5 mm switch-bypass constraint retained",
"Bottom N17 label moved off the relocated output capacitor"],
invariants:{outlineMm:42.3,layers:4,mounts:4,viaDrillMm:.3,viaPadMm:.45,throughVias:vias.length,
allOtherOriginalNetPartitionsUnchanged:true,unaffectedOriginalPorts:regression.unaffectedOriginalPorts,
firmwareUnchanged:true,currentSensingPreserved:true},checks,
remaining:{ordinaryPadDrillIntersections:solder.ordinaryPadDrillIntersections.length,
thermalPadDrillIntersectionRecords:solder.thermalPadDrillIntersections.length,
solderProcess:"Unqualified; no filled/capped process or premium fabrication cost assumed. Further fanout/component relayout or an explicitly accepted manufacturing process is needed.",
inheritedModuleFailures:26,ethernetAndUsbSignalIntegrity:"Controlled-stackup/return-path review and measurement remain",
loadThermalAndAnalogQualification:"Bench measurements and calibration not performed",
actualMotorRearFasteners:"Front NEMA17 pattern does not prove the rear interface; actual rear drawing/photo requested",
manufacturingHandoff:"Not exported or approved"},
primaryReferences:{switch:"https://www.ti.com/lit/ds/symlink/ts3usb31e.pdf",esd:"https://www.st.com/resource/en/datasheet/usblc6-2.pdf"},
evidence:Object.fromEntries(evidence.map(p=>[p,hash(p)]))}
fs.writeFileSync("reports/round7-fix-status.json",JSON.stringify(report,null,2)+"\n")
console.log(JSON.stringify({circuitSha256:sha,checks,remaining:report.remaining,localChangesNotPushed:true}))