Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at

hpr1630 :: Bare Metal Programming on the Raspberry Pi (Part 2)

This episode discusses interrupt handling, and program loading using the Xmodem protocol

<< First, < Previous, , Latest >>

Thumbnail of Gabriel Evenfire
Hosted by Gabriel Evenfire on 2014-10-31 is flagged as Clean and is released under a CC-BY-SA license.
programming, embedded systems, raspberry pi. 3.
The show is available on the Internet Archive at:

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:50:24

Programming 101.

A series focusing on concepts and the basics of programming

The second episode in a series on bare metal programming on the Raspberry Pi. This episode builds on part 1 by showing how interrupts work on the RPIs ARM chip and the framework I created to manage them. It then goes on to describe how an interrupt-enabled serial driver works. From there, the episode shows how we can use the serial cable in conjunction with a loader program to enable us to load bare-metal programs onto the RPI without having to copy them to the SD card each time. In the process, the episode describes the XMODEM protocol that the loader users for the file transfer process.

Here is some of the source material that I used while working on this little learning experience.



Subscribe to the comments RSS feed.

Comment #1 posted on 2014-11-01 13:41:28 by Mike Ray

Another excellent episode

Another great episode of Bare Metal Programming on the Raspberry Pi. I like the loading of executable code with xmodem over the UART Looking forward to the next.

Only issue I have is that one of the PDFs pointed to in the first episode for download is password protected.

I'd like to get a list of all the ARM ASM instructions.

Comment #2 posted on 2014-11-01 23:24:00 by Gabriel Evenfire

Password protected PDF...


Glad you are enjoying the series...

I just tried all the PDFs wtihin firefox and all opened up without asking for a password. Was it the ARM ARM that was giving you issues?

I found a second link that has that document.

The ARM instructions are in section A3.

Here is a quick reference card that I found online and have used on occasion.

Now the RPI's ARM basically has support for "regular ARM" which is like 32-bit RISC, "thumb" which has a compressed form of regular ARM in 16-bit instructions and "jazelle" which is a mode where the ARM can interpret java bytecodes.

Regular is simple and elegant, and so is thumb from what I can see. But I have never used it. I've no interest in the Jazelle instructions for the time being. Now, newer ARM processors have support for 64-bit instructions mixed with 32-bit instructions (maybe even mixed with 16-bit instructions?). I'm not a fan of what they did there.

If you are still getting issues, email me. (see my profile)

Cheers, -- Gabriel Evenfire

Comment #3 posted on 2014-12-16 15:11:22 by Alison Chaiken

Would make a great basis for a hackfest

Parts 1 and 2 have about the right amount of content for a weekend workshop. It would be fun to have a "Bare Metal Programming on the Raspberry Pi" session as part of some weekend hackfest.

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Anti Spam Question: What does the letter P in HPR stand for?
Are you a spammer?
What is the HOST_ID for the host of this show?
What does HPR mean to you?