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-round8-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/round8-regression.json"),verification=read("verification.json")
const stock=read("reports/jlcpcb-stock-audit.json"),solder=read("reports/solder-process-audit.json")
const continuity=read("reports/connectivity-audit.json")
for(const report of [regression,verification,stock,solder,continuity])assert.equal(report.circuitSha256,sha)
assert.equal(regression.ordinaryIntersectionsAfter,solder.ordinaryPadDrillIntersections.length)
assert.equal(regression.ordinaryIntersectionsAfter,6)
assert.equal(regression.moduleTests.passed,32)
assert.equal(regression.moduleTests.failed,0)
assert.equal(continuity.sourceFailures,0)
assert.equal(continuity.disconnectedTerminalIslands,0)
assert.match(fs.readFileSync("reports/round8-build.log","utf8"),/Circuits\s+1 passed/)
assert.match(fs.readFileSync("reports/round8-shorts.log","utf8"),/No shorts detected/)
assert.deepEqual(read("reports/round5-legend-audit.json").findings,[])
const warnings=circuit.filter(e=>e.type.endsWith("_warning"))
const evidence=["verification.json","reports/round8-regression.json","reports/solder-process-audit.json",
"reports/connectivity-audit.json","reports/drill-clearance-regression.json","reports/jlcpcb-stock-audit.json",
"reports/bom-validation.json","reports/module-test-regression.json","reports/round8-build.log",
"reports/round8-check.log","reports/round8-shorts.log","reports/round8-style.log","reports/round8-typecheck.log",
"reports/round8-continuity.log","reports/round8-copper.log","reports/round8-drill.log","reports/round8-dfm.log",
"reports/round8-kelvin.log","reports/round8-mechanical.log","reports/round8-legend.log",
"reports/round8-module-fixed.log","reports/round8-module-regression.log","reports/round8-board-tests.log",
"reports/round8-final-stock.log","reports/round8-stock-rebind.log","reports/round8-bom.log",
"reports/round8-motion-tests.log","reports/round8-host-tests.log","reports/round8-export-gates.log",
"reports/round8-copper-gate-tests.log","reports/round8-pcb-top.png","reports/round8-pcb-bottom.png",
"reports/round8-schematic-sheets/11-coil_current.png","reports/round8-schematic-sheets/12-usb_attach.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:[
"All 32 original module tests pass, versus 6 pass/26 fail; test implementations unchanged. Generic stored-profile geometry is no longer mutated by carrier-only placement/fanout rewrites.",
"Seven ordinary solder-land/drill intersections cleared: C_B_AVCC, C_B_VDD_CORE, C_ETH_XI, C_ETH_TCT, C_U_3V3_IN, U_STATUS_BUFFER, C_STATUS_BUFFER.",
"Four capacitors repositioned with actual copper rerouted, three existing vias relocated; the SoC thermal stitch stays inside its assigned thermal land and no thermal stitch is deleted.",
"Explicit 1.6 mm board thickness and thickness-derived CAD surfaces; 6 mm motor gap retained.",
"Ground fills on both inner layers with solid via connections; existing signal tracks retained. These are not uninterrupted reference planes or qualified controlled impedance.",
"Depleted current-amplifier bypass C18164586 replaced by orderable C7393837; same 100 nF/X7R/0201/±10%, explicit 10 V rating on regulated 3.3 V."
],
invariants:{outlineMm:42.3,layers:4,mounts:4,viaDrillMm:.3,viaPadMm:.45,throughVias:regression.throughVias,
allElectricalConnectionsUnchanged:true,allOtherBomValuesUnchanged:true,
manufacturingClearancesNotRelaxed:true,powerCurrentRoutesOnOuterLayers:true,
firmwareSourceFilesUnchanged:regression.firmwareFilesUnchanged},
checks:{nativeErrors:0,nativeWarnings:warnings.length,
warningTypes:Object.fromEntries([...new Set(warnings.map(e=>e.type))].map(t=>[t,warnings.filter(e=>e.type===t).length])),
gerberShorts:"pass, all four layers",emittedOnlyContinuity:"pass without relying on pours",
independentCopper:"pass",drillToForeignMetal:"pass, zero findings or regressions",
currentSenseKelvin:"four pass, each joins only at its corresponding shunt land",
mechanicalAndPrintedLegend:"pass",schematic:"CLI placement pass; 12 sheets rendered; coil-current and USB-attach sheets visually inspected. No fresh cloud AI style-analysis claimed.",
typecheck:"pass",moduleTests:{passed:32,failed:0,unchangedTestImplementations:true},
boardTests:{passed:6,failed:0},firmwareAndHostTests:"pass; no hardware flashing or bench measurements claimed",
stock:{populated:stock.populatedComponentCount,codes:stock.uniquePartCount,inventoryCheckedAt:stock.checkedAt,reserved:false},
assemblyExport:"intentionally blocked; stale/failing audit and solder-process negative gates pass"},
rejectedExperiments:[
"Coordinated motor shunt reroute could not provide two independent legal outer-layer escapes in the retained local layout; no partial route installed.",
"Wider Ethernet rail-jumper placement found a legal component site but could not reach its core-rail terminal at specified width; original jumper retained.",
"Receive-path capacitor relocation not adopted without a differential-routing/return-path review."
],
remaining:{ordinarySolderLandDrillConflicts:solder.ordinaryPadDrillIntersections.map(({part,pin,layer,x,y})=>({part,pin,layer,x,y})),
ordinaryConflictCount:solder.ordinaryPadDrillIntersections.length,
thermalPadDrillIntersectionRecords:solder.thermalPadDrillIntersections.length,
solderProcess:"Further fanout/component relayout and thermal/double-sided stencil/process qualification required. No filled/capped premium process or assembly approval assumed.",
signalIntegrity:"USB/Ethernet controlled stackup and return-path qualification remain; inner fills do not establish these.",
nativeWarnings:"152 warnings retained and reported, including pin metadata, naming and trace-width warnings; not declared all minor or waived.",
actualMotorRearFasteners:"Actual rear-endbell interface and bolt length unconfirmed; standard front NEMA17 holes do not prove rear fastening.",
hardwareValidation:"Rail/load/transient/thermal measurements, flashing, sensor/current calibration and motor/harness bring-up not performed.",
manufacturingHandoff:"Not approved or exported"},
evidence:Object.fromEntries(evidence.map(p=>[p,hash(p)]))}
assert.equal(warnings.length,152)
fs.writeFileSync("reports/round8-fix-status.json",JSON.stringify(report,null,2)+"\n")
console.log(JSON.stringify({circuitSha256:sha,ordinaryBefore:regression.ordinaryIntersectionsBefore,
ordinaryAfter:regression.ordinaryIntersectionsAfter,moduleTests:report.checks.moduleTests,
nativeErrors:0,nativeWarnings:warnings.length,fabricationReady:false,allIssuesResolved:false,localChangesNotPushed:true}))