Site Map - skip to main content - dyslexic font - mobile - text - print

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes Monday through Friday.


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 >>

Host Image
Hosted by Gabriel Evenfire on 2014-10-31 is flagged as Clean and is released under a CC-BY-SA license.
Listen in ogg, spx, or mp3 format. | Comments (3)

Part of the series: 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.

Links


Comments

Subscribe to the comments RSS feed.

Comment #1 posted on 2014-11-01T13:41:28Z 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-01T23:24:00Z by Gabriel Evenfire

Password protected PDF...

Hey,

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.

https://www.scss.tcd.ie/~waldroj/3d1/arm_arm.pdf

The ARM instructions are in section A3.

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

http://users.ece.utexas.edu/~valvano/Volume1/QuickReferenceCard.pdf

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-16T15:11:22Z 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

Powered by Comment Script