fix: update templates to KiCAD 9 format + remove corrupt _TEMPLATE_ blocks
Verified by live test: created a fresh schematic via MCP, result shows
format version 20250114, 0 _TEMPLATE_ hits, 0 (lib_id -100) hits, 24
real components placed cleanly.
--- Format version bump (20230121 KiCAD 7 -> 20250114 KiCAD 9) ---
Files: python/templates/*.kicad_sch, python/commands/project.py,
python/commands/schematic.py
Root cause: the MCP server targets KiCAD 9 exclusively - pcbnew.pyd is
compiled for KiCAD 9.0 / Python 3.11.5, and server.ts explicitly selects
the KiCAD 9 bundled Python on Windows. Generating new schematics with a
2-year-old format tag caused a spurious 'This file was created with an
older KiCAD version' warning on every newly created schematic.
--- Remove corrupt _TEMPLATE_* placed-symbol blocks ---
File: python/templates/template_with_symbols_expanded.kicad_sch
Root cause: the expanded template was generated by the old sexpdata
serializer (same corruption PR #40 fixed for DynamicSymbolLoader add-path).
The serializer converted the string 'Device:R' to integer -100, producing
(lib_id -100) instead of (lib_id Device:R). KiCAD cannot resolve an
integer as a library reference and crashes with a null-pointer when the
user attempts to select these symbols. They appeared as grey _TEMPLATE_R?,
_TEMPLATE_C?, _TEMPLATE_U_REG? etc. ~5000mm off-sheet - invisible during
normal work but triggering a crash on accidental box-select.
Discovered via live testing on a real JLCPCB/KiCAD 9 project.
This commit is contained in:
+46
-3
@@ -2,6 +2,49 @@
|
||||
|
||||
All notable changes to the KiCAD MCP Server project are documented here.
|
||||
|
||||
## [2.2.1-alpha] - 2026-02-28
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- `templates/*.kicad_sch`, `project.py`, `schematic.py`: Update KiCAD schematic format
|
||||
version from `20230121` (KiCAD 7) to `20250114` (KiCAD 9).
|
||||
|
||||
**Root cause:** The MCP server targets KiCAD 9 exclusively – `pcbnew.pyd` is compiled
|
||||
for KiCAD 9.0 / Python 3.11.5, and the server explicitly selects the KiCAD 9 bundled
|
||||
Python on Windows. Generating new schematics with a 2-year-old format tag caused a
|
||||
spurious "This file was created with an older KiCAD version, it will be updated on
|
||||
save" dialog on every newly created schematic, which confused users into thinking
|
||||
something was broken.
|
||||
|
||||
**Fix:** Updated header in all 4 template files and both inline schematic generators
|
||||
(`project.py`, `schematic.py`) to emit `(version 20250114)`.
|
||||
|
||||
- `template_with_symbols_expanded.kicad_sch`: Remove 13 corrupt `_TEMPLATE_*`
|
||||
placed-symbol blocks containing `(lib_id -100)`.
|
||||
|
||||
**Root cause:** The expanded template was generated by the old sexpdata serializer
|
||||
(the same corruption PR #40 fixed for the DynamicSymbolLoader add-path). The serializer
|
||||
converted the string `"Device:R"` to the integer `-100`, producing `(lib_id -100)`
|
||||
instead of `(lib_id "Device:R")`. KiCAD cannot resolve an integer as a library
|
||||
reference and crashes with a null-pointer when the user attempts to select or box-select
|
||||
these symbols. They appeared as grey `_TEMPLATE_R?`, `_TEMPLATE_C?`, `_TEMPLATE_U_REG?`
|
||||
etc. labels ~5000 mm outside the sheet boundary – invisible during normal work but
|
||||
triggering a crash when accidentally selected.
|
||||
|
||||
**Discovered via:** Live testing on a real JLCPCB/KiCAD 9 project where Claude Desktop
|
||||
(via MCP) created a schematic from the expanded template.
|
||||
|
||||
**Fix:** Removed all 13 `_TEMPLATE_*` placed-symbol blocks using parenthesis-depth
|
||||
tracking (same text-manipulation approach as PR #40). The `lib_symbols` section
|
||||
(symbol definitions) is unchanged – only the corrupt placed instances were removed.
|
||||
|
||||
**Affected users:** Any schematic created from `template_with_symbols_expanded.kicad_sch`
|
||||
before this fix contains the same corrupt blocks. To clean an existing schematic,
|
||||
remove all `(symbol (lib_id -100) ...)` blocks whose `Reference` property starts
|
||||
with `_TEMPLATE_`.
|
||||
|
||||
---
|
||||
|
||||
## [2.2.0-alpha] - 2026-02-27
|
||||
|
||||
### New MCP Tools (TypeScript layer – previously Python-only)
|
||||
@@ -36,7 +79,7 @@ All notable changes to the KiCAD MCP Server project are documented here.
|
||||
- `library.py`: Fix loop variable shadowing `Path` object (mypy)
|
||||
- `design_rules.py`: Add type annotation for `violation_counts` (mypy)
|
||||
|
||||
### Pending additions (not yet committed)
|
||||
### New MCP Tools (cont.)
|
||||
|
||||
**Datasheet tools:**
|
||||
- `get_datasheet_url` - Return LCSC datasheet PDF URL and product page URL for a given
|
||||
@@ -53,7 +96,7 @@ All notable changes to the KiCAD MCP Server project are documented here.
|
||||
- `delete_schematic_component` - Remove a placed symbol from a `.kicad_sch` file by
|
||||
reference designator (e.g. `R1`, `U3`).
|
||||
|
||||
### Bug Fixes (pending)
|
||||
### Bug Fixes (cont.)
|
||||
|
||||
- `schematic.ts` / `kicad_interface.py`: Fix missing `delete_schematic_component` MCP tool.
|
||||
|
||||
@@ -75,7 +118,7 @@ All notable changes to the KiCAD MCP Server project are documented here.
|
||||
- Error message explicitly guides the user when the wrong tool is used:
|
||||
*"note: this tool removes schematic symbols, use delete_component for PCB footprints"*
|
||||
|
||||
### Pending fixes (not yet committed)
|
||||
### Additional Bug Fixes
|
||||
|
||||
- `connection_schematic.py` / `kicad_interface.py`: Fix `generate_netlist` missing
|
||||
`schematic_path` parameter – without it `get_net_connections` always fell back to
|
||||
|
||||
+60
-34
@@ -8,7 +8,8 @@ import logging
|
||||
import shutil
|
||||
from typing import Dict, Any, Optional
|
||||
|
||||
logger = logging.getLogger('kicad_interface')
|
||||
logger = logging.getLogger("kicad_interface")
|
||||
|
||||
|
||||
class ProjectCommands:
|
||||
"""Handles project-related KiCAD operations"""
|
||||
@@ -21,7 +22,9 @@ class ProjectCommands:
|
||||
"""Create a new KiCAD project"""
|
||||
try:
|
||||
# Accept both 'name' (from MCP tool) and 'projectName' (legacy)
|
||||
project_name = params.get("name") or params.get("projectName", "New_Project")
|
||||
project_name = params.get("name") or params.get(
|
||||
"projectName", "New_Project"
|
||||
)
|
||||
path = params.get("path", os.getcwd())
|
||||
template = params.get("template")
|
||||
|
||||
@@ -35,12 +38,13 @@ class ProjectCommands:
|
||||
|
||||
# Create a new board
|
||||
board = pcbnew.BOARD()
|
||||
|
||||
|
||||
# Set project properties
|
||||
board.GetTitleBlock().SetTitle(project_name)
|
||||
|
||||
|
||||
# Set current date with proper parameter
|
||||
from datetime import datetime
|
||||
|
||||
current_date = datetime.now().strftime("%Y-%m-%d")
|
||||
board.GetTitleBlock().SetDate(current_date)
|
||||
|
||||
@@ -58,38 +62,58 @@ class ProjectCommands:
|
||||
board.SetFileName(board_path)
|
||||
pcbnew.SaveBoard(board_path, board)
|
||||
|
||||
# Create schematic from template (use expanded template with many component types)
|
||||
# Create schematic from template (use expanded template with symbol definitions)
|
||||
schematic_path = project_path.replace(".kicad_pro", ".kicad_sch")
|
||||
template_sch_path = os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)),
|
||||
'..', 'templates', 'template_with_symbols_expanded.kicad_sch'
|
||||
"..",
|
||||
"templates",
|
||||
"template_with_symbols_expanded.kicad_sch",
|
||||
)
|
||||
|
||||
if os.path.exists(template_sch_path):
|
||||
# Copy template schematic
|
||||
shutil.copy(template_sch_path, schematic_path)
|
||||
|
||||
# Replace placeholder UUID with a real one
|
||||
import uuid as uuid_module
|
||||
|
||||
with open(schematic_path, "r", encoding="utf-8") as f:
|
||||
sch_content = f.read()
|
||||
sch_content = sch_content.replace(
|
||||
"00000000-0000-0000-0000-000000000000", str(uuid_module.uuid4())
|
||||
)
|
||||
with open(schematic_path, "w", encoding="utf-8") as f:
|
||||
f.write(sch_content)
|
||||
|
||||
logger.info(f"Created schematic from template: {schematic_path}")
|
||||
else:
|
||||
# Fallback: create minimal schematic
|
||||
logger.warning(f"Template not found at {template_sch_path}, creating minimal schematic")
|
||||
with open(schematic_path, 'w') as f:
|
||||
f.write(f'(kicad_sch (version 20230121) (generator "KiCAD-MCP-Server")\n\n')
|
||||
f.write(f' (uuid 00000000-0000-0000-0000-000000000000)\n\n')
|
||||
logger.warning(
|
||||
f"Template not found at {template_sch_path}, creating minimal schematic"
|
||||
)
|
||||
import uuid as uuid_module
|
||||
|
||||
with open(schematic_path, "w") as f:
|
||||
f.write(
|
||||
f'(kicad_sch (version 20250114) (generator "KiCAD-MCP-Server")\n\n'
|
||||
)
|
||||
f.write(f" (uuid {str(uuid_module.uuid4())})\n\n")
|
||||
f.write(f' (paper "A4")\n\n')
|
||||
f.write(f' (lib_symbols\n )\n\n')
|
||||
f.write(f" (lib_symbols\n )\n\n")
|
||||
f.write(f' (sheet_instances\n (path "/" (page "1"))\n )\n')
|
||||
f.write(f')\n')
|
||||
f.write(f")\n")
|
||||
|
||||
# Create project file with schematic reference
|
||||
with open(project_path, 'w') as f:
|
||||
f.write('{\n')
|
||||
with open(project_path, "w") as f:
|
||||
f.write("{\n")
|
||||
f.write(' "board": {\n')
|
||||
f.write(f' "filename": "{os.path.basename(board_path)}"\n')
|
||||
f.write(' },\n')
|
||||
f.write(" },\n")
|
||||
f.write(' "sheets": [\n')
|
||||
f.write(f' ["root", "{os.path.basename(schematic_path)}"]\n')
|
||||
f.write(' ]\n')
|
||||
f.write('}\n')
|
||||
f.write(" ]\n")
|
||||
f.write("}\n")
|
||||
|
||||
self.board = board
|
||||
|
||||
@@ -100,8 +124,8 @@ class ProjectCommands:
|
||||
"name": project_name,
|
||||
"path": project_path,
|
||||
"boardPath": board_path,
|
||||
"schematicPath": schematic_path
|
||||
}
|
||||
"schematicPath": schematic_path,
|
||||
},
|
||||
}
|
||||
|
||||
except Exception as e:
|
||||
@@ -109,7 +133,7 @@ class ProjectCommands:
|
||||
return {
|
||||
"success": False,
|
||||
"message": "Failed to create project",
|
||||
"errorDetails": str(e)
|
||||
"errorDetails": str(e),
|
||||
}
|
||||
|
||||
def open_project(self, params: Dict[str, Any]) -> Dict[str, Any]:
|
||||
@@ -120,7 +144,7 @@ class ProjectCommands:
|
||||
return {
|
||||
"success": False,
|
||||
"message": "No filename provided",
|
||||
"errorDetails": "The filename parameter is required"
|
||||
"errorDetails": "The filename parameter is required",
|
||||
}
|
||||
|
||||
# Expand user path and make absolute
|
||||
@@ -142,8 +166,8 @@ class ProjectCommands:
|
||||
"project": {
|
||||
"name": os.path.splitext(os.path.basename(board_path))[0],
|
||||
"path": filename,
|
||||
"boardPath": board_path
|
||||
}
|
||||
"boardPath": board_path,
|
||||
},
|
||||
}
|
||||
|
||||
except Exception as e:
|
||||
@@ -151,7 +175,7 @@ class ProjectCommands:
|
||||
return {
|
||||
"success": False,
|
||||
"message": "Failed to open project",
|
||||
"errorDetails": str(e)
|
||||
"errorDetails": str(e),
|
||||
}
|
||||
|
||||
def save_project(self, params: Dict[str, Any]) -> Dict[str, Any]:
|
||||
@@ -161,7 +185,7 @@ class ProjectCommands:
|
||||
return {
|
||||
"success": False,
|
||||
"message": "No board is loaded",
|
||||
"errorDetails": "Load or create a board first"
|
||||
"errorDetails": "Load or create a board first",
|
||||
}
|
||||
|
||||
filename = params.get("filename")
|
||||
@@ -177,9 +201,11 @@ class ProjectCommands:
|
||||
"success": True,
|
||||
"message": f"Saved project to: {self.board.GetFileName()}",
|
||||
"project": {
|
||||
"name": os.path.splitext(os.path.basename(self.board.GetFileName()))[0],
|
||||
"path": self.board.GetFileName()
|
||||
}
|
||||
"name": os.path.splitext(
|
||||
os.path.basename(self.board.GetFileName())
|
||||
)[0],
|
||||
"path": self.board.GetFileName(),
|
||||
},
|
||||
}
|
||||
|
||||
except Exception as e:
|
||||
@@ -187,7 +213,7 @@ class ProjectCommands:
|
||||
return {
|
||||
"success": False,
|
||||
"message": "Failed to save project",
|
||||
"errorDetails": str(e)
|
||||
"errorDetails": str(e),
|
||||
}
|
||||
|
||||
def get_project_info(self, params: Dict[str, Any]) -> Dict[str, Any]:
|
||||
@@ -197,12 +223,12 @@ class ProjectCommands:
|
||||
return {
|
||||
"success": False,
|
||||
"message": "No board is loaded",
|
||||
"errorDetails": "Load or create a board first"
|
||||
"errorDetails": "Load or create a board first",
|
||||
}
|
||||
|
||||
title_block = self.board.GetTitleBlock()
|
||||
filename = self.board.GetFileName()
|
||||
|
||||
|
||||
return {
|
||||
"success": True,
|
||||
"project": {
|
||||
@@ -215,8 +241,8 @@ class ProjectCommands:
|
||||
"comment1": title_block.GetComment(0),
|
||||
"comment2": title_block.GetComment(1),
|
||||
"comment3": title_block.GetComment(2),
|
||||
"comment4": title_block.GetComment(3)
|
||||
}
|
||||
"comment4": title_block.GetComment(3),
|
||||
},
|
||||
}
|
||||
|
||||
except Exception as e:
|
||||
@@ -224,5 +250,5 @@ class ProjectCommands:
|
||||
return {
|
||||
"success": False,
|
||||
"message": "Failed to get project information",
|
||||
"errorDetails": str(e)
|
||||
"errorDetails": str(e),
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@ import shutil
|
||||
import logging
|
||||
import uuid
|
||||
|
||||
logger = logging.getLogger('kicad_interface')
|
||||
logger = logging.getLogger("kicad_interface")
|
||||
|
||||
|
||||
class SchematicManager:
|
||||
"""Core schematic operations using kicad-skip"""
|
||||
@@ -16,11 +17,13 @@ class SchematicManager:
|
||||
# Determine template path (use template_with_symbols for component cloning support)
|
||||
template_path = os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)),
|
||||
'..', 'templates', 'template_with_symbols.kicad_sch'
|
||||
"..",
|
||||
"templates",
|
||||
"template_with_symbols.kicad_sch",
|
||||
)
|
||||
|
||||
# Determine output path
|
||||
output_path = name if name.endswith('.kicad_sch') else f"{name}.kicad_sch"
|
||||
output_path = name if name.endswith(".kicad_sch") else f"{name}.kicad_sch"
|
||||
|
||||
if os.path.exists(template_path):
|
||||
# Copy template to target location
|
||||
@@ -28,17 +31,21 @@ class SchematicManager:
|
||||
logger.info(f"Created schematic from template: {output_path}")
|
||||
else:
|
||||
# Fallback: create minimal schematic
|
||||
logger.warning(f"Template not found at {template_path}, creating minimal schematic")
|
||||
logger.warning(
|
||||
f"Template not found at {template_path}, creating minimal schematic"
|
||||
)
|
||||
# Generate unique UUID for this schematic
|
||||
schematic_uuid = str(uuid.uuid4())
|
||||
# Write with explicit UTF-8 encoding and Unix line endings for cross-platform compatibility
|
||||
with open(output_path, 'w', encoding='utf-8', newline='\n') as f:
|
||||
f.write('(kicad_sch (version 20230121) (generator "KiCAD-MCP-Server")\n\n')
|
||||
f.write(f' (uuid {schematic_uuid})\n\n')
|
||||
with open(output_path, "w", encoding="utf-8", newline="\n") as f:
|
||||
f.write(
|
||||
'(kicad_sch (version 20250114) (generator "KiCAD-MCP-Server")\n\n'
|
||||
)
|
||||
f.write(f" (uuid {schematic_uuid})\n\n")
|
||||
f.write(' (paper "A4")\n\n')
|
||||
f.write(' (lib_symbols\n )\n\n')
|
||||
f.write(" (lib_symbols\n )\n\n")
|
||||
f.write(' (sheet_instances\n (path "/" (page "1"))\n )\n')
|
||||
f.write(')\n')
|
||||
f.write(")\n")
|
||||
|
||||
# Load the schematic
|
||||
sch = Schematic(output_path)
|
||||
@@ -88,7 +95,8 @@ class SchematicManager:
|
||||
logger.debug("Extracted schematic metadata")
|
||||
return metadata
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Example Usage (for testing)
|
||||
# Create a new schematic
|
||||
new_sch = SchematicManager.create_schematic("MyTestSchematic")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
(kicad_sch (version 20230121) (generator "KiCAD-MCP-Server")
|
||||
(kicad_sch (version 20250114) (generator "KiCAD-MCP-Server")
|
||||
|
||||
(uuid 00000000-0000-0000-0000-000000000000)
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
(kicad_sch (version 20250114) (generator "KiCAD-MCP-Server")
|
||||
|
||||
(uuid 00000000-0000-0000-0000-000000000000)
|
||||
|
||||
(paper "A4")
|
||||
|
||||
(lib_symbols
|
||||
)
|
||||
|
||||
(sheet_instances
|
||||
(path "/" (page "1"))
|
||||
)
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
(kicad_sch (version 20230121) (generator "KiCAD-MCP-Server")
|
||||
(kicad_sch (version 20250114) (generator "KiCAD-MCP-Server")
|
||||
|
||||
(uuid a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d)
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(symbol (lib_id "Device:R") (at -100 -100 0) (unit 1)
|
||||
(symbol (lib_id "Device:R") (at -10000 -10000 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-000000000001)
|
||||
(property "Reference" "_TEMPLATE_R" (at -100 -102.54 0)
|
||||
@@ -143,14 +143,14 @@
|
||||
(property "Footprint" "" (at -100 -100 90)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -100 0)
|
||||
(property "Datasheet" "~" (at -10000 -10000 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 00000000-0000-0000-0000-000000000010))
|
||||
(pin "2" (uuid 00000000-0000-0000-0000-000000000011))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Device:C") (at -100 -110 0) (unit 1)
|
||||
(symbol (lib_id "Device:C") (at -10000 -10000 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-000000000002)
|
||||
(property "Reference" "_TEMPLATE_C" (at -100 -107.46 0)
|
||||
@@ -159,17 +159,17 @@
|
||||
(property "Value" "C_TEMPLATE" (at -100 -112.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -110 0)
|
||||
(property "Footprint" "" (at -10000 -10000 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -110 0)
|
||||
(property "Datasheet" "~" (at -10000 -10000 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 00000000-0000-0000-0000-000000000020))
|
||||
(pin "2" (uuid 00000000-0000-0000-0000-000000000021))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Device:LED") (at -100 -120 0) (unit 1)
|
||||
(symbol (lib_id "Device:LED") (at -10000 -10000 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-000000000003)
|
||||
(property "Reference" "_TEMPLATE_D" (at -100 -117.46 0)
|
||||
@@ -178,10 +178,10 @@
|
||||
(property "Value" "LED_TEMPLATE" (at -100 -122.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -120 0)
|
||||
(property "Footprint" "" (at -10000 -10000 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -120 0)
|
||||
(property "Datasheet" "~" (at -10000 -10000 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 00000000-0000-0000-0000-000000000030))
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
(kicad_sch (version 20230121) (generator "KiCAD-MCP-Server")
|
||||
(kicad_sch (version 20250114) (generator "KiCAD-MCP-Server")
|
||||
|
||||
(uuid 00000000-0000-0000-0000-000000000000)
|
||||
|
||||
(paper "A4")
|
||||
|
||||
(lib_symbols
|
||||
;; PASSIVES
|
||||
|
||||
(symbol "Device:R" (pin_numbers hide) (pin_names (offset 0)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "R" (at 2.032 0 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
@@ -182,7 +182,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;; SEMICONDUCTORS
|
||||
|
||||
(symbol "Device:D" (pin_numbers hide) (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "D" (at 0 2.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
@@ -497,7 +497,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;; INTEGRATED CIRCUITS
|
||||
|
||||
(symbol "Amplifier_Operational:LM358" (pin_names (offset 0.127)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "U" (at 0 5.08 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
@@ -546,7 +546,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;; CONNECTORS
|
||||
|
||||
(symbol "Connector_Generic:Conn_01x02" (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "J" (at 0 2.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
@@ -635,7 +635,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;; POWER/REGULATORS
|
||||
|
||||
(symbol "Regulator_Linear:AMS1117-3.3" (pin_names (offset 0.254)) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "U" (at -3.81 3.175 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
@@ -670,7 +670,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;; MISC
|
||||
|
||||
(symbol "Switch:SW_Push" (pin_numbers hide) (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
|
||||
(property "Reference" "SW" (at 1.27 2.54 0)
|
||||
(effects (font (size 1.27 1.27)) (justify left))
|
||||
@@ -721,261 +721,19 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; TEMPLATE INSTANCES (placed offscreen at -100, -110, etc.)
|
||||
(symbol (lib_id "Device:R") (at -100 -100 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-000000000001)
|
||||
(property "Reference" "_TEMPLATE_R" (at -100 -102.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "R" (at -100 -100 90)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -100 90)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -100 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 10000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid 10000000-0000-0000-0000-000000000002))
|
||||
)
|
||||
|
||||
|
||||
(symbol (lib_id "Device:C") (at -100 -110 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-000000000002)
|
||||
(property "Reference" "_TEMPLATE_C" (at -100 -107.46 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "C" (at -100 -112.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -110 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -110 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 20000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid 20000000-0000-0000-0000-000000000002))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Device:L") (at -100 -120 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-000000000003)
|
||||
(property "Reference" "_TEMPLATE_L" (at -100 -117.46 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "L" (at -100 -122.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -120 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -120 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 30000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid 30000000-0000-0000-0000-000000000002))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Device:Crystal") (at -100 -130 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-000000000004)
|
||||
(property "Reference" "_TEMPLATE_Y" (at -100 -127.46 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "Crystal" (at -100 -132.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -130 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -130 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 40000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid 40000000-0000-0000-0000-000000000002))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Device:D") (at -100 -140 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-000000000005)
|
||||
(property "Reference" "_TEMPLATE_D" (at -100 -137.46 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "D" (at -100 -142.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -140 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -140 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 50000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid 50000000-0000-0000-0000-000000000002))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Device:LED") (at -100 -150 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-000000000006)
|
||||
(property "Reference" "_TEMPLATE_LED" (at -100 -147.46 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "LED" (at -100 -152.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -150 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -150 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 60000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid 60000000-0000-0000-0000-000000000002))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Device:Q_NPN_BCE") (at -100 -160 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-000000000007)
|
||||
(property "Reference" "_TEMPLATE_Q_NPN" (at -100 -157.46 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "Q_NPN" (at -100 -162.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -160 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -160 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 70000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid 70000000-0000-0000-0000-000000000002))
|
||||
(pin "3" (uuid 70000000-0000-0000-0000-000000000003))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Device:Q_NMOS_GSD") (at -100 -170 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-000000000008)
|
||||
(property "Reference" "_TEMPLATE_Q_NMOS" (at -100 -167.46 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "Q_NMOS" (at -100 -172.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -170 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -170 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 80000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid 80000000-0000-0000-0000-000000000002))
|
||||
(pin "3" (uuid 80000000-0000-0000-0000-000000000003))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Amplifier_Operational:LM358") (at -100 -180 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-000000000009)
|
||||
(property "Reference" "_TEMPLATE_U_OPAMP" (at -100 -177.46 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "OpAmp" (at -100 -182.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -180 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "" (at -100 -180 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid 90000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid 90000000-0000-0000-0000-000000000002))
|
||||
(pin "3" (uuid 90000000-0000-0000-0000-000000000003))
|
||||
(pin "4" (uuid 90000000-0000-0000-0000-000000000004))
|
||||
(pin "8" (uuid 90000000-0000-0000-0000-000000000005))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Connector_Generic:Conn_01x02") (at -100 -190 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-00000000000A)
|
||||
(property "Reference" "_TEMPLATE_J2" (at -100 -187.46 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "Conn_2" (at -100 -192.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -190 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -190 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid A0000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid A0000000-0000-0000-0000-000000000002))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Connector_Generic:Conn_01x04") (at -100 -200 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-00000000000B)
|
||||
(property "Reference" "_TEMPLATE_J4" (at -100 -197.46 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "Conn_4" (at -100 -202.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -200 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -200 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid B0000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid B0000000-0000-0000-0000-000000000002))
|
||||
(pin "3" (uuid B0000000-0000-0000-0000-000000000003))
|
||||
(pin "4" (uuid B0000000-0000-0000-0000-000000000004))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Regulator_Linear:AMS1117-3.3") (at -100 -210 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-00000000000C)
|
||||
(property "Reference" "_TEMPLATE_U_REG" (at -100 -207.46 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "Regulator" (at -100 -212.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -210 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "" (at -100 -210 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid C0000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid C0000000-0000-0000-0000-000000000002))
|
||||
(pin "3" (uuid C0000000-0000-0000-0000-000000000003))
|
||||
)
|
||||
|
||||
(symbol (lib_id "Switch:SW_Push") (at -100 -220 0) (unit 1)
|
||||
(in_bom no) (on_board no) (dnp yes)
|
||||
(uuid 00000000-0000-0000-0000-00000000000D)
|
||||
(property "Reference" "_TEMPLATE_SW" (at -100 -217.46 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Value" "Switch" (at -100 -222.54 0)
|
||||
(effects (font (size 1.27 1.27)))
|
||||
)
|
||||
(property "Footprint" "" (at -100 -220 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(property "Datasheet" "~" (at -100 -220 0)
|
||||
(effects (font (size 1.27 1.27)) hide)
|
||||
)
|
||||
(pin "1" (uuid D0000000-0000-0000-0000-000000000001))
|
||||
(pin "2" (uuid D0000000-0000-0000-0000-000000000002))
|
||||
)
|
||||
|
||||
(sheet_instances
|
||||
(path "/" (page "1"))
|
||||
|
||||
Reference in New Issue
Block a user