Hi, why if i have a project in Xschem and i use "I...
# xschem
h
Hi, why if i have a project in Xschem and i use "Insert" Key to add subcircuits into my top circuit. When i push it to Git and clone it on another PC, the subcircuits there i had Inserted comes with bugs and i need to re-add all again (even if the directory skeleton stay the same)? How to fix it?
m
Could it have something to do with the library path? When I download other people's mpw designs, often the schematics show with yellow boxes for pins or devices that aren't at the same directory location as the original. Is that your problem? There's probably a way to fix it by modifying the xschemrc file (or ~/.xschemrc file), but I haven't been able to get that to work. What I do is either 1. add links for relative file paths (ex. selecting the device and press
q
brings up properties. If the device is
devices/iopin.sym
, I'll add a link in the directory to the
devices
directory.) 2. for absolute file paths that don't exist on my system, I edit the
*.sch
file directly with a text editor to change all the paths at once.
s
@Hugo Dias xschem uses a XSCHEM_LIBRARY_PATH containing a list of paths. For symbols instantiated in schematics only the symbol name (or the last directory plus the symbol name, depending on user configuration and preferences) is saved. To find and load the real file xschem scans the list of paths, and appends the symbol reference until an existing file is found. To migrate a project on a different system you only need to edit the XSCHEM_LIBRARY_PATH list (in the xschemrc file) to match the target system directory locations. If you insert in schematic a symbol from a directory that is not in the XSCHEM_LIBRARY_PATH list then the full path is saved in the schematic. This makes the design not portable. Bottom line: if you open with an editor a schematic and you see full paths in the C-lines (lines starting with C, cmponent instances) then your project setup is wrong and you should fix it as soon as possible. All directories cntaining symbols you plan to use in the project should be listed in the XSCHEM_LIBRARY_PATH variable. In cases of lot of missing symbols you can edit the schematic file with a text editor and fix the paths in C lines manually.
m
@Stefan Schippers Thanks for the explanation. The
xschemrc
file has this comment
Copy code
#### values may be overridden by user's ~/.xschem/xschemrc configuration file
#### or by project-local ./xschemrc
What is the order for resolving multiple
xschemrc
files? Does it use
./xschemrc
if it exists else use
~/.xschem/xschemrc
or does it load both and if so, what order?
s
Hi, @Mitch Bailey the order is this: System-wide xschemrc (
/.../share/xschem/xschemrc
) is always sourced. (by default it has only commented lines, so not any setting is done). Then if an xschemrc is existing in current directory (this is usually a project xchemrc) it is sourced. No other xschemrc is sourced in this case. Else if a
~/.xschem/xschemrc
file is existing it is sourced (this is user's xschemrc).
👍 1