Footprint syntax

Hello, sorry if this question has already been asked but I couldn’t find anything both in KiCad nor in the forum.
I’m in the process of restructuring my footprint library in KiCad 6 and I noticed this difference in footprint syntax:

(footprint "_HF-A21-SMT" (version 20211014) (generator pcbnew)
  (layer "F.Cu")
  (tedit 5AFD7878)
  (attr through_hole)
  (fp_text reference "REF**" (at 0 18.5) (layer "F.SilkS")
    (effects (font (size 1 1) (thickness 0.15)))
    (tstamp f2b2c93b-5573-4218-8f4c-8f1e122bbbb5)
  )
  (fp_text value "VAL**" (at -0.5 15.25) (layer "F.Fab")
    (effects (font (size 1 1) (thickness 0.15)))
    (tstamp 802ad5f5-0f31-4011-a38a-3b42da252023)
  )
(module XDL-MICRO (layer F.Cu) (tedit 61EE4FBC)
  (fp_text reference REF** (at 0 31.115) (layer F.SilkS)
    (effects (font (size 1.2 1.2) (thickness 0.16)))
  )
  (fp_text value XDL-MICRO (at 0 67.945) (layer F.SilkS) hide
    (effects (font (size 1.2 1.2) (thickness 0.16)))
  )

From what I understand, the first one is the S-Expression format which will be used from now on, and I believe the second one is an old footprint, maybe created with KiCad 4, I don’t really know.
I thought the migration to the new format would be done automatically by opening the footprints in KiCad 6, but I was wrong I guess.
Is there a way to convert all the old format footprints in the new format (like the “Migrate libraries” for symbols)? Maybe even a plugin or whatever.

Thanks in advance.

When you save them, they should be written out automatically as the new format. There’s no way that I’m aware of to do this for all your libraries, though.

1 Like

Edit:
Oops, my bad, I should learn to read before type…


Is this what you mean:

The screenshot is from: Schematic Editor / Preferences / Manage symbol Libraries

Ok this is a nice workaround. Not really super quick, but not too long either. Thanks!

Yes, like this but for footprints.

As far as I understood it, the symbol format changed completely, which is why there are migrations.

The footprint format changed very slightly in comparison (both versions use S-Expressions), so you can possibly continue to use the old format if you want. Saving them turns them into the new format automatically of course.

1 Like

Indeed. Pre- V6 the schematic (and symbol libraries) was not based on S-expressions at all, while the PCB (and probably footprint libraries) was.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.