Can you let pcbnew not create project files?

I found me another minor inconvenience.

So I have this ‘general_schematics’ schematic with sheets for default things like an atmega328 with crystal, voltage regulator, usb interface etc.

For several of the sheets I made a separate PCB. I did this by assigning footprints to items of one sheet only. Create the board and copy the board file elsewhere and start again with the next. And now I got me a panel with 5 of these designs.

The inconvenience: every time I open one such a board standalone in pcbnew. I get me these project files. I get a kicad_prl, that huge cache file and ofcourse the kicad_pro file.

I may or may not have added one of them to my git repo :sweat_smile: have to check for that.

If you use pcbnew in standlone mode like I did. Can you perhaps prevent it from creating those files? I suppose not, but as asking does not hurt…

Kind regards,

Bas

No. But you don’t need to git save the fp-info-cache file. And you can exclude the .pro and .prl files from git if you want.

It’s also one of my little nuisances with KiCad.
There is still an open issue for this, which also links to some related issues.

I also just did a few simple checks, and this behavior seems to be improved in KiCad V7.(Which is now released just a few days ago).

Just opening a file completely unrelated to KiCad accidentally with KiCad’s project manager, used to generate project files, but this does not happen anymore.

I also copied a KiCad PCB file to an empty directory, then opened it with pcbnew from the command line and closed it again. This also does not produce project (and other) files anymore.

In the third test I opened that PCB file again and then saved it. In that case KiCad V7.0.0 does generate some extra files:

## second test:
paul@cezanne:~/asdf$ pcbnew dmm_voltage.kicad_pcb 
paul@cezanne:~/asdf$ ls -hl
total 240K
-rw-r--r-- 1 paul paul 239K Jun  6  2018 dmm_voltage.kicad_pcb

## Third test (with saving):
paul@cezanne:~/asdf$ pcbnew dmm_voltage.kicad_pcb 
paul@cezanne:~/asdf$ ls -hl
total 428K
-rw------- 1 paul paul 402K Feb 16 11:00 dmm_voltage.kicad_pcb
-rw-rw-r-- 1 paul paul 1,2K Feb 16 11:00 dmm_voltage.kicad_prl
-rw-rw-r-- 1 paul paul  15K Feb 16 11:00 dmm_voltage.kicad_pro
-rw------- 1 paul paul    2 Feb 16 11:00 fp-info-cache

KiCad also still generates the fp-info-cache file. In this case it’s a very small 2 bytes file, but sometimes it suddenly grows to a 3MB file (At least in KiCad V6.x). As far as I know it’s safe to either ignore or even delete this file.

1 Like

I know but I am one of those git add * types :see_no_evil:

What is the fp-info-cache file for anyways?

You know that you can put the filename (actually a regex to match against) you want to exclude in .gitignore or .git/info/exclude and git add * will ignore it? In software development it’s usual to write regexes to match ephemeral files that are not to be saved.

fp-info-cache is a cache of footprints, presumably to speed up operations. Exactly how it works I never looked into.

1 Like

You know that you can put the filename (actually a regex to match against) you want to exclude in .gitignore or .git/info/exclude and git add * will ignore it?

Tnx, I did not know that it would prevent git add * from adding excluded files. I thought it was just to let git shut up about untracked files when you type git status.

I am updating my initGit.py script as we speak! or type in this case.

Regards,

Bas

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