Tuesday, July 7, 2020

Install KiCad 5.1 on xubuntu (no-brainer since the packages are somehow broken)

Big mess. The easiest is to get rid of everything and not rely entirely on the Debian packages. I had to gather some info around and I ended up with the following.

Beware, all existing kicad executable and configuration will be wiped out, as I think that 5.1 does not play well with former versions. Especially, libraries and footprints do not show up after installation. This also makes it annoying to import a former KiCad project in 5.1. I had none so I "simply" started from blank projects, as KiCad is much easier to design new packages and footprint than Eagle CAD I was using so far.

Microreview: dual outlet aquarium air pump

It took me a while to notice the little magic button on the back! Switching it got me twice the throughput ... and twice the noise, but it is still OK. I checked it by myself and emptied a 1.5L bottle in about 50 seconds with one outlet.

This is the pump I used to cool the deposited materiels in my old, other blog post http://www.tridimake.com/2016/05/3d-printing-cooling-with-air-pump-aquarium.html

Soldering consumables

Soldering consumables

This cheap "No Clean Flux Dispensing Pen" pen is a bargain. I used one I chose randomly for years, and largely beyond its recommended date. So I was glad to see it still on the market: "951" DJP CW8100 (about ~5€ delivered from banggood).

I also bought this tip "rejuvenator" (about ~7€ delivered from banggood). It works surprisingly well to remove oxidization that could not be "wiped out" with metal sponges. No fumes, no odor, it kinds of "boils dry" instantly when the tip is dipped in it.
The container states it is some common soldering paste but I am glad it is not, as I already have all kinds of solder paste.

Friday, April 17, 2020

LinuxCNC on an old Dell D430 with a dock


sudo apt-get install git-core
sudo apt-get install libpci-dev
git clone git://git.kiszka.org/smictrl.git && cd smictrl
git clone git://github.com/zultron/smictrl-deb.git debian
fakeroot dpkg-buildpackage -uc -us
sudo dpkg -i ../smictrl_*.deb
sudo sed -i '/exit 0/ismictrl -s 0' /etc/rc.local
sudo reboot

Adding bCNC to the laptop:
git clone https://github.com/vlachoudis/bCNC.git

Profile c++ code

To profile an executable and get a nice visual of it (you need the expected flags when compiled of course):

First you need to compile with argument ''-pg'', so that gcc inserts its code all everywhere to time your function calls.

Once you run the project, it will generate a big file named ''gmon.out''. This is mostly unreadable per se. And ''gprof'' hardly makes it more readable.

Here comes ''gprof2dot.py'' and ''dot'', which generate very readable graphs:
gprof exe/router.exe | gprof2dot.py -s | dot -Tpng -o profiler.png && gwenview profiler.png

Note that ''gprof'' must be given the executable name. It will not run it in anyway, but it needs the symbol table to give you proper names.

How to submit a patch to the linux kernel

How to submit a patch to the linux kernel

On Ubuntu/Debian you probably need ''sudo apt-get install git-email'' first, unless you want to do it entirely manually (uuh).

git log
git format-patch HEAD~
scripts/checkpatch.pl 0001-scripts-config-allow-colons-in-option-strings-for-se.patch
git send-email 0001-scripts-config-allow-colons-in-option-strings-for-se.patch

You could use ''git format-patch --cover-letter HEAD~'' to generate a blank "introductory" email in order to describe your post further than with the sole summary of the patch itself.

Here is a ''~/.gitconfig'' example for git to send emails:
  ; setup for using git send-email; prompts for password
  smtpuser = jf@gmail.com
  smtpserver = smtp.googlemail.com
  smtpencryption = tls
  smtpserverport = 587

Note: you might have to create a specific Google "application password" for the provided pseudo "login" prompt that ''git'' will print.

The tool ''./scripts/get_maintainer.pl'' in linux will help you identify the recipients. It does this very nicely, instead of having to guess from the ''MAINTAINERS'' file.

Finally, to submit the real thing to the linux list https://lkml.org/:
git send-email --cc-cmd='./scripts/get_maintainer.pl --norolestats 0001-scripts-config-allow-colons-in-option-strings-for-se.patch' 0001-scripts-config-allow-colons-in-option-strings-for-se.patch

It will end up, e.g. as https://lkml.org/lkml/2020/4/10/383