Overview
Manufacturing output is handled by various exporter classes in KiCad. The most important are Gerber generation (source/pcbnew/exporters/gerber_jobfile_writer.h), drill file generation, and assembly file creation.Gerber Files
What are Gerber Files?
Gerber files are the industry standard format for PCB manufacturing. Each file represents one layer of the PCB:Copper Layers
Front, back, and internal copper patterns
Solder Mask
Protective coating over copper
Silkscreen
Component designators and markings
Paste Stencil
Solder paste application pattern
Generating Gerber Files
Select Layers
Choose which layers to export:Standard 2-layer board:
- F.Cu (front copper)
- B.Cu (back copper)
- F.SilkS (front silkscreen)
- B.SilkS (back silkscreen)
- F.Mask (front solder mask)
- B.Mask (back solder mask)
- F.Paste (front solder paste, SMD only)
- B.Paste (back solder paste, SMD only)
- Edge.Cuts (board outline)
Configure Options
Set Gerber parameters:Coordinate format: 4.6 (millimeters) or 4.5 (recommended)Aperture macros: Use for complex pad shapes
Gerber File Structure
Gerber files use RS-274X format:Drill Files
NC Drill Files
Generate drill files for through-holes and vias:Select Format
Choose drill file format:
- Excellon
- Gerber X2
Most common format (NC Drill)Settings:
- Units: Millimeters (recommended) or inches
- Zeros: Decimal format (3.3) or suppress leading/trailing
- Precision: 3:3 (mm) or 2:4 (inch)
Configure Drill Options
Set drill parameters:
- PTH and NPTH in single file: Combine all holes
- Separate files: PTH drills separate from NPTH
- Merge PTH and NPTH: All holes together (not recommended)
- Drill origin: Absolute or auxiliary axis
Generate Drill Map
Create visual drill map (PDF or Gerber) for reference.Shows:
- Drill hole positions
- Tool numbers and sizes
- Layer information
Drill File Structure
Excellon format example:Assembly Files
Pick-and-Place (PnP)
Generate component position files for automated assembly:Select Format
Choose file format:
- ASCII (CSV): Human-readable, most compatible
- Gerber X3: Modern format with full metadata
PnP File Format
CSV format example:Gerber X3 Pick-and-Place
Modern format with component metadata:Bill of Materials (BOM)
Generate BOM from Schematic
In Eeschema: Tools → Generate BOM- Built-in BOM
- BOM Plugins
Simple component list:
- Grouped by value
- Shows reference designators
- Includes quantities
- Basic CSV or XML output
BOM Content
Typical BOM includes:Component designator (R1, C5, U3)
Number of identical components
Component value or part number
PCB package type
Link to component datasheet
Component manufacturer
Manufacturer part number
Where to purchase (Digi-Key, Mouser, etc.)
Supplier part number
Other Export Formats
IPC-2581
Modern PCB fabrication format:GenCAD
Legacy CAM format:Hyperlynx
Signal integrity simulation:IDF (Intermediate Data Format)
Mechanical CAD integration:Fabrication Package
Typical fabrication package includes:Manufacturing Notes
Include fabrication notes with your order:Board Specifications
- Material: FR4, aluminum, flexible, etc.
- Thickness: 1.6mm (standard), 0.8mm, 2.0mm, etc.
- Copper weight: 1oz (35µm), 2oz, etc.
- Layers: 2, 4, 6, 8, etc.
- Finish: HASL, ENIG, OSP, etc.
- Color: Green, blue, red, black, white mask
- Min trace/space: Based on design rules
- Min drill: Smallest hole size used
Special Requirements
- Controlled impedance traces
- Blind/buried vias
- Edge plating
- Chamfered edges
- Gold fingers (edge connectors)
- Specific markings or serialization
Validation Before Manufacturing
Verify Gerbers
Use Gerber viewer (GerbView in KiCad) to inspect all layers:
- Check copper patterns
- Verify silkscreen placement
- Confirm solder mask openings
- Inspect board outline
Review Assembly Data
Validate pick-and-place:
- Component positions correct
- Rotations accurate
- No missing components
- DNP flags set properly
Best Practices
Use Standard Formats
Use Standard Formats
Stick to Gerber RS-274X and Excellon drill files for maximum compatibility with manufacturers.
Include Job File
Include Job File
Always generate a Gerber job file. It helps manufacturers understand your design intent.
Check with Manufacturer
Check with Manufacturer
Verify your manufacturer’s requirements before generating files. Some have specific layer naming or format preferences.
Archive Everything
Archive Everything
Keep complete fabrication packages with design files. Include date and revision in filenames.
Test First Article
Test First Article
Order a small quantity initially to verify the design before full production.
Source Code References
Next Steps
Design Rules
Configure constraints for manufacturability
PCB Layout
Design boards for manufacturing
3D Models
Export 3D for mechanical integration