Kicad Github PCB footprint libraries

One of the things I like about Kicad is it supports libraries right off of Github so you can have the latest PCB footprints as they’re added there. But there are currently 85 libraries on the main Kicad github page, so it’s difficult to get started and find the stuff you want.

To make it easier to get started, I entered the name and Github URI for each library into my fp-lib-table file and uploaded it to a gist: https://gist.github.com/xesscorp/c09155aaa954b06b344a . All anyone has to do is load the contents of this gist into their own fp-lib-table file and they’ll have immediate access to all the public Kicad PCB footprint libraries.

Once you have those, you can use the library browser in pcbnew to look at the footprints in various libraries and decide which ones are useful to you. Then you can comment-out the ones you don’t need/want.

These libraries would have helped in a few of the forum topics we’ve already had: 1) there is a library of fiducials already built that can be used as-is or modified and 2) another library with single-pin pads/holes that could be used for building 0.1" prototyping areas.

If anyone knows other Github-based libraries, I can add them to the gist. The only requirement is they have to be in the Kicad .pretty format (whatever that is).

6 Likes

This is great! Is there a way to move these footprints over to a “verified” library? One of my biggest concerns (after lots of personal experience) is always having a footprint that I have checked and verified. Once it has been checked, I would like to some how notate that it has been checked.

2 Likes

You can set it up for keeping a local copy of a footprint and then send the verified footprint to the repo maintainer so they can update the library. Your local copy should always take precedence over the Github version of the footprint.

Or you can copy the footprint to another local library directory where you keep verified footprints.

One gotcha for Windows users like me: Kicad copies fp-lib-table into your roaming user profile upon first use (/Users/[user]/AppData/Roaming/kicad for Windows 8). So you need to edit that file and not the one in /kicad/share/template.

PS: An old version of this file left behind by a previous Kicad install had me wondering for an hour why Github footprints didn’t work and the footprint browser was broken (invalid path due to missing KISYSMOD env variable).

PS2: Also note that this file might create an issue when you want to use old and new Kicad builds on the same machine.

1 Like

Just for info, the official list of github pretty repos is found in [42]. This should be kept up to date by the library maintainers.

[42] https://github.com/KiCad/kicad-library/blob/master/template/fp-lib-table.for-github

3 Likes

Thanks to all for the info here, I included it in this latest video. Hopefully I didn’t mess anything up :smile:

1 Like

Solved!!

I had to type this into the search bar: %appdata% , and then Roaming to pull up the correct folder.


Hey Chicken, I’m trying to update the fp-lib-table file on my Windows 8 laptop but I can’t find /AppData/Roaming/kicad location on my hard drive no matter how hard I try.

Do I need to do anything special to locate this file?

I’m using the latest KiCAD windows software.

Quick Question:

I’m using the latest Windows build of KiCad.

I’m learning how to use KiCad from scratch using Chris Gammell’s free series of tutorials which are great. These tutorials are the reason I decided to move forward with KiCad instead of Eagle since I couldn’t find any good course on how to learn Eagle from scratch.

So I noticed that the default part library thats used inside PCBnew was pretty limited.

So I came across this thread which was shown in one of the Module 5 tutorial videos named “Working With 3rd Party Libraries”.

I copied the text from the file listed at the Github link provided in the first post of this thread: https://gist.github.com/xesscorp/c09155aaa954b06b344a

And then saved that info into my fp-lib-table as instructed.

I can now see more parts available in the libraries of PCBnew so I’m pretty sure that worked.

Is this all that needs to be done? Will this always keep the library up to date by syncing to Github’s latest library automatically?

Hi there!
Today morning I received an error “Errors were encountered loading footprints IO_ERROR: http GET command failed”.
The full error text is below.
I tested the URLs abused by KiCad and there was really 404 error :frowning:
So is there any temporary error? Does anyone knows what’s going on?

BTW. Yesterday evening everything was fine!

Errors were encountered loading footprints
IO_ERROR: http GET command failed
Cannot get/download Zip archive: ‘https://codeload.github.com/KiCad/Housings_SOT.pretty/zip/master
for library path: ‘https://github.com/KiCad/Housings_SOT.pretty’.
Reason: ‘Not found’
from C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad-4.0.0-rc1/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 584
IO_ERROR: http GET command failed
Cannot get/download Zip archive: ‘https://codeload.github.com/KiCad/Housings_TO-78.pretty/zip/master
for library path: ‘https://github.com/KiCad/Housings_TO-78.pretty’.
Reason: ‘Not found’
from C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad-4.0.0-rc1/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 584
IO_ERROR: http GET command failed
Cannot get/download Zip archive: ‘https://codeload.github.com/KiCad/Pentawatts.pretty/zip/master
for library path: ‘https://github.com/KiCad/Pentawatts.pretty’.
Reason: ‘Not found’
from C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad-4.0.0-rc1/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 584
IO_ERROR: http GET command failed
Cannot get/download Zip archive: ‘https://codeload.github.com/KiCad/Transistors_SMD.pretty/zip/master
for library path: ‘https://github.com/KiCad/Transistors_SMD.pretty’.
Reason: ‘Not found’
from C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad-4.0.0-rc1/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 584
IO_ERROR: http GET command failed
Cannot get/download Zip archive: ‘https://codeload.github.com/KiCad/Capacitors_Elko_ThroughHole.pretty/zip/master
for library path: ‘https://github.com/KiCad/Capacitors_Elko_ThroughHole.pretty’.
Reason: ‘Not found’
from C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad-4.0.0-rc1/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 584
IO_ERROR: http GET command failed
Cannot get/download Zip archive: ‘https://codeload.github.com/KiCad/Oscillator-Modules.pretty/zip/master
for library path: ‘https://github.com/KiCad/Oscillator-Modules.pretty’.
Reason: ‘Not found’
from C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad-4.0.0-rc1/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 584
IO_ERROR: http GET command failed
Cannot get/download Zip archive: ‘https://codeload.github.com/KiCad/Housings_SOT-23_SOT-143_TSOT-6.pretty/zip/master
for library path: ‘https://github.com/KiCad/Housings_SOT-23_SOT-143_TSOT-6.pretty’.
Reason: ‘Not found’
from C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad-4.0.0-rc1/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 584
IO_ERROR: http GET command failed
Cannot get/download Zip archive: ‘https://codeload.github.com/KiCad/Housings_TO-92.pretty/zip/master
for library path: ‘https://github.com/KiCad/Housings_TO-92.pretty’.
Reason: ‘Not found’
from C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad-4.0.0-rc1/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 584

