Browsing All posts tagged under »gnu«

Compile Linux kernel 3.2 for ARM and emulate with QEMU

March 31, 2012

84

This is a tutorial to: 1. Get Linux kernel 3.2 source code 3. Configure and compile for Versatile Express ARM Cortex-A9 platform 4. Prepare and create a ramdisk using initramfs schema 5. Emulate kernel boot and ramdisk execution using QEMU

Linking a binary blob with GCC

February 19, 2012

5

There’s a simple way to include binary data inside an executable, when using a GCC toolchain. The trick relies on using objcopy to transform the binary blob of data into an object file that can be linked. In this example I am creating a binary blob of 16 bytes of random data in file “blob.bin“: […]

Bruce Perens on Open Source Hardware

February 1, 2012

1

Linux Conference Australia, Ballarat 2012. The creator of Busybox and co-founder of Debian makes a compelling and rational argument about who should speak for Open Source, and then offers a hopeful perspective on the new frontiers of Open Source Hardware. He is convinced that today there’s plenty of enabling factors to make Open Source Hardware […]

Codesourcery toolchains have new site at Mentor Graphics

October 8, 2011

10

This completely slipped under my radar: Mentor Graphics acquired CodeSourcery’s toolchain products some time ago. I found out when I got to their site and it redirected me to Mentor. In my tutorials I often make use of the Lite editions of the Codesourcery toolchains, so this is the new site for reference: Sourcery CodeBench […]

A nasty string initialization bug in C

May 31, 2011

5

Today I encountered a bug that was quite difficult to find regarding strings. In order for strings to work they must be null-terminated, and this implies that an array of characters can contain a string with a length equal to the array size minus one, because there must be space for the null character. I […]

Inline assembly instructions in GCC

May 17, 2011

1

In embedded software programming there’s often the need to use assembly-level instructions to reach all the functionalities of the processing core. But when the developing is done almost exclusively in C, it is sometimes a burden, often an added complexity and possibly a nuisance to code separate assembly files containing the needed functions. Other than […]

Coding styles comparison in the Open Source Software world

December 28, 2010

19

While looking for existing C coding standards I discovered that the GNU and Linux projects officially suggest very different styles. Inside the Linux kernel documentation, Linus Torvalds goes so far as to mock GNU coding standards: First off, I’d suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, […]

Using Ubuntu ARM cross-compiler for bare metal programming

December 5, 2010

21

Ubuntu 10.10 Maverick Meerkat includes an ARM cross-compiler to compile programs for Linux. The compiler can also be used for bare-metal programming with a few arrangements.

QEMU ARM semihosting

November 4, 2010

8

QEMU is able to emulate ARM architectures with many details. One thing that the qemu-system-arm program implements is the Angel interface, that enables semihosting. Semihosting involves two machines: a target (the embedded device), and a host (such as a PC) that is connected to the target through a debug interface. An embedded program running in […]

Trace and profile function calls with GCC

October 6, 2010

22

Software debugging is a complex task. There is always the need to collect all available information, in order to detect and understand the problem fast and to think of a proper solution. Sometimes it’s more convenient to debug step-by-step, sometimes it’s better to make the program run completely, and then trace the execution flow “offline”. […]

Follow

Get every new post delivered to your Inbox.

Join 394 other followers