Browsing All posts tagged under »gcc«

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

71

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

21

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

Using Ubuntu ARM cross-compiler for bare metal programming

December 5, 2010

25

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

9

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

41

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

Running Linux on new OpenRisc simulator or1ksim 0.4.0

July 13, 2010

13

The guys at OpenCores released a new version of their OpenRisc core, tweaking many hardware bug but also porting Linux kernel 2.6.24 to their simulation platform, that is called or1ksim. The procedure (found here) to try Linux on the new simulator is straightforward and involves executing a script. The script hides most of the complexity […]

Compiling Linux kernel for QEMU ARM emulator

March 22, 2010

227

How to compile a vanilla Linux kernel for the Versatile ARM platform, and run it using QEMU.

Follow

Get every new post delivered to your Inbox.

Join 442 other followers