Microblaze + Linux: Sample design of a custom peripheral

Scope Even though Xilinx supplies a cute wizard for creating peripherals in its EDK (version 13.2 in my case), it’s just enough to work as a demo. For a real-life case there’s no escape from getting down to the system’s guts. As it turns out, things are pretty well organized under EDK’s hood, which makes [...]

Linux on Microblaze HOWTO (part III)

This is part III of my HOWTO on running Linux on Microblaze. The outline is as follows: Part I: Introduction and setting up the Microblaze processor Part II: Compiling the kernel Part III: Preparing for boot and booting (this page) Part IV: Compiling user space applications Generating the ACE file The ACE file is what [...]

Linux on Microblaze HOWTO (part II)

This is part II of my HOWTO on running Linux on Microblaze. The outline is as follows: Part I: Introduction and setting up the Microblaze processor Part II: Compiling the kernel (this page) Part III: Preparing for boot and booting Part IV: Compiling user space applications Kernel compilation in general Compiling a Linux kernel traditionally [...]

Linux on Microblaze HOWTO (part I)

This is part I of my HOWTO on running Linux on Microblaze. The outline is as follows: Part I: Introduction and setting up the Microblaze processor (this page) Part II: Compiling the kernel Part III: Preparing for boot and booting Part IV: Compiling user space applications Introduction This HOWTO goes through the procedures for getting [...]

The Device Tree for embedded Linux and Xilinx FPGAs

Spoiler It’s very likely that you don’t need to read this. If all you want is to get a Linux kernel to detect a Microblaze processor on an Xilinx FPGA, the relevant information is in another post of mine. This post goes into the details which are necessary to understand, if you want to write [...]

ASPM makes Spartan-6′s PCIe core miss TLP packets

The fatal error Let’s break the bad news: Spartan-6′s PCIe core may drop TLP packets sporadically when ASPM (Active State Power Management) is enabled. That means that any TLP given to the core for transmission can silently disappear, as if it was never submitted. I also suspect that the problem exists in the opposite direction. [...]

Linux character driver: What if flush() data has nowhere to go?

I know that most character drivers don’t implement the flush() method, and the more I deal with it, the more I understand why. But unfortunately, in certain modes of operation flushing is necessary, so I implemented it. One of the problems with flush() is that it’s called when the file is closed automatically as the [...]

Compiling a kernel module after “make clean” on the sources.

The textbook says, that if one wants to compile a module against a kernel, the headers must be there. Those who run distribution kernels are urged to apt-get or yum-install something, and their trouble is over. People like me, who cook their own food and download vanilla kernels, need to handle this themselves. In the [...]

Workaround: Pending signal making wait_event_interruptible() return prematurely

It all starts with this: I’m not ready to return from my character device’s release() method before I know that the underlying hardware has acknowledged the shutdown. It is actually expected to do so quickly, so I relied on a wait_event_interruptible() call within the release method to do the short wait for the acknowledge. And [...]

PCI express from a Xilinx/Altera FPGA to a Linux machine: Making it easy

Update: The project is up and running, available for a large range of FPGAs. Click here to visit its home page. Over the years in which I’ve worked on FPGA projects, I’ve always been frustrated by the difficulty of communicating with a PC. Or an embedded processor running a decent operating system, for that matter. [...]