[RFC] Raspberry PI

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: [RFC] Raspberry PI

Post by Giovanni »

The USB appears to be the same OTG Synopsys peripheral used by the STM32F4 configured similarly to the OTG-HS, the required documentation is available from Synopsys. It is possible most of the STM32 code can be reused.

I must say that the "datasheet" I found sucks and I haven't found an header file for the peripheral definitions yet.

Giovanni
utzig
Posts: 359
Joined: Sat Jan 07, 2012 6:22 pm
Has thanked: 1 time
Been thanked: 20 times

Re: [RFC] Raspberry PI

Post by utzig »

> 2) The ARM11 should not be that different from the ARM9 which is already supported (I have to verify this point).

Hmmm, I will sound naive but I really didn't find the code! The os/ports/GCC/ARM only has ports for ARM7 processors. And I always supposed that for supporting ARM9 (or more modern) you would have to support MMU. Is that really available?

Here some documentation of the RB-PI GPU:

http://elinux.org/RPi_VideoCore_APIs

Linux has only high level drivers which are here:

https://github.com/raspberrypi/linux/bl ... m2708_fb.c

And communicate with low-level through a mailbox mechanism (bcm_mailbox_*) available here:

https://github.com/raspberrypi/linux/bl ... 708/vcio.c

Which are really communicating with the FW binary blobs available here (boot dir):

https://github.com/raspberrypi/firmware

A silly question. Isn't it possible to load a firmware blob (I'll suppose they are only a binaries) in any other OS? Are they Linux specific?

If there's any way of loading the blobs it would be possible to "reverse engineer" the mailbox mechanisms.

Fabio Utzig
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: [RFC] Raspberry PI

Post by Giovanni »

The person who triggered this idea also has a lot of things already done:

https://github.com/dwelch67/raspberrypi

The above code could speed up the port considerably.

About the ROM code, if Linux can call it then probably it could be done also from ChibiOS, I assume that it is OS-independent code, the problem is the documentation, as usual.

About MMU, not all ARM9 devices have one and, even if present, we don't have to use it :-) (I think it would be bad for realtime performance anyway), the current ARM support is for ARM7 and ARM9, probably it would just have to be updated for ARM11.

Giovanni
pjohnson
Posts: 5
Joined: Tue May 08, 2012 6:10 pm

Re: [RFC] Raspberry PI

Post by pjohnson »

Don't let the naysayers dissuade you. I think that a RasberryPi Chibios port would be the coolest thing ever.
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: [RFC] Raspberry PI

Post by mobyfab »

The Arm11 being an (obsolete) application processor, I don't really get the point of porting Chibios to it... except for the education and popularity point of view.

There are a few cheaper A8 based modules in preparation, based on the allwinner A10 or similar.
But still, this is an application processor, which would mostly run on Linux.
Xamusk
Posts: 81
Joined: Sat Mar 05, 2011 10:47 pm

Re: [RFC] Raspberry PI

Post by Xamusk »

I think the Raspberry would be a great platform if one wants an upgrade path when a faster processor is needed. Too bad it's too expensive (it costs more than $150 because of high shipping charges and duties), though it's still cheaper than some (most?) MCU platforms, when counting those too.
Steve
Posts: 5
Joined: Mon Oct 15, 2012 4:00 pm

Re: [RFC] Raspberry PI

Post by Steve »

Hello,

I've ported ChibiOS/RT to the Raspberry Pi. The code is available on GitHub.

https://github.com/steve-bate/ChibiOS-RPi

There are currently Pi-specific device drivers for PAL, I2C, SPI, GPT, Serial. I've created a demo application using the shell and it runs the shell-based tests successfully. I've also created several examples of using Chibi to access Pi hardware (under testhal/BCM2835).

I'm curious about whether this is something that you'd want to integrate this with the Chibi SVN repository or if you'd prefer to keep the fork separated.

Steve
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: [RFC] Raspberry PI

Post by Giovanni »

Hi Steve,

Good job, it was something I planned to do but never found time for it. I have some questions for you:

- Does it use the existing ARM port?
- Does it modify anything on the existing files or it is just an add-on over a ChibiOS version?
- On what ChibiOS/RT version has it been tested?

About including into the ChibiOS distribution, I am going to create a staging repository for this kind of contributions, probably it could go there immediately until it is ready and reviewed then it could go in the main distribution. I don't mind if you want to maintain it on your own repository too, I would still link it from the ChibiOS wiki with a dedicated page.

About the port, it would be interesting to write a mini guide about it or an how-to and place it on the wiki, do you already have something that could be adapted?

Giovanni
Steve
Posts: 5
Joined: Mon Oct 15, 2012 4:00 pm

Re: [RFC] Raspberry PI

Post by Steve »

Hello Giovanni,

Yes, it's based on the existing ARM port. It doesn't modify anything in the generic kernel or HAL code.

My current code was developed in a fork of mabl's git mirror, so it's sync'ed to SVN trunk frequently (2.5.1unstable).

I wrote a short "getting started" guide. It's available at http://www.stevebate.net/chibios-rpi/Ge ... arted.html . There's also some information on the GitHub repository's wiki pages.

Steve
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: [RFC] Raspberry PI

Post by Giovanni »

I will have time to review the port during the next weekend then I will be able to give you some feedback. In the meanwhile I'll find a RPI :)

Giovanni
Post Reply