Footprint name property is wrong

Dear experts

Could you please explain me why “Footprint” property line is not updated when I change footprint for certain element on PCB. In screen-shot below I changed footprint from 0805 to 1206 and I do see at the bottom of the window Library link: line mentioning new footprint, while Footprint line still contains old footprint name

I do not have the answers…but to get them most expediently, please go to help>about and copy paste your KiCad version.

Application: KiCad x86_64 on x86_64

Version: 8.0.1, release build

Libraries:
wxWidgets 3.2.4
FreeType 2.13.2
HarfBuzz 8.1.1
FontConfig 2.15.0
libcurl/8.6.0-DEV OpenSSL/3.1.5 zlib/1.3.1 libidn2/2.3.4 libpsl/0.21.2 nghttp2/1.58.0

Platform: Freedesktop SDK 23.08 (Flatpak runtime), 64 bit, Little endian, wxGTK, X11, plasma, x11

Build Info:
Date: Mar 14 2024 14:27:53
wxWidgets: 3.2.4 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.84.0
OCC: 7.7.2
Curl: 8.5.0-DEV
ngspice: 42
Compiler: GCC 13.2.0 with C++ ABI 1018

Build settings:

I don’t feel being expert in this subject, specially that I have never selected any footprint for any symbol at schematic (I use only default footprints assigned to symbols in library).
My hypothesis: Footprint field is really “Default footprint” but field name was shortened.
If so (what I don’t know if it is true) then changing footprint assigned don’t change default footprint.

Well, I would say that it’s footprint from schematics, not just default footprint - this filed is changing if new footprint is assigned to element in schematics and then imported to PCB. But if footprint is changed in PCB - everything is updated - main title, dimensions, 3D model, … but not Footprint property (see below)

	(footprint "Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder"
		(layer "F.Cu")
		(uuid "2a137315-3889-4575-939c-99971ca2b09d")
		(at 72.1461 133.5786 180)
		(descr "Resistor SMD 1206 (3216 Metric), square (rectangular) end terminal, IPC_7351 nominal with elongated pad for handsoldering. (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator")
		(tags "resistor handsolder")
		(property "Reference" "R36"
			(at 0 -1.82 180)
			(layer "F.SilkS")
			(uuid "23482ade-fe9f-4212-a319-c8d66a2facf5")
			(effects
				(font
					(size 1 1)
					(thickness 0.15)
				)
			)
		)
		(property "Value" "240"
			(at 0 1.82 180)
			(layer "F.Fab")
			(uuid "1100a476-1cca-49cf-beb6-1b6e8d2b69e1")
			(effects
				(font
					(size 1 1)
					(thickness 0.15)
				)
			)
		)
		(property "Footprint" "Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder"
			(at 0 0 180)
			(unlocked yes)
			(layer "F.Fab")
			(hide yes)
			(uuid "dcfb714e-c188-487d-a970-a94bd273a9fe")
			(effects
				(font
					(size 1.27 1.27)
				)
			)
		)
		(property "Datasheet" ""
			(at 0 0 180)
			(unlocked yes)
			(layer "F.Fab")
			(hide yes)
			(uuid "a4234791-7e75-49d0-ab52-5fa23e0afe46")
			(effects
				(font
					(size 1.27 1.27)
				)
			)
		)
		(property "Description" "R0805"
			(at 0 0 180)
			(unlocked yes)
			(layer "F.Fab")
			(hide yes)
			(uuid "edf80368-e891-4770-baeb-4d2a73a6062c")
			(effects
				(font
					(size 1.27 1.27)
				)
			)
		)
		(property "ALTIUM_VALUE" "240"
			(at 0 0 180)
			(unlocked yes)
			(layer "F.Fab")
			(hide yes)
			(uuid "08833f1a-85f9-4d03-a9f1-1ec56521f4a2")
			(effects
				(font
					(size 1 1)
					(thickness 0.15)
				)
			)
		)
		(path "/20ab33d0-347c-4a7d-a97a-abe1b0f58922")
		(attr smd)
		(fp_line
			(start -0.727064 0.91)
			(end 0.727064 0.91)
			(stroke
				(width 0.12)
				(type solid)
			)
			(layer "F.SilkS")
			(uuid "23bf80cb-16fc-4946-a8b9-c14016fb0c62")
		)
		(fp_line
			(start -0.727064 -0.91)
			(end 0.727064 -0.91)
			(stroke
				(width 0.12)
				(type solid)
			)
			(layer "F.SilkS")
			(uuid "501f4517-2a0f-47ed-8f2c-1b09fa81a9e4")
		)
		(fp_line
			(start 2.45 1.12)
			(end -2.45 1.12)
			(stroke
				(width 0.05)
				(type solid)
			)
			(layer "F.CrtYd")
			(uuid "ebde1efa-987a-450a-9cab-bceda7372e0d")
		)
		(fp_line
			(start 2.45 -1.12)
			(end 2.45 1.12)
			(stroke
				(width 0.05)
				(type solid)
			)
			(layer "F.CrtYd")
			(uuid "da0dbfd1-dedd-4dc4-aa03-0f73261591bf")
		)
		(fp_line
			(start -2.45 1.12)
			(end -2.45 -1.12)
			(stroke
				(width 0.05)
				(type solid)
			)
			(layer "F.CrtYd")
			(uuid "9b7f4975-21dc-4fcf-ad15-602065692ba8")
		)
		(fp_line
			(start -2.45 -1.12)
			(end 2.45 -1.12)
			(stroke
				(width 0.05)
				(type solid)
			)
			(layer "F.CrtYd")
			(uuid "2e2c878e-4c3c-4f6c-9259-b4a52dafd0f0")
		)
		(fp_line
			(start 1.6 0.8)
			(end -1.6 0.8)
			(stroke
				(width 0.1)
				(type solid)
			)
			(layer "F.Fab")
			(uuid "b255af20-336f-4e23-88ca-5969861bb1fd")
		)
		(fp_line
			(start 1.6 -0.8)
			(end 1.6 0.8)
			(stroke
				(width 0.1)
				(type solid)
			)
			(layer "F.Fab")
			(uuid "e8908cb4-15ef-43d0-8fea-9e2e75ca29d7")
		)
		(fp_line
			(start -1.6 0.8)
			(end -1.6 -0.8)
			(stroke
				(width 0.1)
				(type solid)
			)
			(layer "F.Fab")
			(uuid "2ac9f248-ee30-408a-9e74-611ee3d72219")
		)
		(fp_line
			(start -1.6 -0.8)
			(end 1.6 -0.8)
			(stroke
				(width 0.1)
				(type solid)
			)
			(layer "F.Fab")
			(uuid "db618778-1f37-4435-ab9b-dc9687309427")
		)
		(fp_text user "${REFERENCE}"
			(at 0 0 180)
			(layer "F.Fab")
			(uuid "184953f7-311b-45c7-a2d2-7ab7aaf0a4b7")
			(effects
				(font
					(size 0.8 0.8)
					(thickness 0.12)
				)
			)
		)
		(pad "1" smd roundrect
			(at -1.55 0 180)
			(size 1.3 1.75)
			(layers "F.Cu" "F.Paste" "F.Mask")
			(roundrect_rratio 0.192308)
			(net 72 "/AFORW")
			(pinfunction "1")
			(pintype "passive")
			(uuid "4a90fa7b-7e8f-4ca2-99dc-c2ddf67c709f")
		)
		(pad "2" smd roundrect
			(at 1.55 0 180)
			(size 1.3 1.75)
			(layers "F.Cu" "F.Paste" "F.Mask")
			(roundrect_rratio 0.192308)
			(net 24 "Net-(DA5-C)")
			(pinfunction "1")
			(pintype "passive")
			(uuid "6ab81a17-c7f0-48dd-84dd-3ef7fa0a785c")
		)
		(model "${KICAD8_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_1206_3216Metric.wrl"
			(offset
				(xyz 0 0 0)
			)
			(scale
				(xyz 1 1 1)
			)
			(rotate
				(xyz 0 0 0)
			)
		)
	)

