<div dir="ltr">From my limited research, it looks like the emmc controller in the Raspberry Pi BCM2835 may be the way to go. <div>It looks like it is a high level controller for the SD/MMC card slot on the Pi. </div><div><br>
</div><div>Since this is a custom controller, I don't think there would be an existing driver in RTEMS. </div><div><br></div><div>It seems that this emmc controller in the Pi may handle different types of cards, and at a higher level than just using the SPI bus to access the card. ( This is based on some searches of conversations on the raspberry pi forums , not my experience ) </div>
<div><br></div><div>You would have to write a driver for this emmc controller and provide the interface to libblock for the file system interface on RTEMS. The code you have linked above for rpi-boot looks like it has a permissive license, so it *may* be possible to use this code in the RTEMS driver. There is some other potentially useful code in there too.</div>
<div><br></div><div>I'll have to try the serial bootloader, I am also close to ordering an inexpensive JTAG adapter to try loading and debugging through JTAG. uboot is another possibility, using a TFTP server. </div><div>
<br></div><div>Alan</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 2, 2014 at 12:02 PM, Andre Marques <span dir="ltr"><<a href="mailto:andre.lousa.marques@gmail.com" target="_blank">andre.lousa.marques@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I'm intending to work in the SD card support for the Raspberry Pi BSP, using the SD mode instead of the SPI mode.<br>
<br>
The references I have gathered so far for this are as follows:<br>
<br>
The Raspberry Pi SOC guide: Broadcom BCM2835 Peripherals Guide (Chapter 5 - EMMC)<br>
<br>
The simplified SD standard - <a href="https://www.sdcard.org/downloads/pls/simplified_specs/" target="_blank">https://www.sdcard.org/<u></u>downloads/pls/simplified_<u></u>specs/</a><br>
<br>
And the following github code - <a href="https://github.com/jncronin/rpi-boot/blob/master/emmc.c" target="_blank">https://github.com/jncronin/<u></u>rpi-boot/blob/master/emmc.c</a><br>
<br>
There is also the libchip/i2c/spi-sd-card libi2c driver, which can also be a reference (even though it uses SPI).<br>
<br>
Now, the questions:<br>
<br>
Should I use the Generic Disk Device driver, as the libchip/i2c/spi-sd-card ?<br>
<br>
Is there any driver using the SD mode for sd card access, or using an emmc interface currently in the RTEMS code base? I haven't found any.<br>
<br>
On a side note, I managed to send RTEMS applications to the RPi though the UART interface using the xmodem protocol.<br>
<br>
For that I used the following bootloader<br>
<br>
<a href="https://github.com/dwelch67/raspberrypi/tree/master/bootloader05" target="_blank">https://github.com/dwelch67/<u></u>raspberrypi/tree/master/<u></u>bootloader05</a><br>
<br>
It takes me 2 minutes to send 1 MB of data to the RPi, but this could be improved if it used 1024 byte block transfer instead of the default of 128. The bootloader loads the transfered program to memory and runs it. Then the RPi must be rebooted so a new program can be sent.<br>
<br>
It may not be the best way, but only requires an usb-to-uart cable, and avoids the current SD card "dance" to run programs on the Pi.<br>
<br>
Thank you for your time.<br>
<br>
--André Marques<br>
<br>
<br>
</blockquote></div><br></div>