xlar54
Posts: 51
Joined: Tue Aug 20, 2013 5:08 am

RPI3 & Commodore PI

Thu Aug 25, 2016 2:46 am

So its been awhile since ive been here - life in the way... but I did manage to score a Rpi3. Im the author of the Commodore Pi project and I wanted to catch up with it a bit and see how the code would run under the 3. It didnt. Doesnt even boot. Just the rainbow screen.

So Im curious was has changed in the last year with the 3? I have read that I have to name the image file "kernel7.img". I use the yargato tool chain (http://www.yagarto.org/). Looks like they have stopped development on that toolchain. Do I need to use any specific flags to recompile for the 3? Anything specific in the config.txt that needs to be set?

viewtopic.php?f=72&t=55573

User avatar
Ultibo
Posts: 160
Joined: Wed Sep 30, 2015 10:29 am
Location: Australia
Contact: Website

Re: RPI3

Thu Aug 25, 2016 3:17 am

xlar54 wrote:So Im curious was has changed in the last year with the 3?
I can't tell from the link you posted or from your GitHub if you ever had this working with an RPi2.

There were huge changes between the original Pi (A/B/A+/B+) and the Pi 2 but only minor changes (from a bare metal perspective) between the Pi 2 and 3. If you did have the project working on Pi 2 then it should almost work without change on Pi3, if you only got as far as the original Pi then you'll need to do a lot of work on some low level stuff like caching, MMU, peripheral addresses and so on.
Ultibo.org | Make something amazing
https://ultibo.org

Threads, multi-core, OpenGL, Camera, FAT, NTFS, TCP/IP, USB and more in 3MB with 2 second boot!

xlar54
Posts: 51
Joined: Tue Aug 20, 2013 5:08 am

Re: RPI3 & Commodore PI

Thu Aug 25, 2016 6:06 pm

Yeah, I had been working with the older B+ (not a 2). Looks like Ill have to back it up and see what needs to change. Down side is that info is sparse enough without adding 2/3 in the mix for bare metal.

Exile In Paradise
Posts: 3
Joined: Wed May 07, 2014 3:57 pm

Re: RPI3 & Commodore PI

Sat Aug 27, 2016 5:38 pm

xlar54 wrote:Yeah, I had been working with the older B+ (not a 2). Looks like Ill have to back it up and see what needs to change. Down side is that info is sparse enough without adding 2/3 in the mix for bare metal.
Here's some notes that might help you get ramped up faster:

Working through Alex Chadwick's baremetal OS tutorial on the Pi2, I had to change peripheral base address changed from 0x20000000 on the Pi1B to 0x3F000000 on the Pi2B.

The GPIO pin assignments changed between the P1 and Pi1+ when the GPIO went from 26 to 40 pins.

For example, the OK/ACT LED moved from GPIO 16 on Pi1B to GPIO 47 on Pi2B

I don't have a Pi3 yet to check the new peripheral base and GPIO assignments, but I've read that there's a kernel8.img involved now too.

I am sure the RasPi documentation and firmware githubs will have more detail somewhere down in them.

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

Re: RPI3 & Commodore PI

Sat Aug 27, 2016 5:44 pm

Exile In Paradise wrote:I don't have a Pi3 yet to check the new peripheral base and GPIO assignments, but I've read that there's a kernel8.img involved now too.
The GPIO pinout on the Pi3 is the same as the Pi2/A+/B+.

The GPIO Base address is the same as the Pi2.

The ACT LED on the Pi3 is connected to an I2C GPIO expander, rather than to one of the native GPIOs, so can't be driven directly via a simple memory address poke like on the earlier versions.

Return to “Bare metal, Assembly language”