Moving libraries

Probably not an accurate topic title. For several years now, I have designed a number of boards and been able to update from the schematic without problems. This time I wanted to keep the original as well as using it as the basis of a significant upgrade. So I created a new project, and moved copies of the original directory into it. So far, ok. Created new symbols and made revisions to the schematics. Moved to Pcbnew to create footprints. Saved the first one to my project specific library and discovered that, while my library made it to the new directory, its contents did not. Easy enough to fix after I finished the new footprints. Combining my two libraries with the same name was easy. But something is wrong. When I attempt to upgrade from schematic, it wants to replace all the components with new ones. To add to the confusion, it can’t find two footprints. I found them in a rescue lib. How do I get it to look there? Just what are rescue libraries?

TIA bdh

Bruce: I do not have the answers but it might be important for you to post your KiCad version info? I have also wondered about older designs disintegrating if I attempt to re-organize/rename some of my libraries. I use a recent 5.99 build, and I am not in the habit of using project specific libraries.

Footprints are included in the PCB file so there is no need to worry regarding reorganization of libraries (the old project will not be affected)


Symbols from version 6 onward will get the same treatment. However all versions of kicad up until version 5 sadly do not include symbols in the schematic files. The only safety measure in place is the so called rescue mechanism which relies on the so called cache library to be valid.

3d models are another thing that is not stored as part of the project. So if you want to preserve them then you need to take care of them as well.


If you now decide that you want to have all library assets archived in the old project then you can use the archive project plugin.

Version control tools like git are of course another option.


Further reading:

Is there a way to tell what version was used for a given design? Each time a new version is released, I download and install it. The result is that even 3 year old projects show up as V5.19 currently.

Bruce

Interesting. I have never had to take any action to rescue any symbols or footprints. KiCad seems to do this on its own. In the current project, after creating the new directory I did have many question marks in my schematic, and I’m not sure what I did to correct that, but all seems well. I can select any footprint on the board and its symbol on the schematic lights up, so the links are working.

On all but one of the changes I made in the schematic, new footprints were involved, and they were in my project specific library, so it found them as expected. On the other change, I replaced a part with another instance of the same part, and it can’t find it. (Note that updating the pcb from the schematic wants to replace all the footprints on the board, so it can’t find that one either even though there is already one instance of the part on the board.) Somehow update does not recognize any of the footprints on the board as actually existing and thinks it has to replace them all. I figure it has to be operator error; some dumb mistake I made along the way, but I can’t find it.

The part in question was one of those exasperating examples where the manufacturer doesn’t give you the footprint data but refers you to Ultra Librarian. I found the original in its own directory, and I also found it in the rescue library from the original project. But I seem unable to get the update process to find it.

In short, 2 problems: 1. Update needs to find that part. 2. Update should not replace parts already existing on the board.

Thanks

Bruce

What do you mean by “part” here? If it means a symbol in the schematic, you shouldn’t replace existing symbol by deleting and re-adding. If you do, connection between the schematic symbol and layout footprint is lost. You can recover if you have matching reference designators in the schematic and layout. Use the non-default matching option in the Update PCB from Schematic dialog, see Update PCB from Schematic's match methods. The first post there is for v5.1; you can read the second post if you want to understand how this situation happened, but it uses v5.99 for details.

Ahhh, poor wording on my part, sorry. I used a symbol, call it A, and mapped it to its footprint. I used a different component (symbol), B, in another part of the schematic, which I later decided to replace with another instance of A.

But I don’t think that is the root of my problem. Why does it want to replace every footprint on the board?

Maybe I need to return to the original and start over. Somewhere I apparently screwed up. At one point I even managed to crash KiCad for the first time ever in 3 years.

bdh

Because the connections between the schematic and the layout have got somehow broken. The same advice applies. Update the PCB using reference designators.

It would be of course interesting to know how it was broken, but if you have reference designators, you don’t have to start over.

Here’s my results:

Update, keeping existing symbol to footprint associations: All footprints are replaced, in a grouping outside the board edge.

Re-associate by reference: Only those with new symbols and associated footprints with new reference designators are added, in a grouping outside the board edge.

Option to update footprints selected: Several components were changed - new symbols were created, with new footprints added to the cross reference file, but the reference designators stayed the same. So it updated the existing footprints on the board even though the footprints are completely different. Didn’t try to hook them up; just placed them in the approximate locations. If you didn’t select this option, the new parts were apparently ignored. I guess this is workable, but I would rather see all the new components outside the board edge they way it has worked with other boards I have done with KiCad.

Delete extra footprints works as advertised.

Thanks for your help. All is well now.

Bruce