Code

SDRAM problems with STM32F427/437/429/439

Posted on 2017-12-13

The FMC (flexible memory controller) of these microcontrollers is a bug ridden beast. The latest errata sheet lists a total of 15 “silicon limitations”. Two of them are connected to SDRAM and are particularily ugly, as they may result in corrupt reads. As of now (Dec 2017), both of them are not fixed in any revision, so you may want to continue reading if you use any of these types with SDRAM…

Read More ›

Code

systemd-logind deletes your message queues (RemoveIPC)

Posted on 2017-08-05

When something unexpected happens in a GNU/Linux system nowadays, it’s likely that systemd is involved somehow. If you want yet another spectacular example of how systemd and especially its author know what’s best for everyone, read on…

Read More ›

Code

SoundFX Macs Opera support for AdPlug

Posted on 2017-01-13

Many of you remember the FM-sounds that the OPL-chips on old soundcards like the AdLib or the Sound Blaster make. One cold day last December, I remembered that when I was around 12 years old, I bought tracker-software for creating AdLib-tunes. More important things had to wait, I had an “open invoice” with that specific piece of software…

Read More ›

Code

CMake: EXCLUDE_FROM_ALL vs. EXCLUDE_FROM_DEFAULT_BUILD

Posted on 2016-11-02

add_library(target EXCLUDE_FROM_ALL ...) is really convenient with Make-generators if you want to define libraries that should only be built if another target depends on them. This currently doesn’t work (well) for Visual Studio generators, but here’s a trick how to get this behaviour in Visual Studio as well…

Read More ›

Code

Debugging IAR ELFs with GDB on the STM32F4xx

Posted on 2016-09-14

There are situations where you may not want to use IAR’s C-SPY for debugging but rather would go with GDB.

So you tell yourself “an ELF is an ELF”, start up J-Link GDB server, attach GDB to it, load the ELF, continue and… nothing.

There are several things that can go wrong, read on to find out which…

Read More ›

Code

Speeding up DHCP on bad WiFi links

Posted on 2016-06-05

In my current project I noticed that on bad WiFi links initial DHCP negotiations may take a really long time.

The reason is simple: In the initial steps, DHCP uses UDP broadcast packages that may get lost.

To find out more and learn how to speed things up, read on …

Read More ›

Code

Using byacc+Ragel for memory efficient parsers

Posted on 2014-07-01

Parser and lexer generators are great tools and there is little reason to knit parsers or lexers (aka tokenizers) yourself.

If your (embedded) target is short on memory, the used tools have to be picked carefully, as not many of them are designed with memory-efficiency in mind.

I’ve found byacc and Ragel to be a great combination with both of them generating extremely tight code.

Want to know more about them and other tools? Read on!

Read More ›

Code

CMakeDebHelper: Using debhelper with CMake/CPack

Posted on 2013-11-30

CMake/CPack is great for quickly packaging your stuff for Debian.

However for instance, you may have programmed a daemon and want to let debhelper help you with update-rc.d-calls in your postinst/postrm-scripts. Also, you may want to easily package cron.d-rules. There’s a debhelper for everything.

CPack does not let you use them without further ado, as it’s built to not rely on anything else.

Here’s my way of making CPack and debhelper really good friends: CMakeDebHelper.

Read More ›

Administration

Running Logitech Media Server in a chroot on Debian Wheezy

Posted on 2013-10-09

Oh no, another chroot-tutorial! This time Logitech Media Server gets jailed. If you only have it running locally it’s not necessary to imprison it, but if you have it running on a public IP it is. Big software with plugins and open ports just creates this chroot-urge deep inside of me. It’s quick and easy, read on!

Read More ›

Code

Krawall GBA on GitHub

Posted on 2013-07-18

Krawall GBA is an XM/S3M modplayer / soundsystem for the Gameboy Advance that I was developing 10 years ago. Back then, I successfully licensed it to quite some game developer studios and it was used in games like “The Sims”, “Spiderman”, “Lord of the Rings” and others.

I’ve removed the dust, updated it to be compatible with the latest devkitPro and rewritten its build-system, also I put it under the LGPL. Get it at GitHub.

Read More ›

Creating a ZIP with a Folder-Icon for OS X

Posted on 2013-06-12

A few days ago I wanted to send a ZIP to a customer and I wanted the root-folder to have an icon, so it’s visually distinguishable as a “special” folder in the user’s home-directory.

However, zipping a folder with a set icon and then extracting it somewhere else doesn’t restore the icon properly. Here’s one way to fix this.

Read More ›

Administration

Setting up a chroot for PHP

Posted on 2013-04-28

In a chroot’ed PHP the following things (at least) won’t function without further ado:

These things are required for most PHP-Applications, so here’s how to make it work. It doesn’t involve copying of any dynamic libraries, which is how others typically solve it.

Read More ›

Administration

Setting up chrooted php-fpm with Apache under Debian “Wheezy” (and Ubuntu 12.04 LTS)

Posted on 2013-04-27

What’s php-fpm? It’s a simple and performant way of running PHP as a certain user in a chroot’ed environment. It’s part of PHP and comes packetized with Debian Wheezy. However, /usr/share/doc/php-fpm/* isn’t too elaborate on setting it up, so here goes…

Read More ›