EQU File goes berserk

Hey all,

Working on a large project with 2000+ components, but really only 60 different parts. Therefore, I thought a .equ file might be a good way of getting all footprints associated quickly. I setup up the .equ file that is attached (new users can’t attach files):

‘74AHC1G86SE-7’ ‘TO_SOT_Packages_SMD:SOT-353_SC-70-5’

After importing it an clicking the 'Automatically associate footprints button in CVPcb, all components up to the last appearance of ‘74AHC1G86SE-7’ are replaced with that footprint :confused: 1800 components!
Am I doing something wrong? Is this feature just currently bugged?

I also considered setting the footprints in the component properties in the library. However, these do not seem to ‘Push’ forward into EEschema.

I am at a loss of what to do! My last ditch attempt would be writing a small script that goes into the schematic and just manually sets all the footprints. However, I am not 100% sure on where this is stored! Also, if I do this is there anything I should be aware of to do?

Thank you for your help!

Ninja Edit:
Application: kicad
Version: 4.0.6 release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1010,GCC 6.3.0,wx containers,compatible with 2.8)
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Boost version: 1.60.0
Curl version: libcurl/7.52.1 OpenSSL/1.0.2k zlib/1.2.11 libssh2/1.8.0 nghttp2/1.19.0 librtmp/2.3
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=ON
USE_FP_LIB_TABLE=HARD_CODED_ON
BUILD_GITHUB_PLUGIN=ON

Check out KiField

PS: [quote=“pschilk, post:1, topic:6714”]
I am at a loss of what to do! My last ditch attempt would be writing a small script that goes into the schematic and just manually sets all the footprints. However, I am not 100% sure on where this is stored!
[/quote]

That’s how it looks like if the symbol (component in KiCAD speak) does carry the footprint information in field F2 (hidden text field at center of symbol in tiny text size):


$Comp
L T-2xPNP_BC857BS_SOT363 Q101
U 1 1 56FFEBD8
P 2275 9050
F 0 “Q101” H 2050 8825 50 0000 C CNN
F 1 “2xPNP_BC857BS” H 2025 9400 50 0000 C CNN
F 2 “SOTx:SOT-363” H 2275 9050 5 0001 C CNN
F 3 “E:\Datasheets\Electronics\Semiconductors\Transistors\NXP_PNP+PNP_SOT363_BC857BS.pdf” H 2275 9050 5 0001 C CNN
F 4 “BC857BS” H 2275 9050 5 0001 C CNN “Manf#”
F 5 “NXP” H 2275 9050 5 0001 C CNN “Manf”
1 2275 9050
1 0 0 -1
$EndComp

Position of component is the P field…

2 Likes

Well. I can confirm that handling of .equ files is totally broken. You should raise a bug report at https://bugs.launchpad.net/kicad

Thank you so much, that is absolutely fantastic!

A few quick questions:
How do I handle hiearchical sheets? My design is spread over 20 odd sheets. Will I have to kifield every single one? The website says: " even hierarchical designs". I tried running it on my root-sheet but I just got: “There are no field values to insert!”.
:slight_smile:

Edit: NVM: -recurse

So it’s working?

If you put < s > text to be striken out < /s > on that text your post would make more sense to me…

I just did some experiments with .equ files. It seems that there is a problem when there are “gaps” between matches.
Unless all components/symbols in the schematic map to a footprint in the .equ file there are problems.
If there is one or more “no matches” before a match, the “no matches” are assigned the same Footprint that is assigned for the next matched.
e.g.
Sym1 (will NOT match in .equ)
Sym2 (will NOT match in .equ)
Sym3 (will NOT match in .equ)
Sym4 (will match Footprint “x” in .equ)

After automatic footprint assignment:
Sym1 Footprint “x” assigned
Sym2 Footprint “x” assigned
Sym3 Footprint “x” assigned
Sym4:Footprint “x” assigned
Which obviously is not correct.

If The first Symbol maps to a footprint in the .equ file and the others don’t, the others are not assigned any Footprint, which is correct.
If all Symbols map to a footprint in the .equ file, they are all assigned correctly.

I’ll update the bug report.

4 Likes