|
KiCad PCB EDA Suite
|
| Markup | Result | |
|---|---|---|
| <samp>^{superscript}</samp> | <samp>superscript </samp> | |
| <samp>Driver Board^{Rev A}</samp> | <samp>Driver BoardRev A</samp> | |
| <samp>_{subscript}</samp> | <samp>subscript </samp> | |
| <samp>D_{0} - D_{15}</samp> | <samp>D0 - D15</samp> | |
| <samp>~{overbar}</samp> <samp>~{CLK}</samp> | <samp> </samp> <samp>overbar</samp> <samp> </samp> <samp>CLK</samp> | |
| <samp>${variable}</samp> | <samp>variable_value</samp> | |
| <samp>${PROJECTNAME}</samp> | <samp>MyBoard</samp> | |
| PCB Variables | ||
| <samp>${FILENAME}</samp> | <samp>board.kicad_pcb</samp> | |
| <samp>${FILEPATH}</samp> | <samp>/path/to/board.kicad_pcb</samp> | |
| <samp>${LAYER}</samp> (in text/tables) | <samp>F.Cu, B.Cu, F.SilkS...</samp> | |
| Footprint Cross-References | ||
| <samp>${refdes:field}</samp> | <samp>field_value of footprint refdes</samp> | |
| <samp>${U1:REFERENCE}</samp> | <samp>U1</samp> | |
| <samp>${U1:VALUE}</samp> | <samp>STM32F407VGT6</samp> | |
| <samp>${U1:FOOTPRINT_LIBRARY}</samp> | <samp>Package_QFP</samp> | |
| <samp>${U1:FOOTPRINT_NAME}</samp> | <samp>LQFP-100_14x14mm_P0.5mm</samp> | |
| Pad/Pin Functions | ||
| <samp>${refdes:NET_NAME(pad)}</samp> | <samp>Net name connected to pad</samp> | |
| <samp>${U1:NET_NAME(5)}</samp> | <samp>VCC</samp> | |
| <samp>${refdes:SHORT_NET_NAME(pad)}</samp> | <samp>Short net name or NC</samp> | |
| <samp>${J1:SHORT_NET_NAME(3)}</samp> | <samp>GND</samp> or <samp>NC</samp> | |
| <samp>${refdes:NET_CLASS(pad)}</samp> | <samp>Net class for pad</samp> | |
| <samp>${J1:NET_CLASS(1)}</samp> | <samp>Power</samp> | |
| <samp>${refdes:PIN_NAME(pad)}</samp> | <samp>Pin function/name</samp> | |
| <samp>${U1:PIN_NAME(5)}</samp> | <samp>USART1_TX</samp> | |
| Table Variables | ||
| <samp>${ROW}</samp> (in tables) | <samp>1, 2, 3...</samp> | |
| <samp>${COL}</samp> (in tables) | <samp>1, 2, 3...</samp> | |
| <samp>${ADDR}</samp> (in tables) | <samp>A1, B2, C3...</samp> | |
| Math Expressions | ||
| <samp>expression}</samp> | <samp>evaluated_result</samp> | |
| <samp>2 + 3}</samp> | <samp>5</samp> | |
| <samp>${ROW} - 1}</samp> | <samp>3</samp> (when ROW=4) | |
| String Comparison & Conditional Text | ||
| <samp>"text" == "text"}</samp> | <samp>1</samp> | |
| <samp>"text" != "other"}</samp> | <samp>1</samp> | |
| <samp>if(condition, true_val, false_val)}</samp> | <samp>Conditional text display</samp> | |
| <samp>if("${LAYER}" == "F.Cu", "TOP", "BOTTOM")}</samp> | <samp>TOP</samp> (on front layer) or <samp>BOTTOM</samp> | |
| <samp>if(${ROW} > 5, "High", "Low")}</samp> | <samp>Numeric comparisons work too</samp> | |
| Escape Sequences | ||
| <samp>${LITERAL}</samp> | <samp>${LITERAL}</samp> (not expanded) | |
| <samp>Price: $25.00</samp> | <samp>Price: $25.00</samp> | |
| <samp>@{x+y}</samp> | <samp>x+y}</samp> (not evaluated) | |
| Nested Variables | ||
| <samp>${U1:NET_NAME(${ROW}-2})}</samp> | <samp>Dynamic net lookup in tables</samp> | |
| <samp>${U${ROW}:VALUE}</samp> | <samp>Dynamic footprint reference</samp> | |
Note that markup has precedence over variable expansion.
Footprint Cross-References: Reference fields and pads on other footprints using <samp>${refdes:field}</samp> or <samp>${refdes:function(pad)}</samp> syntax.
Nested Variables: Variables can contain other variables. Inner variables are expanded first. Maximum nesting depth: 10 levels.
Error Messages: