Upgrading footprints from 8.0 to 9.0

Yesterday I upgraded my footprint models from v8.0 to v9.0, according to KiCad 9.0 user’s manual. The process was painful because I kept getting an error message that was not clear. The “-o [–output] OUTPUT_DIR” must be set, but for many attempts I kept getting an error message saying that the output directory cannot overlap the current directory. That error message is unclear. Exactly what is “the current directory” in that context, and what constitutes “overlap”? I kept moving my current working directory within a Windows command shell but that made no difference in the dozens of attempts that I made. After many many attempts, I finally got a successful upgrade of footprints, as best as I can tell. BTW, those upgraded footprints were working for me yesterday but when I signed onto the same computer and the same KiCad project today, suddenly KiCad shows no models at all in my custom directory (though they were there yesterday and the files have not moved since then). As a result, I give a low satisfaction rating to upgrading footprints from KiCad 8.0 to 9.0. I am still fighting this process.

Hi @Whirlwind3D,

Is your above post about making your personally made/modified/imported footprints available to now use in Kicad 9, that were previously available to use in Kicad 8?

Yes. I apologize that I did not make that clear.

I wonder if this can be resolved by not using Dropbox as well.

I’m puzzled by your mention of -o output_dir as this implies a script. AFAIK .kicad_mod footprints can be used untouched in a new KiCad release without any conversion or export. All you have to do is register the library location using Manage Footprint Libraries. When I looked in the documentation output_dir is mentioned here:

https://docs.kicad.org/9.0/en/cli/cli.html#footprint_export
https://docs.kicad.org/9.0/en/cli/cli.html#footprint_upgrade

which talk about exporting to SVG or upgrading from a legacy format. Maybe that’s what happened to you?

The upgrade section says:

If the input library is already in the current file format, no action is taken.

So it’s a no-op trying to “upgrade” .kicad_mod files.

If you open a footprint in a later version and save it, it will be saved in the new format. So yes, this happens automatically and there’s no need for mass conversion. The older version can’t use the converted footprints.

Your are correct guessing that I used the Footprint Upgrade command to process my KiCad v8 custom footprint library (“MyFootprint.pretty”). I did that because the documentation says, " The fp upgrade command converts the the specified footprint library from a legacy KiCad footprint format or a non-KiCad footprint format to the native format for the current version of KiCad." In the context of upgrading from v8 to v9, I understood the documentation’s clear statement about “upgrade” to be relevant. Further, I understood that “a legacy KiCad footprint format” could refer to KiCad v8, while “the current version of KiCad” referred to KiCad v9. Even in hindsight, this seems to be a rational understanding of the documentation that came with KiCad v9. I will try today to revert to my custom footprint library used with v8 and see how KiCad v9 responds to loading those.

I wish to add that if the ‘fp upgrade’ process did nothing to my v8 footprint files, then that would not explain why v9 doesn’t recognize any of those files in v9 Footprint Editor or when attempting to define a footprint in the Properties dialog for a symbol in the Schematic Editor.

Well at least you (and any bystander watching) have learnt one thing: legacy symbol format actually means pre-v6 and you don’t have to upgrade symbol libraries in the future. As for your current troubles, you have another topic for that.

Yes. (( might I humbly suggest that KiCad’s user manual should be edited to be as clear as your comment here in explaining the KiCad-meaning of “legacy” ? ))

Submit an issue on Gitlab for that. I’m just another user.

The process of reestablishing personal libraries on a new version is a bit messy at the moment, but in other topics, the devs recognise that and one of the things that needs to be done is to separate system library entries from personal library entries in the tables some future release.

Problem solved. I found a line in the fp-lib-table file which defined the name “MyCustomFootprints” (my example name here) with “uri” defined as a text path to a __.pretty directory in another project (not the local project). In other words, my project XYZ contained fp-lib-table file which contained a line for “MyCustomFootprints” with path to a totally separate project ABC. For standardization and avoidance of duplication, I try to have just one custom footprints file for use in all my KiCad projects. How on Earth the fp-lib-table file in one project got a line pointing to a completely different project is a total mystery to me. At this point, I only know that editing fp-lib-table with Notepad and removing the line with path to the wrong directory has fixed the problem in my current working directory. After making just that one change to fp-lib-table, KiCad v9 Footprints Editor now sees not only my custom footprints directory name but also shows all the footprint models (*.kicad_mod).

Almost certainly that was done by a human. If computers make “errors” the output is usually complete gibberish. It’s quite plausible (especially for someone with little experience in this little part of KiCad, to:

  1. Include some personal library from “some other place”
  2. Move on to something more interesting, the immediate problem is solved.
  3. Completely forget this little detail.

Using a text editor to modify fp-lib-table is a common way to make changes in them. In the old day’s it used to be common to edit other KiCad files with a text editor too, but over the years KiCad has gotten better GUI functions to do almost all other things. For the fp-lib-table, I use https://meldmerge.org/. It’s a source code merge program, which can compare different versions of a file and highlight the differences. It also makes it very easy to copy strings from one of the files to another.

The project specific library can also be removed using the GUI, click on the Project Specific tab to see it.

Forgive my being late to the game here. I have this same issue. I upgraded to version 9 from 8. I expected, as is the case with all programs I use, that the upgrade would do all that is necessary. But it appears that isn’t the case. I’ve started the program - selected the PRO file from the project folder and all opened up. I closed out. I assumed this made everything compatible with 9. But now when I run DRC my custom FP’s aren’t found. It finds the folder it appears but not the files. Now I read about having to upgrade the footprints? The above info is broken at best - suggesting at one point individually (each file) and someone says you don’t need to do a mass conversion. I’m lost. I did open up one of the FP files and indeed it says “created with KiCard 8”. So indeed this needs to be done - can someone please help here? There are a good 18 FP files that need to be included here.

and as a note - in FP Editor all the (custom) files appear there.

@ngc2359: I started this thread above, but that was some time ago so I’m trying to remember what I did to get around what at first appeared to be a very serious bug/problem. I remember clearly that it only appeared that there was a serious problem; in fact, I did not have to convert any of my custom footprints when moving from KiCad 8 to KiCad 9. As I recall, I needed to use “Manage Footprint Libraries”, a menu pulldown item on the KiCad page that shows the Project(s) and files within. There is also a “Manage Footprint Libraries” menu pulldown item inside the Footprint Editor program, and I can’t recall if those do the same thing or if I had to set the path to my custom footprints directory in both or only one of those places. Though I can’t remember that detail, I remember that editing those paths was part of my problem and led to a solution. If your KiCad was installed on your computer like mine was … using default installation locations … then the paths can be somewhat confusing because embedded in the path text will be either “…/8.0/…” or “…/9.0/…”. It’s way too easy to glance at that text too quickly and not realize that a new 9.0 project is still referencing an 8.0 path. Also, there was a second issue. After a while of fiddling with things, all of my PCB footprints and other things disappeared from view (in the PCB layout tool). That happened because KiCad 9.0 set all “visibility” options to OFF on the Appearances tab inside the PCB editor. That totally freaked me out until another KiCad user pointed out that issue. All that I had to do was click on each “Appearance” item and turn ON the visibility of all the items that I wanted to see. After getting past those initial glitches, KiCad 9.0 has performed flawlessly for me.

I finally managed to get it resolved. What was confusing was what seemed to be a statement that you had to “upgrade” the KC8 FP files to be compatible with 9! Indeed as you mention - there’s no difference. I have a project folder and within it is a folder called Footprints and under that another for the project with the individual files in it. THAT is the link I added. But KC8 isn’t getting the files directly from there - it creates it’s own folder under DOCUMENTS/KiCad/8! My folder was ALSO there. So all I did was copy that and paste that to /9 and all worked. This was indeed really simple but there’s all kinds of explanations on here that really don’t appear to be necessary (the fp_lib_?? file for example gets mentioned a lot). Now the only thing remaining is for some reason 4 of the FP’s, the KiCad built in FP library FP’s that were used, don’t match! So now I have to figure out why they changed. Again: frustrating. If they were going to change for any reason than keep the old one and create a new one with a (slightly) different name!

Glad to hear that you overcame the problem. The discussion thread that I started veered off into editing of text files, etc., but that was part of trying to figure out the problem (which actually wasn’t a serious problem). I found someplace in KiCad’s documentation which described the need to upgrade footprints but was apparently an obsolete statement. BTW, I noticed also that many footprints in KiCad’s built-in libraries of footprints changed ever so slightly going from v8.0 to v9.0, but of course that triggers the PCB Editor to warn you that your “previously all good” footprints now don’t match the ones in the KiCad library. I just clicked “Update Footprint”, repeatedly. The changes that I noticed were tiny changes, in most cases that I encountered. I suspect (I certainly don’t know) that those footprints were revised to improve consistency … I guess.