Some of libraries were removed (footprints were sorted out into other libraries).
It’s better to use local copy of libraries instead of the “online” that can change without notification.
Please remove online libraries from footprint table and generate new table using
Preferences > Footprint Library Wizard.

michal777

I’m new to this forum and using Kicad. I’m getting the same errors as Roman. I can’t seem to find the footprint table or the Preferences > footprint library wizard. I have version 4.0.0 rc1.

Thanks in advance for any help.

@davidperez57 if you tell us whats your operating system we can tell you where to find the fp-lib-table.
for example:
iam on Kubuntu 15.10 and my is at

/home/stefan/.config/kicad/fp-lib-table

on windows it will be also somwhere in your user config - but i don’t know the path.
(eventually …/AppData/Roming/…/kicad/ or something similar)

if you want that kicad ( a current / fresh installation) restores the current default fp-lib-table just remove your fp-lib-table
than there will be generated a new default on as on the first start…
(all your user-defined entry’s are gone then…)

sunny greetings
stefan

The actual problem seems to be that KiCAD’s github plugin is looking for
    $GIT_URL/zip/master
when it should be looking for
    $GIT_URL/archive/master.zip
(seen by hovering over the “download ZIP” button on github)
Is there a way to control what the plugin appends to the github URL?

I’m new to KiCAD, so I may be misunderstanding, but I’ve had a look at my fp-lib-table and it already has those lines in it. Does that mean that KiCAD 4.02 includes this by default and so it’s no longer necessary to add this script to the fp-lib-table file?

thanks
D

Pcbnew has a build in Footprint Library Wizard which in few step could: fetch the footprint library list from GitHub repository, check those libraries, download libraries to local disk and finally create valid global fp-lib-table.
It’s the best practice - as Jean Pierre Charras said - to use this wizard just after installation if sb uses only default KiCad libraries.

has anyone had trouble with win10 not letting the file to be saved after editing it.
if so how did you overcome this problem?

such a wonderful piece of junk this win10 is turning out to be.
dave

Which file do you mean? If you’re trying to edit and save something else than locally stored *.pretty library the save option will not work.

In Windows it’s a bad idea installing any data files into c:\program files. I would create a folder called c:\KicadData or something like that and put Kicad data files there. With a bit of coaxing Kicad can be persuaded to use these files instead. Then you can modify them as you wish.

win 10 seems to be alot of the problem as i have trouble with other files being read only.

but then i used the save to user folder and that seems to work ok.

now with the github files installed i have troubles with kicad finding other footprint files that were saved in the user/documents folder and i need those to finish the project.

i find the kicad lib folder management very cumbersome and awkward. and have not able to find instructions as to how to manage them

i have read a couple of tutorials about this subject but i have not been able to understand them

it appears that i have lib files in the c:\program files\kicad\ (several)
in c:\users\dave\appdata\kicad
in c:\users\dave\documents\vfo.pretty

and i have not been able to access the stuff in the documents file from in kicad.
i hope i got this right

dave

Lets make new footprint library step by step from the beginning.

  1. Open Explorer and create LibKiCad sub folder in user Documents folder.
  2. Open KiCad and load your project or create a new one to enable all the tools.
  3. Start Footprint Editor and create a footprint. For example SimplePad.
  4. To save it in the new library select “Save footprint in New Library” from “File” menu.
  5. Editor ask for the destination folder and the destination library name, so click Browse and select previously created LibKiCad folder.
  6. The Library folder input line will be pre-filled with path base. Put cursor at the end and type \Pads.pretty. This will create sub folder Pads.pretty which will be also the name of the new footprint library. Then click OK to save library.
  7. To access new library we need to add it to the Library Table. Open “Preferences” menu and select “Footprint Libraries Manager”. This will open library configuration window.
  8. Now you have to decide: Add the new library to the Global Libraries - available for any projects, or add to the Project Specific Libraries - available only to this particular project. For this tutorial I will add it to the Global Libraries.
  9. Click on “Append with Wizard” button. This will open another window.
  10. In the first step of wizard select “Files on my computer” and click Next. Using the folders tree find and select your new library Pads.pretty. And click Next.
  11. The wizard will validate library in the next step. If the Status will be OK click Next. Now depending of your choice in the point 8, select one of option.
  12. The new library should appear at the end of the list of available libraries in selected table. Click OK to close library manager window.
  13. Now you can verify is your new library available by starting Footprint Viewer.

Steps from 7 to 12 can be repeated if there are more existing libraries to add.
In the step no. 10 more than one library can be selected, just hold Ctrl key and select the next ones.

2 Likes