Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.

How to Generate Gerber Files from gEDA/PCB: Complete Guide for Open Source PCB Design

If you’re working with gEDA/PCB and ready to send your design to a fabrication house, you need to generate Gerber files. I’ve been using gEDA tools for years on various Linux-based projects, and I can tell you that while the export process is straightforward, there are some nuances that can trip you up if you’re not familiar with the workflow.

gEDA/PCB is part of the gEDA project, an umbrella organization dedicated to producing free software tools for electronic design. The PCB program itself is an interactive printed circuit board editor that runs on Unix, Linux, Windows, and Mac systems. What makes it particularly attractive to open-source enthusiasts and hobbyists is its complete lack of artificial restrictions on board size or layer count, combined with its ability to produce industry-standard manufacturing outputs.

Understanding gEDA/PCB and Its Role in Open Source PCB Design

The gEDA suite represents one of the most mature open-source electronic design automation toolchains available. Unlike commercial alternatives that can cost thousands of dollars, gEDA provides professional-grade capabilities completely free of charge. The suite includes gschem for schematic capture, PCB for layout, and gerbv for Gerber file verification.

gEDA/PCB can provide industry-standard RS-274X Gerber output, NC drill files in Excellon format, and centroid data (X-Y data) for use in board fabrication and assembly processes. It also supports photorealistic rendering and design review images, which are invaluable when reviewing designs before committing to production.

Key Features of gEDA/PCB for Manufacturing Output

The PCB editor includes several features specifically designed to facilitate the manufacturing handoff process. These include a rats nest feature for visualizing unrouted connections, schematic/netlist import capabilities, comprehensive design rule checking, and most importantly for our purposes, robust export functionality for fabrication files.

FeatureDescriptionManufacturing Benefit
RS-274X ExportIndustry-standard Gerber formatUniversal manufacturer acceptance
NC Drill OutputExcellon format drill filesAccurate hole placement
Centroid DataX-Y component locationsSMT assembly support
DRCDesign Rule CheckerPre-fabrication error detection
Multi-layer SupportSignal and plane layersComplex board fabrication

What Are Gerber Files and Why Do They Matter?

Before diving into the export process, let’s establish what Gerber files actually represent. Gerber is a 2D vector image format that describes each layer of your PCB with exact precision. The format was originally developed by Gerber Systems Corporation in the 1960s and has evolved into the RS-274X standard, which remains the backbone of the PCB manufacturing industry.

When you send your design to a PCB manufacturer, they need these files to produce your boards. Each Gerber file represents a single layer of your design, whether that’s a copper layer, solder mask, silkscreen, or board outline. The RS-274X format embeds all necessary aperture definitions within the file itself, eliminating the need for separate aperture files that plagued the older RS-274D format.

Gerber File Types Required for PCB Manufacturing

A complete set of manufacturing files from gEDA/PCB typically includes the following:

File TypeExtensionPurpose
Top Copper.top or .gtlComponent side copper traces
Bottom Copper.bottom or .gblSolder side copper traces
Top Solder Mask.topmask or .gtsSolder mask on component side
Bottom Solder Mask.bottommask or .gbsSolder mask on solder side
Top Silkscreen.topsilk or .gtoComponent markings (top)
Bottom Silkscreen.bottomsilk or .gboMarkings on solder side
Board Outline.outline or .gkoPhysical board dimensions
Drill File.cnc or .drlHole locations and sizes
Inner Layers.group1, .group2For multilayer boards

Preparing Your Design for Gerber Export in gEDA/PCB

Before you generate your Gerber files, there are several critical steps you should complete to ensure your output files are accurate and manufacturing-ready. Skipping these steps is a common mistake that leads to rejected boards or costly fabrication errors.

Running Design Rule Checks

The first thing I always do before exporting is run a comprehensive Design Rule Check. In gEDA/PCB, you can access this through the menu by selecting Connects → Design Rule Checker, or by typing DRC() in the command interface.

You can configure your design rules in the Sizes section of the Preferences dialog. These rules should match your PCB manufacturer’s capabilities. Common parameters include minimum trace width, minimum spacing between conductors, minimum drill size, and minimum annular ring requirements.

