Browsing All posts tagged under »gcc«

ARM926 interrupts in QEMU

April 15, 2012

7

In this post I prepared what I think is the simplest example on how to manage interrupts for the widespread ARM926 core. From this example one can expand the complexity of the interrupt management at will. I’m going to test the functionality with QEMU, emulating the Versatile Platform Baseboard. I based this example on my […]

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“: […]

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 […]

Using CodeSourcery bare metal toolchain for Cortex-M3

September 3, 2011

39

Using the CodeSourcery arm-none-eabi toolchain to compile a minimal "Hello World" example for Stellaris lm3s6965 microcontroller. The microcontroller is emulated through QEMU and the output is written to a serial port.

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 […]

Programming Arduino Uno in pure C

March 29, 2011

57

Playing with Arduino board and its graphical development environment I felt the urge to work closer to the hardware, stepping away from the default library and the Java IDE and using the compiler directly from the command line. Fortunately all the tools are there, because the Arduino IDE uses them under the hood. So I […]

ZPUino open source processor

March 6, 2011

0

ZPUino is a project that offers a microprocessor that can be put on FPGA, and that can be programmed with a simple IDE. Everything is open source: the toolchain, the IDE and the VHDL code; and it can be downloaded freely. The hardware architecture is based on the ZPU (Zylin CPU), which is a processor […]

Using Newlib in ARM bare metal programs

December 16, 2010

10

Implementing a minimal standard C library for embedded ARM target using Newlib and the CodeSourcery toolchain, and emulating the execution with QEMU.

Follow

Get every new post delivered to your Inbox.

Join 394 other followers