Tag Archives: series

STM32F0 Discovery Development III

The ARM startup code we discussed last time was enough to get a program to compile, link and run, but it wasn’t enough to support a real C program. There is one primary feature that we’re missing, pre-initialised variables need their initial values copying from flash to RAM. The discovery-basic-template is full of useful information,… Read More »

Valgrind II — helgrind

Last time we looked at valgrind’s memory leak detector, memcheck. This time we’ll be looking at an even more difficult to catch class of bug, thread race conditions. First let’s be clear what a thread race is: a race is when two threads run code that access the same piece of memory. The outcome is… Read More »

Valgrind I — memcheck

In this series I’m going to give you a quick tour of the valgrind tool suite. valgrind is useful for finding those hard-to-find, serious-repercussion bugs that can sneak into your code. Consider this C++ program: // C++ #include <iostream> // C #include <stdlib.h> // OS #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> using namespace… Read More »

Asterisk For a Small Business (VII)

As we left things last time, we had a nicely organised dial plan that had the minimum of duplicated code, and was essentially a set of tables that mapped endpoints to extensions or queues. Let’s remind ourselves. [internal-extensions] ; Numeric aliases exten => 2100,1,Goto(andyp,1) exten => 2101,1,Goto(wife,1) exten => 2102,1,Goto(handytone1,1) exten => 2103,1,Goto(handytone2,1) exten =>… Read More »

Asterisk For a Small Business (VI)

Last time I showed you how to add voicemail facilities to your incoming lines. We concentrated on the local end, how a single access number could pickup voicemail from different mailboxes depending on the extension it was dialled from. I didn’t discuss the receiving side very much, and simply gave you this template: [external] exten… Read More »