Essential DRC Parameters to Verify:

ParameterTypical MinimumNotes
Trace Width6 mil (0.15mm)Check manufacturer specs
Trace Spacing6 mil (0.15mm)Critical for isolation
Drill Size0.3mmSmaller costs more
Annular Ring0.15mmPrevents drill breakout
Via Size0.4mmIncluding annular ring

Verifying Board Outline and Dimensions

Your board outline must be a closed shape with no gaps. This is absolutely critical because manufacturers use this layer to determine where to cut your board. In gEDA/PCB, the outline should be drawn on the outline layer, and you should verify it forms a complete perimeter before export.

If you have internal cutouts, mounting holes, or other mechanical features, ensure they’re properly defined on the appropriate layers. Some manufacturers prefer these on a separate mechanical layer, so check your fabricator’s requirements.

Step-by-Step Guide to Generate Gerber Files from gEDA/PCB

Now let’s walk through the actual export process. I’ll cover both the GUI method and command-line options, since gEDA/PCB excels in both environments.

Step 1: Open Your PCB Design

Launch the PCB editor and open your design file. If you’ve been working with gschem for schematic capture, you should have already imported your netlist using gsch2pcb and completed your layout.

Verify that your design is complete by checking that no unrouted connections (rats nest lines) remain visible. You can toggle the rats nest display to confirm all connections have been routed.

Step 2: Access the Export Function

In gEDA/PCB, the export functionality is accessed through the File menu. Navigate to File → Export Layout, or alternatively, you can use File → Print Layout and select Gerber/RS-274X as the output format.

The export dialog presents several options that control how your Gerber files are generated. Understanding these options is crucial for producing manufacturer-compatible output.

Step 3: Configure Gerber Export Settings

When the export dialog appears, you’ll need to configure several important parameters:

Format Settings:

SettingRecommended ValueDescription
Output FormatRS-274X (Gerber)Industry standard format
Coordinate Format2:4 or 2:5Decimal precision
UnitsInches or mmMatch your design units
Zero SuppressionLeadingMost common preference

The coordinate format deserves special attention. The format 2:4 means 2 integer digits and 4 decimal digits, providing 0.0001″ precision in imperial units. For most designs, this is more than adequate, but high-density designs may benefit from 2:5 format.

Step 4: Select Layers to Export

gEDA/PCB allows you to select which layers to include in your export. For a standard 2-layer board, you’ll want to export:

Copper Layers: Select both the top (component) and bottom (solder) copper layers. These contain your traces, pads, and vias.

Solder Mask Layers: Include both top and bottom solder mask layers. These define where the protective coating should be removed to expose copper for soldering.

Silkscreen Layers: Export the silkscreen layers if you have component designators, logos, or other markings. Not all designs use bottom silkscreen, so export only what you need.

Outline Layer: Always include your board outline. This is essential for the manufacturer to know the physical board dimensions.

Step 5: Generate the Gerber Files

Click the export or generate button to create your Gerber files. gEDA/PCB will create separate files for each selected layer in your specified output directory.

The generated files will typically be named based on your design file name with appropriate extensions for each layer type.

Step 6: Generate NC Drill Files

Gerber files describe your board’s imagery, but they don’t include hole information. You need to generate separate NC drill files for this purpose.

In gEDA/PCB, access the drill file export through File → Export Layout and select the drill/NC output option. Configure the following settings:

SettingRecommended Value
FormatExcellon
UnitsSame as Gerber files
Coordinate FormatSame as Gerber files
Zero SuppressionSame as Gerber files

Critical: Your drill file settings must match your Gerber file settings. Mismatched units or coordinate formats will cause your holes to be misaligned with your pads, resulting in unusable boards.

Step 7: Separate Plated and Non-Plated Holes

If your design includes both plated through-holes (PTH) and non-plated holes (NPTH), you should generate separate drill files for each type. Plated holes connect copper between layers, while non-plated holes are typically used for mounting hardware.

Most manufacturers expect these to be in separate files, as they require different processing during fabrication.

Command-Line Gerber Generation in gEDA/PCB

One of gEDA/PCB’s strengths is its command-line interface, which enables scripted and automated workflows. This is particularly useful for continuous integration environments or when you need to regenerate files consistently across multiple designs.

