I stared a schematic, then layout. After the schematic growing I split it into hierarchical sheets.
Then updated PCB from a schematic and now lots of components (those from sub sheets) are duplicated. The components from the main (top) sheet are OK - showing up only once.
I started to give a mostly standard answer, as this is often the result of a standard mistake, but this is different, because I see ratsnest lines between the “old” and the “new” set of footprints. This means that both sets are part of the netlist. Connections seem to be one - to - one. The most logical explanation is that you may have accidentally pasted your symbols twice in the hierarchical sheet.
To try to fix this, first make a backup, so it can’t get any worse, and after that:
Open both the schematic and the PCB editors next to each other. (Dual monitor or big screen is nice)
Click on the footprint you do not want in the PCB editor to select it.
The same symbol should now be selected and highlighted in the schematic (this is called cross probing).
Click on the title bar in the schematic editor, this should give focus to the schematic editor, but without undoing the highlight.
Now press the [Del] key to delete the highlighted symbol in the schematic.
Go back to the PCB editor, and select the other corresponding symbol again.
Cross probing should make that other one visible on the schematic.
So there is no “automatic” method I know of, because the problem itself is unusual. I am also mostly guessing what happened. It could be something else too, but I can’t see that from a screenshot. It’s much easier to diagnose a problem if you upload the actual project. (The backup directory and the fp-info-cache files are not needed (In KiCad V7)).
Luckily the schematic is not that complex yet as it’s a very early Work-In-Progress stage, so I’m glad in happened now, not later.
I think v7 has a automatic annotation enabled, which (when I realized it’s on) I found quite useful.
The issue with the duplicated footprints happened first (with automatic annotation being active), then when noticed that the same footprints have a different annotation, then I manually changed it to whatever was annotated first. That didn’t help.
Double probing wasn’t very clear in this case.
Selecting a footprint (the original one or duplicated) highlights the same symbol in the Schematic Editor.
And the other way - selecting a symbol in the schematic editor highlights both footprints in the PCB editor. A bit crazy
The solution was to just delete the duplicated footprints (they were still out of the board edge so easy to select them all) and update PCB from a schematic again. Seems like that solved the issue as only new footprints appeared in the PCB editor. No duplicates anymore!
Not sure if it was an issue with my project / settings or a temporary KiCAD hiccup or perhaps a bug.
Will probably move other symbols to subsheets and see how it behaves.
I panicked a bit last night, but seems like all is under control again!
Many thanks to you all for your suggestions and help!
The “Update pcb from schematic” shows a checkbox “delete footprints with no symbols”. Setting this checkbox should prevent you from duplicated footprints.
Sure, but the weird thing in this particular case is that there were ratsnest lines between the two sets of footprints. Usually only one of the sets has links to the netlist.
Usually only one of the sets has links to the netlist.
If the “new” footprint set has the same RefDes as the “old” than both are connected with the ratsnest. This happens if the “paste special with retaining the original RefDes” is used in the schematic. Then both footprints have the same RefDes, the netnames and pad-names are calculated by the Refdes and so both footprint-sets end up with padnames/netnames like “Net-(R10-Pad1)” and then these are connected.
It’s a little bit different if the nets are labeled - than the two footprint groups are not connected together. (because the nets have a unique name which incorporates the subsheet-name)
Didn’t use “paste special with retaining the original RefDes”.
Usual Copy in the mian sheet and Paste in the sub-sheet.
I can’t exactly remember, but I think I pasted a selected part of the schematic in the sub-sheet first, then deleted that part from the main sheet. I guess that could caused the issue.