This bug seems to have appeared for users of Fedora Core 5 (and other linux distributions that use glib 2.10.x). The bug has been fixed by the developers and the bug fix will appear in the next version of gEDA/gaf.
In the mean time, you can work around this bug by setting the environment variable G_SLICE to “always-malloc”. Specifically, before you run gschem, do this:
bash:
export G_SLICE=always-malloc
csh:
setenv G_SLICE always-malloc
If you run gschem and you get a window without a menu bar, no colors, and the program terminates when you press a key with the following message:
ERROR: Unbound variable: current-keymap
Or you get errors like this:
Gtk-CRITICAL : file gtkpixmap.c: line 97 (gtk_pixmap_new): assertion `val != NULL’ failed. Gtk-CRITICAL : file gtkpixmap.c: line 97 (gtk_pixmap_new): assertion `val != NULL’ failed. Tried to get an invalid color: 0 Tried to get an invalid color: 7 Tried to get an invalid color: 0 Tried to get an invalid color: 7
then gschem is not finding an rc file. There are two required rc files. The first is system-gschemrc
and the second is system-commonrc
.
${prefix}/share/gEDA/system-gschemrc
. ${prefix}
is where you installed gschem (usually /usr
or /usr/local
or $HOME/geda
). This file can also be installed in /etc/gEDA (the .debs packages do this).${prefix}/share/gEDA/system-commonrc
. This file can also be installed in /etc/gEDA
(the .debs packages do this). This file is not loaded directly by gschem. It is loaded by a “(load ...)” in the system-gschemrc rc file.Make sure these file are installed. The gschem.log file (which is created everytime you run gschem) holds valuable debugging information which should help in determining what is wrong. Check this file for where gschem is looking for the rc files.
Also, some older releases of gEDA/gaf had some bugs when the rc files were installed in other locations (other that ${prefix}/share/gEDA
), so please upgrade to a more current release.
Make sure that at least one of your config files contains a valid path to a symbol library. At startup, gschem checks for the following config files (on a Debian system):
/etc/gEDA/system-gafrc
~/.gEDA/gafrc
$PWD/gafrc
/etc/gEDA/system-gschemrc
~/.gEDA/gschemrc
$PWD/gschemrc]
All of these config files may or may not append paths to the library search list. If a config file conatins the command
(reset-component-library)
the library search path will be emptied. Order is obviously important, as this command will erase any previously appended paths.
Newbies with long-time Windows experience often ask this question. Here are three ways to easily move components with gschem:
One:
Two:
Three:
More generally, you can use this procedure to edit anything on a symbol. (Substitute “Edit Text” for your desired edit, of course.)
Answer: misc → nc-left, nc-right, nc-top, nc-bottom.
Caution: occassionally this may create a net called “no_connect” (or “NC??”) which may lead to no-connect pins being connected together in gnetlist – which you probably _don’t_ want to happen.
Running the script gschem-print.scm
will create the Postscript file that is specified on the command line.
The command line below creates a Postscript file from a schematic file (replace MY_SCH with the name of your schematic and GEDA_SCHEME_DIR with the name of the directory where your gEDA scheme files are installed):
gschem -p -oMY_SCH.ps -sGEDA_SCHEME_DIR/gschem-print.scm MY_SCH.sch
The BASH script below, which I name gschem-print
, creates a Postscript file for each schematic file that is specified on the command line and then outputs each Postscript file to the default printer:
#!/bin/bash # gschem options # -oPS_FILENAME output to Postscript file PS_FILENAME # -sSCRIPT_FILENAME run script SCRIPT_FILENAME # -p autoplace windows for name in $* do base=”${name%.*}” gschem -p -o$base.ps -sGEDA_SCHEME_DIR/gschem-print.scm $base.sch lpr -P$PRINTER $base.ps done
Edit the system-gschemrc
file or place the following into a gschemrc
file (either ~/.gEDA/gschemrc
or a gschemrc
file in the local directory where you invoke gschem):
(output-color "enabled") ; for color postscript output (image-color "enabled") ; for color PNG output (enabled by default)
To control the background of the PS output, change the following line in either gschem-darkbg (for the default black colored background) or gschem-lightbg (for the alternative light colored background):
(output-color-background 16 "black" "null" "0 0 0" 0 0 0)
The “0 0 0” is the RGB components (between 0..1) for the background color of the PS output.
To control the background of the PNG output, change the following line in either gschem-darkbg (for the default black colored background) or gschem-lightbg (for the alternative light colored background):
(background-color 0 "grey94" "null" "1 1 1" 255 255 255)
The 255 255 255 are the RGB components for the background color of the PNG image.
For black and white PS output, place the following into a gschemrc file:
(output-color "disabled") ; for monochrome postscript output
For black and white PNG images, place the following into a gschemrc file:
(image-color "disabled") ; for monochromoe PNG output
A simple example:
\documentclass{article} \usepackage{graphicx} \begin{document} \begin{image} \includegraphics[width=100mm]{ModulPID.epsi} \end{image} \end{document}
gschem does not provide this functionality internally, however there is a program called “poster” which does exactly this. It can be downloaded from either here (GNU) or here (KDE Print).
When a component is locked it is unselectable using the middle mouse button however it is selectable using a window select. To window select a component click and hold the left mouse button and drag the mouse to create a rectangular region containing the component to be unlocked. Execute the command Edit → unLock to unlock the component.
Gschem is configurable in more ways than can be describe here. Look at “system-gschemrc” for suggestions what else can be done.
Put
(text-size 10)
into your gschemrc and replace “10” with your favorite size.
Edit the system-gschemrc file and near the top you will find lines like:
; ; Start of color section ; ; Load up a color scheme has a light (almost white) background ; Comment out the first line and comment in the second line for a ; dark (black) background. The dark background is the original look. ; (load (string-append gedadatarc "/gschem-darkbg")) ; dark background ;(load (string-append gedadatarc "/gschem-lightbg")) ; light background
Comment out the darkbg
line (with a ;) and comment in the lightbg
line. This will give you a light background instead of a black background. It also adjust all the other colors to be compatible with a light background.
If you want more control over the colors, please edit ${prefix}/share/gEDA/gschem-darkbg
or ${prefix}/share/gEDA/gschem-lightbg
or create your own file and load it in the system-gschemrc
file.
IMHO, a black background is easier on the eyes for long periods of time.
Edit the system-gschemrc file or place the following into a gschemrc file (either ~/.gEDA/gschemrc
or a gschemrc
file in the local directory where you invoke gschem):
(load "$YOUR_INSTALL_PATH/share/gEDA/scheme/auto-uref.scm") ; load the autonumbering script (add-hook! add-component-hook auto-uref) ; autonumber when adding a component (add-hook! copy-component-hook auto-uref) ; autonumber when copying a component
Please substitute $YOUR_INSTALL_PATH by the path where geda is installed.
By default you get:
You can change the middle button by adding the following to a gschemrc file:
(middle-button "action") ;default binding, move or copy an object
or:
(middle-button "stroke") ;draw mouse gestures/strokes (must install libstroke to enable
or:
(middle-button "repeat") ;repeat the last command executed
You can change the right button by adding the following to a gschemrc file:
(third-button "popup") ;default binding, show a popup menu
or:
(third-button "mousepan") ;use the mouse to pan around the schematic
For more information on these options, please see the ${install_prefix}/share/gEDA/system-gschemrc
file.
This nomenclature arose from a discussion which frequently appears on the geda-user and geda-dev mailing lists. A light symbol is one which contains very few built-in attributes in the symbol itself. It requires that the user attach almost all attributes at the schematic level (e.g. using either gschem or gattrib). A heavy symbol is one which contains many attributes (such as package footprints, SPICE model names, etc.) built into the symbol file itself. A heavy symbol therefore requires very little attribute attachment at the schematic level – you just place it and you’re done.
The debate between proponents of heavy and light symbols is very detailed and involved. In caricature, proponents of heavy symbols belive that they provide better integration between gschem and PCB since the important layout attributes (such as footprint name) are already built into the symbol. This is considered a good thing for new users (noobs) who just want to design a simple board and don’t appreciate or don’t care about the zillions of variations that even a simple resistor might have (e.g. different footprint, TCR, precision, material composition, etc). Proponents of light symbols prefer to deal with attributes at the schematic level because they believe it to be more flexible. They are quick to point out that a library of heavy symbols will quickly grow into the thousands of parts with grotesquely long names trying to distinguish between the different variations of the part. They also point out that the utility �����gattrib” is the preferred tool for dealing with attributes at the schematic level (i.e. in the .sch file).
GEDA/gaf, as default configured, uses light symbols, although it can be configured to use heavy symbols. For further information, you may read these dicussions from the geda-user mailing list:
http://archives.seul.org/geda/user/Jun-2005/msg00001.html http://archives.seul.org/geda/dev/Oct-2005/msg00043.html
The symbols in the symbol library, like those available at the gedasymbols website are contributed by users just like you. Some people use different grid settings than other people (e.g. 50mil vs. 100mil). If you discover a symbol which seems to be off the grid, try reducing your grid spacing, move the symbol so that it sits on your grid, then revert to your preferred grid settings.
Yes, the gEDA docs suggest that you use a 100mil grid spacing. But everybody likes to do things their own way, and there is no overall symbol dictator to enforce the rules on contributed symbols. Therefore, you just need to be aware of this possibility.
Most attributes living in the symbol do not get promoted to the schematic unless they are visible. To promote invisible symbol attributes, look for the following keywords in the system-gschemrc file:
(attribute-promotion “enabled”); (promote-invisible “disabled”) ; ⇐ This one (keep-invisible “enabled”)
Add to your gschemrc file:
(promote-invisible “enabled”)
and you will get all the attributes promoted. The “keep-invisible” keyword will keep hidden those attributes that are hidden in the symbol file.
In the past, digital logic circuits often hid the power pin, and attached power nets using an attribute inside the symbol. Modern thought is that this is a bad practice (although religious wars still occasionally rage about this topic).
It’s marginally OK for an old logic circuit which is all 5V TTL to have hidden power and GND pins. If you only have +5V on your board, then hiding the power pin can simplify your schematic somewhat. However, few designers design such circuits nowadays; 5V TTL (and 5V CMOS) are rapidly becoming antique technologies.
It’s always been unacceptable to hide the power pins on analog chips. First, analog often has multiple power connections (VCC, VEE) which need to be explicitly drawn out. Second, good design practice is to place decoupling caps on each and every power pin. Sometimes one places an inductor in series with power also. Since these should be drawn into the schematic, it is best done by attaching them to an explicit power pin. Therefore, one should never use hidden power pins for analog symbols.
New logic circuits often use multiple supplies for different chip sections (OVDD, DVDD, etc). It is also typical to have several logic families on a single board (5V, 3.3V etc.). Therefore, it’s best to explicitly place and wire the power pins on the symbol. Hidden power pins are a recipe for disaster since you can all too easily misconnect a 5V part to a 3.3V power net, for example.
To paraphrase Nancy Reagan: Just say “no” to hidden power pins.
That said, it may still be usefull to detach the power pins from the functional part of the symbol. To do so, define a seperate power symbol and give it the same refdes as the functional part. A run of gsch2pcb will treat the siblings properly as one single component. As neither gschem nor gsch2pcb explicitely know that the component is only complete with both symbols defined, you have to check yourself. With this workaround, you can draw all power related circuitry in one corner of the schematic where it does not interfere with the signal nets. In many cases this is advantageous with analog circuits.
Yes. It is the Symbol Creation Guide.