Basic Command-Line Export

The basic syntax for command-line export is:

pcb -x gerber –gerberfile outputname inputfile.pcb

Advanced Export Options

gEDA/PCB supports numerous command-line options for fine-tuning your export:

OptionDescription
–gerberfileBase filename for output
–all-layersExport all defined layers
–verboseShow export progress
–outlineInclude board outline
–metricUse metric units

You can also specify individual layers using the –layer-stack option, which accepts a comma-separated list of layer names.

Automated Export Scripts

Many gEDA users create Makefiles or shell scripts to automate their export process. A typical workflow script might include:

bash

# Generate Gerberspcb -x gerber –gerberfile design design.pcb# Generate drill files  pcb -x drill design.pcb# Package for manufacturerzip design_gerbers.zip *.gbr *.cnc

This approach ensures consistent output every time and integrates well with version control workflows.

Verifying Your Gerber Files with Gerbv

The gEDA project includes gerbv, a free and open-source Gerber viewer that’s essential for verifying your exported files before sending them to a manufacturer. Never skip this step since catching errors now costs nothing compared to discovering them on fabricated boards.

Installing and Using Gerbv

Gerbv is available on most Linux distributions through the package manager. For Windows users, compiled binaries are available from the gEDA project website.

To verify your files, launch gerbv and load all your Gerber and drill files. The viewer displays layers stacked on top of each other, allowing you to verify alignment and completeness.

Verification Checklist

When reviewing your Gerber files in gerbv, verify the following:

Check ItemWhat to Look For
Layer AlignmentAll layers should be properly registered
Trace WidthsVerify traces meet minimum specifications
Drill LocationsHoles should center on pads
Board OutlineClosed shape, correct dimensions
Solder MaskOpenings properly sized over pads
SilkscreenText readable, not overlapping pads
Annular RingsAdequate copper around holes

Pay particular attention to the drill layer overlaid with your copper layers. The holes should be perfectly centered on your pads. Any offset indicates a settings mismatch between your Gerber and drill exports.

Common gEDA/PCB Gerber Export Issues and Solutions

Based on my experience and feedback from the gEDA community, here are the most common problems encountered during Gerber generation and how to resolve them.

Drill-to-Gerber Misalignment

This is the most frequently reported issue. When drill holes don’t align with pads in your Gerber viewer, the cause is almost always mismatched settings between your Gerber and drill file exports.

Solution: Ensure both exports use identical units (inches or millimeters), coordinate format (e.g., 2:4), and zero suppression settings (leading or trailing).

Missing or Incorrect Board Outline

Some manufacturers report receiving files without a board outline, or with an outline that doesn’t form a closed shape.

Solution: Draw your outline on the dedicated outline layer in gEDA/PCB. Verify the shape is closed by zooming in on all corners. Export this layer explicitly in your Gerber output settings.

Negative vs. Positive Layer Polarity

gEDA/PCB may generate plane layers with negative polarity, which some manufacturers have difficulty processing. A completely filled plane with no tracks will be output as a negative layer by default.

Solution: If you need a plane layer output as positive, add a short track segment somewhere in an unused portion of the plane. This triggers gEDA/PCB to render the layer as positive.

Single-Sided Board Considerations

When creating single-sided boards, remember that they don’t have plated holes. The pad diameter for pins must be larger, typically two to three times the drill size, to ensure adequate copper remains after drilling.

Solution: Modify your footprints to use larger pads when designing for single-sided fabrication. When exporting, delete the unused copper layer file and rename your plated-holes drill file to unplated-holes.

Best Practices for Manufacturing-Ready Output from gEDA/PCB

Following these best practices will help ensure your Gerber files are accepted by manufacturers without requiring modifications or clarification.

File Naming Conventions

Different manufacturers have different preferences for file naming. Using standard Protel-style extensions improves compatibility:

LayerStandard Extension
Top Copper.GTL
Bottom Copper.GBL
Top Solder Mask.GTS
Bottom Solder Mask.GBS
Top Silkscreen.GTO
Bottom Silkscreen.GBO
Board Outline.GKO or .GML
Drill.DRL or .TXT

