raspberrypi BSP current status
Christian Mauderer
list at c-mauderer.de
Sun Dec 1 09:35:51 UTC 2019
On 30/11/2019 19:11, Niteesh wrote:
> On Sat, Nov 30, 2019 at 3:03 AM Christian Mauderer <list at c-mauderer.de
> <mailto:list at c-mauderer.de>> wrote:
>
> On 29/11/2019 21:12, Niteesh wrote:
> > I am interested in contributing to the raspberry pi BSP. As of now
> RTEMS
> > only has support for RPi1 and RPi2, but It seems that most of the code
> > for RPi2 should work unmodified for RPi3 and RPi4, I am sure about the
> > peripherals since the base address of the registers haven't changed in
> > the new ones.
> > I looked at the previous GSOC work and README section of the
> > raspberrypi, but they look not up to date. I want to know the current
> > status of the BSP, what all is completed, yet to be done? so that's I
> > could start working on something.
> >
>
> Hello Niteesh,
>
> from a quick look there are the following drivers:
> - Serial
> - GPIO
> - I2C
> - SPI
> - Some Framebuffer
>
> In 2016 a GSoC student tried to port the USB and Ethernet driver. But it
> seems that this work hadn't been merged:
>
> https://devel.rtems.org/wiki/GSoC/2016
>
> Regarding good starting points: I think you already found some with just
> this mail.
>
> - If you have an old Pi1 or 2, you could try to run some basic RTEMS
> there as a first step. Or did you already try that?
>
> I only have the Pi3 model B. But I did try running basic examples like
> hello, ticker
> on qemu using this command:
> qemu-system-arm -M raspi2 -m 1G -kernel hello.exe -serial mon:stdio
> -net none -nographic -dtb bcm2709-rpi-2-b.dtb
> But this does not work sometimes for the same program, it results in
> fatal source exception.
OK. Sounds like there is a problem. It would be interesting to find out
what goes wrong. Like Joel already said: Running the BSP on a simulator
is a good thing for the project. On the one hand it allowing easy
debugging without a hardware debugger. On the other hand automated test
runs for the BSP are possible.
By the way: It's quite possible that the exception happens on real
hardware too.
If you took some notes how you set everything up it would be great if
you could add them to the documentation. Just add a note regarding the
sporadic errors too.
> I am yet to try these examples on Pi3 because I waiting for my USB - TTL
> converter
Again the same: If you take some notes please share them.
>
> - You say that it "should work" on RPi3 and RPi4. It would be great if
> you could try it and update the documentation if it does.
>
> - If you take some notes while doing the tests, it would be great if you
> could donate them to the documentation so the old README could be
> replaced:
> https://docs.rtems.org/branches/master/user/bsps/bsps-arm.html#raspberrypi
>
> - If you want to start a bigger project you could take a look at the USB
> work and test it. Most likely it still needs some work.
>
> I am very much interested in working on projects like USB, but I lack
> the basic's. I having a look at the previous GSOC work, and
> other USB work's from different BSP's(beagle). Can you recommend some
> resources or things that I should know before hand?
>
I don't really have resources that I can suggest.
Note that USB is a quite complex topic. But you are lucky: In this case
the complex stuff is just imported from FreeBSD via the rtems-libbsd.
Basically what I would expect for porting the USB driver is:
- Import the driver files from FreeBSD.
- Find out if the drivers use any subsystems that are not imported yet.
- Take a thorough look at the register accesses and adapt if necessary.
- Take a thorough look at the DMA stuff of the driver (I think that's a
part where the previous GSoC project had problems).
- Make sure that the cache handling is done right. Either cache flush
and invalidate is necessary when passing buffers between DMA and CPU or
an uncached memory area should be used.
> - If you are interested in any other peripheral of the Pi: Just ask.
>
> I found no example of the GPIO working on raspberrypi, And also there no
> clear doc for the GPIO API, is there any examples or docs
> that you could point me to?
I don't really have experience with the Pi BSP. So I don't know the
examples for it. But as far as I know the GPIO for the Pi has been a
GSoC project too. So you most likely find something on the old GSoC
project pages and on the blog of the student who did the work.
Best regards
Christian
>
> Best regards
>
> Christian
>
More information about the devel
mailing list