I’ve read other posts from years ago about this issue. I’m using KiCad 8.04 btw.
Hit F8 (Tools, update pcb from schematic) - dialog appears.
Dialog shows this message for all part in my custom library: "Change C1 footprint from ‘CUSTOM-LIB-NAME:GRM18x’ to ‘GRM18x’.
I don’t have the issue when placing parts from the “built-in” libraries - for example I placed one part from the included library (ICE5LP1K-SG48), moved the refdes (e.g. U1), then updated pcb from schematic for the second time and U1 refdes stays in place.
Does anyone have any suggestions? All of my parts are from my custom library.
First, please add the extra dot. KiCad V8.04 does not exist.
Next, the DRC message is more explanative then the title of this thread. It completely exchanges one footprint for another. It does not just reset RefDes position. During Update PCB from Schematic [F8] you probably have Delete footprints with no symbols checked. If you uncheck this, may get two footprints with the same RefDes.
What is the status of the Re-link footprints to schematic symbols based on their reference designators checkbox? This option should normally be off. It should only be used for some special cases.
So you have some mismatch between footprints with and without library names.
As a little test I assigned a 12 pad header to an 8 pin schematic symbol (just to be sure I can see a difference), and I omitted the library name in the symbol properties.
It does seem to work, and not even ERC complains about this.
Running DRC with the Test for parity between PCB and schematic checkbox on does find the missing library name:
As a result, you are now in a loop. Updating the PCB does copy the footprint, but also adds the library name to the footprint on the PCB. The next time you update the PCB, KiCad finds the mismatch, because the footprint link in the schematic does not have a library name, so updates the footprint on the PCB again (and adds the library name again to the footprint on the PCB.
You can fix it with: PCB Editor / Tools / Update Schematic from PCB (note this is the other way around from the normal workflow), and then update the footprint assignment in the schematic. Note the message window below. It adds the library name to the schematic symbol.
I am not sure whether this is expected behavior or a bug. I was under the impression that the library name in the footprint field was mandatory in newer KiCad versions. Old KiCad versions (maybe have to go back as far as KiCad V4) did not have library names in footprints at all for as far as I can remember.
Paul gives so much information that the essential thing may get lost:
This is the heart of the problem. We don’t know how you have arrived here, but your symbols have only the footprint name in the Footprint field, while KiCad expects library name:footprint name combination.
Fixing this should be simple. Replace the footprint names in each symbol’s Footprint field with the proper library:footprint combination. The easiest way to do it for one project is probably in the Schematic Editor → Tools → Edit Symbol Fields with these settings:
(Everything else unchecked.) There you can choose each footprint from the available libraries by clicking the “bookshelf” icon:
But notice that this updates only the schematic, not the symbol libraries. If you want your symbol libraries work well for other projects, you have to edit your symbols one by one and change the Footprint field in the Properties. Unfortunately there’s no way to batch edit libraries, so it has to be done one by one.
I changed every symbol in my custom library to add the link.
I’m new to kicad, but all I did was start a project and downloaded symbol/footprint from mousers website using the library loader program. Added these to my custom library as the kicad libraries are read only.
That was the reason for the problem, but it’s not a bug in that service or its files. KiCad requires a library name in the Footprint field, but a 3rd party provider can’t know to which library the user will put the footprint. Therefore they use only the footprint name.
This isn’t the first time we get a similar question, and I see a problem in how KiCad handles this situation. A novice user who don’t know this doesn’t know how to use KiCad libraries, and KiCad leads to this “loop” as Paul describes. IMO it’s some kind of usability bug in KiCad.
I am not so sure about this. In fact, I do not understand how this happened. When adding footprints to a symbol you have to take it out of a library. KiCad probably won’t be able to find your footprint at all if it is not in a library and the library itself is listed in the fp-lib-table.
I only managed to recreate it by deleting the library part of a footprint link in a schematic symbol. Maybe I overlooked something, but there are also creative ways to break things.
I think KiCad finds the footprint without library name if the fp name is unambiguous, i.e. it can be found once in all libraries, and KiCad accepts that.