Including a README File

I always include a brief text file with my Gerber package that documents the layer stackup, board thickness, copper weight, surface finish, and any special requirements. This reduces the chance of misinterpretation by the manufacturer.

Packaging Your Files

Package all your Gerber files, drill files, and any documentation into a single ZIP archive. This is the standard format expected by most PCB manufacturers and prevents files from being separated or lost.

Useful Resources for gEDA/PCB Users

Here are essential resources for working with gEDA/PCB and Gerber files:

Official gEDA Resources

ResourceURLDescription
gEDA Projectgeda-project.orgMain project website
PCB Homepagepcb.geda-project.orgPCB editor documentation
Gerbvgerbv.geda-project.orgGerber viewer
gEDA Wikiwiki.geda-project.orgCommunity documentation

Download Links

ToolDownload Location
gEDA/PCBsourceforge.net/projects/pcb
Gerbvsourceforge.net/projects/gerbv
gEDA Suitewiki.geda-project.org/geda:download

Free Gerber Viewers

ViewerPlatformFeatures
GerbvLinux, WindowsLayer overlay, measurements
KiCad GerbViewCross-platformPart of KiCad suite
ViewMateWindowsDFM analysis
HQDFMOnlineFree DFM checks
FlatCAMCross-platformCAM preparation

Frequently Asked Questions

What Gerber format should I use when exporting from gEDA/PCB?

Always use RS-274X (Extended Gerber) format when exporting from gEDA/PCB. This is the current industry standard that embeds aperture definitions within the files themselves. The older RS-274D format requires separate aperture files and is considered obsolete. Gerbv and most modern tools will not display RS-274D files, so sticking with RS-274X ensures compatibility with both viewers and manufacturers.

Can I generate ODB++ files from gEDA/PCB instead of Gerber?

The standard gEDA/PCB does not natively support ODB++ export. However, Gerber RS-274X remains the most universally accepted format, with virtually all PCB manufacturers worldwide accepting it. If your manufacturer specifically requires ODB++, you may need to use a conversion tool or consider alternative design software. For most fabrication needs, Gerber files generated by gEDA/PCB are perfectly adequate.

Why are my drill holes misaligned with pads when I view the Gerber files?

Drill-to-pad misalignment is almost always caused by mismatched export settings between your Gerber and NC drill files. Ensure both exports use identical settings for units (inches or millimeters), coordinate format (such as 2:4), and zero suppression (leading or trailing). After matching these settings, regenerate both file sets and verify alignment in gerbv before sending to your manufacturer.

How do I handle multilayer boards in gEDA/PCB?

For multilayer boards, gEDA/PCB supports multiple signal and plane layers. When exporting, ensure you select all inner layers in addition to the standard top and bottom layers. Each inner layer will generate a separate Gerber file. Your drill files should remain the same, as holes pass through all layers. Be sure to document your layer stackup clearly for the manufacturer, including which layers are signal layers versus plane layers.

Do I need to include centroid files for PCB assembly?

Centroid files (also called pick-and-place or X-Y files) are only required if you’re ordering assembled boards with surface-mount components. gEDA/PCB can generate centroid data containing component locations, rotations, and reference designators. If you’re ordering bare boards only, you don’t need these files. For assembly orders, check with your assembly house for their specific format requirements.

Conclusion

Generating Gerber files from gEDA/PCB is a straightforward process once you understand the workflow and pay attention to the critical settings. The key steps involve running your design rule checks before export, configuring your Gerber settings with appropriate format and precision, generating drill files with matching settings, and verifying everything in gerbv before sending to your manufacturer.

The gEDA project provides a complete, professional-grade toolchain for PCB design without the cost of commercial alternatives. While the learning curve may be steeper than some commercial tools, the flexibility and power of command-line operation, combined with the active community support, make it an excellent choice for open-source hardware projects.

Remember that your Gerber files are the bridge between your design and the physical board. Taking the time to generate them correctly and verify them thoroughly is an investment that pays off in successful fabrications and fewer costly mistakes. With the process outlined in this guide, you’re well-equipped to produce manufacturing-ready outputs from gEDA/PCB.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.

  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.

Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.