thejrcrafter
Posts: 29
Joined: Sun Dec 09, 2012 9:15 pm

Expansion upon Baking PI?

Thu Jul 04, 2013 12:50 am

I am just recently getting back into Bare Metal assembly after reading about the bare metal chess in the news section. I was wondering if it was possible to use the assembler in Baking Pi to do some more advanced things, such as sound, storage, RAM access (so I have more memory than just the 7 or so registers), etc. This isn't really much of an actual project that I am working on, it is more of just a curiosity I have had for a while. If you guys could point me in the right direction as to how I could access all of the hardware and stuff like that, that would be great.

Also, I have an Apple keyboard that the USB version of the Baking Pi template is not recognizing. Has anyone improved that to work with keyboards a bit better?

Finally, I don't want to actually change the assembler or use any new programming languages to interfaces with the previously mentioned hardware. I want to try and challenge myself to make it work only using the functionality given by the Baking Pi assembler, so please do not recommend any other languages to use.

Thank you so much,
thejrcrafter

User avatar
rpdom
Posts: 15432
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Expansion upon Baking PI?

Thu Jul 04, 2013 7:01 am

Baking Pi has already shown you how to access RAM. You have stored values in there and read them back with STR and LDR instructions.

There are 16 basic registers, not 8. But R13 is usually used for SP, and R14 and R15 are reserved for LR and PC.

I started with the Baking Pi tutorials (but never got around to starting the USB one) and I am using the same assembler for several other small projects. I wrote a digital picture frame app that has images in a ramdisk file that are displayed with a few random transition functions. I have a simple diagnostic project that currently just displays serial number, MAC address, model and revision number, CPU/GPU memory allocation and gpio states. It also blinks the ACT LED in different patterns depending on whether the "safe-mode" is enabled or not (the blinking LED runs under interrupts).

I've seen a post on here somewhere about using sound on bare-metal. I'll be looking into that soon.

What I'd like to do next is to be able to use some of the GPU functions (the equivalent of "hello_pi"), but trying to make sense of C code gives me a headache!

Return to “Bare metal, Assembly language”