Wow. In most cases I change footprints. I use only one symbol for non polarized capacitors and one for polarized capacitors, so I always want to specify the package at the schematic level. Resistors are similar but 80% of my resistors will be 0805 footprint (which I use for 0603 chips.)

1 Like

I rarely change footprints inside of PCB. Well, not rarely, never. I always change the assignment in Schematic and push the change to PCB.

Looking at this now, the Footprint field in the Footprint Properties appears to be just a text label.

First observation

KiCad default symbols and footprints assigned in Schematic leave the field blank in PCB. For example, here is a resistor.

If I change its footprint (Using Change Footprint) to a 1206 Package, the Footprint Field will stay blank. However, the library link field in the status bar reflects the new footprint.

Second observation

If I use the Add Footprint (A) tool in PCB, then the Footprint Field is filled in with the footprint I selected.

Now, if I use Change Footprint... the field stays the same, but the Library Link updates.

So, I do not have an explanation of how the Footprint field gets used in PCB. But I believe the behavior you are seeing is normal. Again, I don’t mess with footprints inside of PCB. I let the Schematic be the statement-of-record.

1 Like

The reason how I do that is something what happened to us something about 25+ years ago. We ordered a serie of 50 or 100 PCBs with wrong footprint for one capacitor. The decision was that to avoid in future such mistake footprints should be permanently assigned to capacitors in library.
I made my KiCad libraries according to this rule.
In V5 I had one symbol for all 0603 capacitors. Each used by us capacitor value was separate alias in this one symbol. KiCad V6 opening and saving my library changed it into lot of symbols derived from one.
As we frequently order a production serie without first making prototype it makes sense to avoid mistakes. My rule is: after placing a symbol at schematic you don’t change anything in it. That rule is to protect myself against my own mistakes. I will never change 1uF into 10uF and forget to select bigger footprint.

Thanks, Piotr

That makes sense. I have designed & built a couple of boards for consulting, and a couple for myself. Quantities were always just 5 from JLCPCB so nothing was ever critical in the way that you describe.

