From 128e53d220d97225803d61d86f8e43439563181d Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 26 Jul 2016 00:22:55 +0200 Subject: WIP: kicad_gen is a util to generate schematic.h files from KiCAD netlist files. Current code contains a lexer and parser for KiCAD's netlist files and code to build a tree of the netlist which can be used for generation. Contains CMake code for integrating the generation into CMake too. --- test-input/lcd3310.net | 163 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 test-input/lcd3310.net (limited to 'test-input/lcd3310.net') diff --git a/test-input/lcd3310.net b/test-input/lcd3310.net new file mode 100644 index 0000000..e7f6a79 --- /dev/null +++ b/test-input/lcd3310.net @@ -0,0 +1,163 @@ +(export (version D) + (design + (source /home/trygvis/dev/io.trygvis/2016/06/intel-quark-d2000-playground/apps/lcd3310/schematic/lcd3310.sch) + (date "Thu 21 Jul 2016 20:51:53 CEST") + (tool "Eeschema 4.0.2+dfsg1-stable") + (sheet (number 1) (name /) (tstamps /) + (title_block + (title) + (company) + (rev) + (date) + (source lcd3310.sch) + (comment (number 1) (value "")) + (comment (number 2) (value "")) + (comment (number 3) (value "")) + (comment (number 4) (value ""))))) + (components + (comp (ref U1) + (value MOD-LCD3310) + (libsource (lib olimex) (part MOD-LCD3310)) + (sheetpath (names /) (tstamps /)) + (tstamp 578E9EE0)) + (comp (ref U2) + (value D2000_DP) + (libsource (lib intel-quark) (part D2000_DP)) + (sheetpath (names /) (tstamps /)) + (tstamp 578E9F5B)) + (comp (ref W1) + (value TEST_1P) + (libsource (lib conn) (part TEST_1P)) + (sheetpath (names /) (tstamps /)) + (tstamp 578F91E5))) + (libparts + (libpart (lib intel-quark) (part D2000_DP) + (fields + (field (name Reference) U) + (field (name Value) D2000_DP)) + (pins + (pin (num 1) (name NC) (type NotConnected)) + (pin (num 2) (name ~RESET) (type input)) + (pin (num 3) (name 3.3V) (type input)) + (pin (num 4) (name 5V) (type power_out)) + (pin (num 5) (name GND) (type power_out)) + (pin (num 6) (name GND) (type power_out)) + (pin (num 7) (name NC) (type NotConnected)) + (pin (num 8) (name A0) (type input)) + (pin (num 9) (name A1) (type input)) + (pin (num 10) (name A2) (type input)) + (pin (num 11) (name A3) (type input)) + (pin (num 12) (name A4) (type input)) + (pin (num 13) (name A5_SDA) (type input)) + (pin (num 14) (name A6_SCL) (type input)) + (pin (num 15) (name D0_UART_A_RX) (type input)) + (pin (num 16) (name D1_UART_A_TX) (type input)) + (pin (num 17) (name D2) (type input)) + (pin (num 18) (name D3) (type input)) + (pin (num 19) (name D4) (type input)) + (pin (num 20) (name D5) (type input)) + (pin (num 21) (name ~~D6) (type input)) + (pin (num 22) (name D7) (type input)) + (pin (num 23) (name D8) (type input)) + (pin (num 24) (name ~~D9) (type input)) + (pin (num 25) (name D10_SSO) (type input)) + (pin (num 26) (name D11_MOSI) (type input)) + (pin (num 27) (name D12_MISO) (type input)) + (pin (num 28) (name D13_SCK) (type input)) + (pin (num 29) (name GND) (type power_out)) + (pin (num 30) (name Aref) (type input)) + (pin (num 31) (name SDA) (type BiDi)) + (pin (num 32) (name SCL) (type output)))) + (libpart (lib olimex) (part MOD-LCD3310) + (fields + (field (name Reference) U) + (field (name Value) MOD-LCD3310)) + (pins + (pin (num 1) (name GND) (type power_in)) + (pin (num 2) (name 5V) (type power_in)) + (pin (num 3) (name SDA) (type BiDi)) + (pin (num 4) (name SCL) (type input)))) + (libpart (lib conn) (part TEST_1P) + (description point) + (fields + (field (name Reference) W) + (field (name Value) TEST_1P)) + (pins + (pin (num 1) (name 1) (type passive))))) + (libraries + (library (logical intel-quark) + (uri /home/trygvis/dev/io.trygvis/2016/06/intel-quark-d2000-playground/apps/lcd3310/schematic/intel-quark.lib)) + (library (logical olimex) + (uri /home/trygvis/dev/io.trygvis/2016/06/intel-quark-d2000-playground/apps/lcd3310/schematic/olimex.lib)) + (library (logical conn) + (uri /usr/share/kicad/library/conn.lib))) + (nets + (net (code 1) (name "Net-(U2-Pad30)") + (node (ref U2) (pin 30))) + (net (code 2) (name "Net-(U2-Pad24)") + (node (ref U2) (pin 24))) + (net (code 3) (name "Net-(U2-Pad14)") + (node (ref U2) (pin 14))) + (net (code 4) (name "Net-(U2-Pad23)") + (node (ref U2) (pin 23))) + (net (code 5) (name "Net-(U2-Pad13)") + (node (ref U2) (pin 13))) + (net (code 6) (name "Net-(U2-Pad22)") + (node (ref U2) (pin 22))) + (net (code 7) (name "Net-(U2-Pad12)") + (node (ref U2) (pin 12))) + (net (code 8) (name "Net-(U2-Pad21)") + (node (ref U2) (pin 21))) + (net (code 9) (name "Net-(U2-Pad11)") + (node (ref U2) (pin 11))) + (net (code 10) (name "Net-(U2-Pad15)") + (node (ref U2) (pin 15))) + (net (code 11) (name "Net-(U2-Pad20)") + (node (ref U2) (pin 20))) + (net (code 12) (name "Net-(U2-Pad10)") + (node (ref U2) (pin 10))) + (net (code 13) (name "Net-(U2-Pad9)") + (node (ref U2) (pin 9))) + (net (code 14) (name "Net-(U2-Pad8)") + (node (ref U2) (pin 8))) + (net (code 15) (name "Net-(U2-Pad7)") + (node (ref U2) (pin 7))) + (net (code 16) (name "Net-(U2-Pad6)") + (node (ref U2) (pin 6))) + (net (code 17) (name "Net-(U2-Pad5)") + (node (ref U2) (pin 5))) + (net (code 18) (name "Net-(U2-Pad3)") + (node (ref U2) (pin 3))) + (net (code 19) (name "Net-(U2-Pad2)") + (node (ref U2) (pin 2))) + (net (code 20) (name /LCD_SDA) + (node (ref U1) (pin 3)) + (node (ref U2) (pin 31)) + (node (ref W1) (pin 1))) + (net (code 21) (name "Net-(U2-Pad1)") + (node (ref U2) (pin 1))) + (net (code 22) (name "Net-(U2-Pad19)") + (node (ref U2) (pin 19))) + (net (code 23) (name "Net-(U2-Pad28)") + (node (ref U2) (pin 28))) + (net (code 24) (name "Net-(U2-Pad18)") + (node (ref U2) (pin 18))) + (net (code 25) (name "Net-(U2-Pad27)") + (node (ref U2) (pin 27))) + (net (code 26) (name "Net-(U2-Pad17)") + (node (ref U2) (pin 17))) + (net (code 27) (name "Net-(U2-Pad26)") + (node (ref U2) (pin 26))) + (net (code 28) (name "Net-(U2-Pad16)") + (node (ref U2) (pin 16))) + (net (code 29) (name "Net-(U2-Pad25)") + (node (ref U2) (pin 25))) + (net (code 30) (name +5V) + (node (ref U2) (pin 4)) + (node (ref U1) (pin 2))) + (net (code 31) (name "Net-(U1-Pad1)") + (node (ref U1) (pin 1)) + (node (ref U2) (pin 29))) + (net (code 32) (name /LCD_SCL) + (node (ref U1) (pin 4)) + (node (ref U2) (pin 32))))) \ No newline at end of file -- cgit v1.2.3