User Tools

Site Tools


This is an old revision of the document!

This page is intended to be a less overwhelming version of the pcb_developer_introduction.

Finding Information

The best resource for information on the guts of pcb is the current and past developers. Make sure that you subscribe to the geda-user mailing list. There are typically monthly code sprints on the last Sunday of the month that are held on the #geda IRC channel on Sometimes the developers are there at other times as well.

There's also no shortage of documentation. Some of it is even current! Quite a bit of documentation exists in the source code, so that's a good place to look. There's also lots of stuff on this wiki, but it's not always easy to find. Search is your friend. Here are some additional resources:

Getting to Know the pcb Sources

In order to start hacking pcb, you should be familiar with how the sources are organized, and how to build system works.

The pcb sources are managed in a git repository: To download the latest sources for the first time, you can use the command:

git clone git://

For subsequent updates, you can change do the source directory and run

git checkout master
git pull

There's lots of accessible documentation on how to use git However, it's really easy to figure out how to do things using Google. Note that you wont be able to contribute your changes directly to the server until you get an account set up with DJ. Ask him on the mailing list. Alternatively, you can submit your patches to the mailing list, or to LaunchPad.

Now that you have the source files, you'll want to know what's stored where. The source tree's file structure is described here: pcb_source_tree_file_structure

To build pcb, you can find instructions here: building_pcb

Where to Start

The first thing you need to know about pcb is that it's been around a long time and in the hands of many different developers, each of whom had their own style. You'll see this quite clearly as you start looking around in the code. We're trying to move towards some standardized coding conventions, but, it's a big code base and no one really has the time to sit down and go through the entire thing to make it uniform. So, we do it as we go. Another consequence of pcb's history is that each developer had different ideas about how things should be implemented. So, in general, it's not safe to assume that two things that you think ought to be similar are implemented in the same way, because it was probably two different people that implemented it. This, too, is a work in progress.

The second thing you need to know, is that pcb is designed to work with many different HIDs (Human Interface Devices). The term might be a little misleading because, for example, the gtk interface and the png exporter are both considered HIDs.

The first time you open up the pcb sources can be a bit intimidating, but don't worry, this page is here to help. The first two things you'll want to know about are the data structures and “actions”. For now, the data structures are basically all stored in “global.h”. You can look through these, and many of them look as you might expect. The documentation here on the wiki is a work in progress, but you can find some data structures documented here: pcb_data_structures.

Actions are how things get done in pcb. When you click the mouse somewhere, or hit a key on the keyboard, you set of a chain of actions. Following a chain of actions can feel a little bit like trying to untangle a plate of spaghetti, but trust me, it gets easier. Understanding how actions work is essential to understanding pcb. So, it's worth it to spend some time tracing a few actions through.

geda/pcb_developer_introduction_2.1517094827.txt.gz · Last modified: 2018/01/27 18:13 by cparker