I am trying to get my contract employer to start with KiCad. But even for them, it will be for 2-5 build quantity for lab test. We will not have the sort of issues that you describe.

Well such strange behaviour creates inconsistent PCB files: in the same file two lines contain different info:

   (footprint "Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder"
              (property "Footprint" "Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder"

I would say it’s a bug

1 Like

I don’t think so. The property comes from the schematic. If you change the footprint on the board only, it’s not in sync with the schematic. That’s reflected in the information. If this bothers you, maybe the bug is in the design? If you want to keep them out of sync you must know what you are doing.

2 Likes

There is a bug.

I open the Footprint Editor and Change Footprint.

I now get this window:

I changed the footprint according to the Ref, from 0.3 to 0.4 then click Change and Close.

The footprint on the PCB has changed, but the Properties still show 0.3. If you click on the Edit Footprint again, you will see that the current footprint and the new footprint now both show 0.4 in this Change Footprint window.
Furthermore, if you Update Schematic from PCB, the new footprint (the 0.4) is placed in the schematic editor, even though, as I said, the Footprint Properties shows 0.3.

Finally, if you Update the PCB from the Schematic, the value in the Footprint Properties finally changes to 0.4.

Try out this exercise.

1 Like

I’ll try out 8.99 then report the bug.

The problem exists in both 8.0.1 and 8.99

Reported here: https://gitlab.com/kicad/code/kicad/-/issues/17598

I’m still not sure. When I read the report I got the impression that the Property reflects what’s in the schematic all the time as much as it should, according to how the Update processes between PCB and schematic work. The Property isn’t tied to the footprint itself but to the Symbol’s property.

  1. Schematic and PCB are in sync.
  2. Change a footprint on the board only, A → B. Result: Symbol’s Property is still A, fp on the board (the actual library link) is B and the Property still reflects the symbol’s Property.
  3. Use Change Footprint dialog again – it uses the actual library links, not the Property, therefore there are two B’s there.
  4. Update Schematic from PCB. The symbol’s Footprint property is now changed to B to reflect the actual library link on the board. The schematic symbol’s Property and the actual footprint’s library link are in sync. However, the footprint’s Property hasn’t been updated because the board hasn’t been updated.
  5. Update PCB from Schematic. → Properties of every footprint are updated, also this footprint’s Property which has the footprint library link from the schematic.

I don’t see a real bug there, but there’s still some problem. It’s not intuitive. We could expect that when the PCB and the schematic were in sync and one change was made to the PCB, then pushed back to the schematic, the PCB and the schematic would be fully in sync again. But they aren’t until the PCB has been updated from the schematic.

It works logically, but should the “Update Schematic from PCB” change the PCB, too, to reflect the schematic which was changed in that action?

I added a fix for this, if you could test the 8.99 nightlies in a day or so to see if they match your expectations, that would be great. Once the fix sits for a while in the master branch, it can be cherry-picked for an 8.0.x release.

1 Like

A different view on the subject?

I just created a new project with no Schematic. (My first time ever :slightly_smiling_face:)
I placed a resistor footprint on the board. I used the Change Footprint function in the Footprint Properties.

I now have a different footprint on my PCB with the wrong Properties. If I had deleted the original footprint and added a different footprint, I would now have the correct properties on my footprint.
Remember, there is no schematic.

Is this the correct behavior for the program?

I would have thought that if you change a footprint you have done just that, you have removed (deleted) the old footprint in favour of the new one and if you had a schematic that would not change until you used the update schematic option. If you have no schematic then thats the footprint thats there and the rest of the properties should reflect that.
:mouse:

Yep!

Exactly my thoughts.

By using the Delete and Add functions, you get the new correct footprint with the new, correct documentation.
By using the Change Footprint function, you get the new correct footprint with the old, incorrect documentation.

Expectations met and problem solved on 8.99 :grinning:
Cherry pick at your leisure.

Really cool to see 3 hours between bug report and fix submitted. :+1: :+1: :+1:

Thanks for your time and effort.

Tested on:

Application: KiCad x86_64 on x86_64

Version: 8.99.0-unknown-42552d2e78~177~ubuntu22.04.1, release build

Libraries:
	wxWidgets 3.2.1
	FreeType 2.11.1
	HarfBuzz 2.7.4
	FontConfig 2.13.1
	libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.17

Platform: Linux Mint 21.3, 64 bit, Little endian, wxGTK, X11, cinnamon, x11

Build Info:
	Date: Mar 29 2024 18:05:46
	wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.6.3
	Curl: 7.81.0
	ngspice: 42
	Compiler: GCC 11.4.0 with C++ ABI 1016

Build settings:

The correct methodology should be to change the foot print in the schematic. The schematic should be thought of as the source of truth for this (Footprint) information.

If you do not update the Schematic, then when you update the PCB later due to another change you may clobber change made in the PCB editor if you have a certan feature selected in this dialog.
image

Bottom line MANAGE footprints in the schematic. Use the build editor to change many at once.