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