seveibar/am3352-dev-board-4layer-dogbone

Defines PCB footprints and pin mappings for a TI AM3352ZCZ100 processor, JST GH connectors, and assembly-part lookup helpers for capacitors, resistors, and headers.

Version
0.1.5
License
unset
Stars
0

scripts/check-four-layer-stack.py

"""Fail if the compiled variant contains nonexistent-layer copper."""
import json
from pathlib import Path
c=json.loads(Path('dist/index/circuit.json').read_text())
board=next(e for e in c if e['type']=='pcb_board')
assert board['num_layers']==4,board['num_layers']
allowed={'top','inner1','inner2','bottom'}
for e in c:
 if e['type']=='pcb_trace':
  for p in e['route']:
   for field in ['layer','from_layer','to_layer']:
    if field in p:assert p[field] in allowed,(e['pcb_trace_id'],field,p[field])
 if e['type'] in ['pcb_via','pcb_copper_pour']:
  for l in e.get('layers',[e['layer']] if 'layer' in e else []):assert l in allowed,(e['type'],l)
print('Four-layer stack verified: top, inner1, inner2, bottom')