After an exhaustive search I have decided to use Kicad for my electronic projects.
I have gone through several tutorials. I primarily work with Microchip controllers.
I need to set up files so that I can use Kicad offline. I downloaded all the libs, footprints, etc (~1gb).
-----UPDATED -----
set Kicad directories to
KICAD_PTEMPLATES C:\Users\[user name]\Documents\kicad\template
KIGITHUB https://github.com/KiCad
KISYS3DMOD C:\Users\[user name]\Documents\kicad\packages3d
KISYSMOD C:\Users\[user name]\Documents\kicad\footprint
Edit C:\Program Files\KiCad\share\kicad\template\kicad.pro
and project .pro file and point to custom library files.
Win OS may need to use forward slashes (unconfirmed).
IMPORTANT : can not have trailing line blanks, or empty lines at end of file!
I think you have a good tree already. I have a data folder for components, Iām not really concerned about the other bits (you could also add folders for worksheets, scripts etc).
I have folders for components : library, footprints, and packages3d. They all have different handling.
library, symbol libraries. From kicad install, or from github:kicad-library/library
footprints. Download to local disk from github, all the *.pretty repositories.
packages3d. 3d models from kicad install or github:kicad-library/modules/packages3d/
In each case I also have some third party stuff, e.g. Walter Lainās libraries, plus my own stuff.
Configuration in Kicad
Path must be configured for each project, but the ānew projectā template can be updated with default system paths.
footprints. Set the KISYSMOD variable to the footprints folder. Configure the system-wide footprint table via Footprint Libraries Wizard to include of you local libs (and delete unwanted ones).
packages3d. Set the variable KISYS3DMOD to your packages3d folder. You may need to change footprints to have the right path to the 3d model.
either in cvpcb or pcbnew you can edit the library table in Preferences/Footprint library manager.
OR
if you like editing text files by hand, find out where the fp-lib-table file is located on your machine (a search for fp-lib-table on this forum will show the common location of this file on win/mac/linux).
I would keep the āNicknameā field exactly as it is on the github repositories, the Library Path needs to point to your actual .pretty directories (this might be as easy as changing the KIGITHUB variable to point to the root directory of your library collection), and the Plugin Type should be just āKiCadā for local libraries.
although you have local copies of the libraries on disk, if youāve downloaded them originally with āgit cloneā from github you can still manually update them from github with e.g. āgit pull origin masterā periodically (when you are connected to the internet or otherwise want the latest libs)
per your suggestions
before
KICAD_PTEMPLATES C:\Users\pluto\Documents\kicad\template
KIGITHUB https://github.com/KiCad
KISYS3DMOD C:\Users\pluto\Documents\kicad\modules\packages3d
KISYSMOD C:\Users\pluto\Documents\kicad
after
KICAD_PTEMPLATES C:\Users\pluto\Documents\kicad\template
KIGITHUB https://github.com/KiCad
KISYS3DMOD C:\Users\pluto\Documents\kicad\packages3d
KISYSMOD C:\Users\pluto\Documents\kicad\footprint
If you go long in KiCAD, you need the following folders, preferably on a data share/drive and not on your os/system drive for more easy backup:
symbols (currently .lib files, will become .sweet folders afaik with symbol files .kicad_sym? in them)
footprints (.pretty folders which contain .kicad_mod files, which are the footprints)
3d models (suggest similar subfolders as for footprints, models are in .wlr files (VRML), but can be .igs (IGES) or .stp (STEP) in far future (*))
projects (folder that contains subfolders - 1 per project, which contain .pro files and all the other files for a project (.sch. lib, .net, etc.pp)
python scripts (for the scripts you use/download for KiCAD, this folder needs special hooking to get working with KiCAD)
Thatās the baseline.
On top of this you might want/need/consider:
datasheet folder (for footprints at least)
how to folder (download guides/tutorials from the web here for kicad)
I donāt use pcb templates, donāt intend to, so I ignore them.
I once downloaded/got the public footprints, but removed them as I make my own as I go along.
Symbols I got the public ones loaded (still) but never used them, also made my own.
If I werenāt so proficient in 3d, I would probably use the public models, but yeah, I also use my own
If you create gerbers/drill files, create a sub-directory in the project folder and output them into that one, makes it easier to zip them up for fabrication. I use just ā/gerberā.
PS: If you look for stuff to download now and digest later:
Rheingold Heavy has some articles on BOM and getting KiCAD projects fabrication ready
Chris Gammell (Contextual Electronis) youtube channel (I used firefox and DownThemAll extension and stored them locally)
My only problem now is I have re-arranged the LIBS quite a bit. For example I have a LIB for resistors because I like to have specific things that I know fits my bench parts and has worked for me in the past.
Where do I edit the default LIBS loaded for a newpcb?
Dangā¦ you were asking for the symbol libs, not the footprint reposā¦ wish there was a more straight forward distinctive naming scheme for this.
The fp-lib-table in the template folder is not used, afaik.
And now, for the symbol libs (in windows):
C:\Program Files\KiCad\share\kicad\template
a file called kicad.pro
This one getās copied/merged with the .pro file that is being created in the project folder, when you make a new one.
Thus thus if you want to change something for an already established project the mcguyver way, you edit the .pro file in the project folder.
And if you got custom libs, you add them to that kicad.pro file there in the template folder, so they are being added each time when you create a new project, without further messing needed in the eeschema library paths window.
PS: I have no clue why some settings are in blabla/Roaming and the others are in blabla/templateā¦ might be because pcbnew has already been refurbished and eeschema not yet, but I donāt knowā¦
Once again thanks for all the help. This gets me goingā¦
I bought a bottle of whiskey today and now I have a whole night of watching Kicad tutorials ahead of me. I donāt learn much with this technique but it sure beats watching presidential candidates on the news.
I donāt know if it works for the kicad.pro template lib source file, but an entry for custom libs in the .pro file (which resides in the project folder) looks like this:
LibName2=E:/Data_KiCAD/_KiCAD_Library/MyCustomLib
So, unless you place your custom libs in the folder where the libs reside that ship with kicad, you might need that absolute path - donāt know if there is relative path stuff working/available yetā¦ didnāt need it yet/havenāt been that far into KiCAD yet. But will need that myself next when I go over my custom libs, currently all devices are in a single custom lib.
Thanks, I am sure you just saved me 30min of format issues. I had noticed the existing config was by name. Iāll report back once I get things going the way I like them tomorrow.
So, I edit a project <project_name>.pro file and pointed it to my custom library files. When Kicad loads it reports it can not find the library files. Yet, if I go to the preferences and want to add one, it sees them and inserts a new item. Kicad seems to be using a .pro for the project somewhere else. Any ideas?
Does not make a difference
changed both default and project .pro
I also tried win & linux line ends (\r\n vs \r) - no difference.
The odd thing is when I use preferences to add a library entry it duplicates an existing entry but does not seem to see the existing entry. It is acting like it keeps a copy of the entries somewhere else. I have rebooted several times in case a cache was effected.
Hmā¦
I changed the eeschema lib entries in kicad.pro in that template folder to this:
[eeschema]
version=1
LibDir=E:/Data_KiCAD/_KiCAD_Library
[eeschema/libraries]
LibName1=power
LibName2=mylib (end of file is here)
Then started KiCAD, created a new project (plain vanilla template, nothing special) and I get the same entries in the test.pro file. So for me, itās taking the kicad.pro out of the template folder here
C:\Program Files\KiCad\share\kicad\template
adds some minor changes and it becomes the projects .pro file.
For me backslashes werenāt working for the path + when I had one of the lib entries (LibNameX=) left empty (was testing an established projects reaction to these changes) - KiCAD didnāt load any libs after that line, so itās pretty finickle in that regard.
I use BZR6097 at the momentā¦ as the scripting console is working again in the nightlies Iāll install that asap and see if it works there too.
If all else fails, create a new project, add the libs via the preferences/component libs dialog in eeschema and once all works, check out the .pro file of that project. Copy the parts that you need into the template and it should work. Unless the template is somewhere else, but for BZR6097 it seems to sit there.
Success!
You got me thinking about cut & paste I did. So I took both files and noticed blank empty lines at the end of the file and some extra end of line blank spaces. Once I removed them it WORKED!
So,it does not like extra spaces anywhere including blank lines. I do not know what language is being used for Kicad but PHP has trim,ltrim,rtrim to solve these types of problems during line parsing. Thank you for all the help.
I havenāt made any boards or parts, etc but I have Kicad working the way I want now. Now I can start learning how to use it offlineā¦