<div dir="ltr">Hi,<div><br></div><div>Thanks for the input I will try the SD card first.</div><div>That way I won't have to alter the code when I want to run other stuff on the pru.</div><div><br></div><div>Best,</div><div>Nils</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 13 Aug 2019 at 17:32, Gedare Bloom <<a href="mailto:gedare@rtems.org">gedare@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">You can also build the PRU image into the RTEMS binary. See<br>
examples-v2.git/file_io/crc/init.c<br>
<br>
On Tue, Aug 13, 2019 at 8:46 AM Christian Mauderer <<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a>> wrote:<br>
><br>
> Hello Nils,<br>
><br>
> that's a bit odd. I attached an expected output below. Some guesses:<br>
><br>
> - Did you add FAT file system to your application?<br>
> - Is there some odd formatting on the SD? Normally at least the FAT<br>
> partition used by U-Boot should be visible.<br>
> - Is your BDBUF configuration OK?<br>
> - Do you have enough file descriptors?<br>
><br>
> Beneath that: If you only need something where you can put some files,<br>
> you can try to connect a USB stick instead. Maybe that works better.<br>
><br>
> Best regards<br>
><br>
> Christian<br>
><br>
><br>
> media listener: event = DISK ATTACH, state = INQUIRY, src = mmcsd<br>
> media listener: event = DISK ATTACH, state = SUCCESS, src = mmcsd, dest<br>
> = /dev/mmcsd-0<br>
> media listener: event = MOUNT, state = INQUIRY, src = /dev/mmcsd-0<br>
> mmcsd0: 4GB <SDHC TO 15.15 SN 000002F6 MFG 02/2017 by 25 DY> at mmc0<br>
> 24.0MHz/4bit/65535-block<br>
> media listener: event = MOUNT, state = FAILED, src = /dev/mmcsd-0<br>
> media listener: event = PARTITION INQUIRY, state = INQUIRY, src =<br>
> /dev/mmcsd-0<br>
> media listener: event = PARTITION INQUIRY, state = SUCCESS, src =<br>
> /dev/mmcsd-0<br>
> media listener: event = PARTITION ATTACH, state = INQUIRY, src =<br>
> /dev/mmcsd-0<br>
> media listener: event = PARTITION ATTACH, state = SUCCESS, src =<br>
> /dev/mmcsd-0, dest = /dev/mmcsd-0-0<br>
> media listener: event = MOUNT, state = INQUIRY, src = /dev/mmcsd-0-0<br>
> media listener: event = MOUNT, state = SUCCESS, src = /dev/mmcsd-0-0,<br>
> dest = /media/mmcsd-0-0<br>
> media listener: event = DISK ATTACH, state = INQUIRY, src = mmcsd<br>
> media listener: event = DISK ATTACH, state = SUCCESS, src = mmcsd, dest<br>
> = /dev/mmcsd-1<br>
> media listener: event = MOUNT, state = INQUIRY, src = /dev/mmcsd-1<br>
> mmcsd1: 4GB <MMCHC MMC04G 5.8 SN 160D224B MFG 09/2014 by 112 0x0000> at<br>
> mmc1 48.0MHz/8bit/65535-block<br>
> media listener: event = MOUNT, state = FAILED, src = /dev/mmcsd-1<br>
> media listener: event = PARTITION INQUIRY, state = INQUIRY, src =<br>
> /dev/mmcsd-1<br>
> media listener: event = PARTITION INQUIRY, state = FAILED, src =<br>
> /dev/mmcsd-1<br>
> media listener: event = DISK ATTACH, state = INQUIRY, src = mmcsd1boot<br>
> mmcsd1boot0: 2MB partion 1 at mmcsd1<br>
> mmcsd1boot1: 2MB partion 2 at mmcsd1<br>
> mmcsd1rpmb: 131kB partion 3 at mmcsd1<br>
><br>
><br>
> On 13/08/2019 13:30, Nils Hölscher wrote:<br>
> > Hi,<br>
> ><br>
> > Thanks for the help.<br>
> > I tried to use your code, but I always get "ERROR: SD could not be<br>
> > mounted after timeout".<br>
> > Even after raising the waiting time.<br>
> ><br>
> > The sources I use start here:<br>
> > <a href="https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/main.c#L110" rel="noreferrer" target="_blank">https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/main.c#L110</a><br>
> ><br>
> > And my uart output is:<br>
> > ""<br>
> > waiting for SD...<br>
> ><br>
> > usbus0: 480Mbps High Speed USB v2.0<br>
> > usbus1: 480Mbps High Speed USB v2.0<br>
> > media listener: event = DISK ATTACH, state = INQUIRY, src = mmcsd<br>
> > media listener: event = DISK ATTACH, state = SUCCESS, src = mmcsd, dest<br>
> > = /dev/mmcsd-0<br>
> > media listener: event = MOUNT, state = INQUIRY, src = /dev/mmcsd-0<br>
> > ugen0.1: <Mentor Graphics OTG Root HUB> at usbus0<br>
> > ugen1.1: <Mentor Graphics OTG Root HUB> at usbus1<br>
> > uhub0: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1><br>
> > on usbus0<br>
> > uhub1: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1><br>
> > on usbus1<br>
> > media listener: event = MOUNT, state = FAILED, src = /dev/mmcsd-0<br>
> > media listener: event = PARTITION INQUIRY, state = INQUIRY, src =<br>
> > /dev/mmcsd-0<br>
> > media listener: event = PARTITION INQUIRY, state = SUCCESS, src =<br>
> > /dev/mmcsd-0<br>
> > media listener: event = PARTITION ATTACH, state = INQUIRY, src =<br>
> > /dev/mmcsd-0<br>
> > media listener: event = PARTITION ATTACH, state = SUCCESS, src =<br>
> > /dev/mmcsd-0, dest = /dev/mmcsd-0-0<br>
> > media listener: event = MOUNT, state = INQUIRY, src = /dev/mmcsd-0-0<br>
> > media listener: event = MOUNT, state = FAILED, src = /dev/mmcsd-0-0<br>
> > media listener: event = DISK ATTACH, state = INQUIRY, src = mmcsd<br>
> > media listener: event = DISK ATTACH, state = SUCCESS, src = mmcsd, dest<br>
> > = /dev/mmcsd-1<br>
> > media listener: event = MOUNT, state = INQUIRY, src = /dev/mmcsd-1<br>
> > media listener: event = MOUNT, state = FAILED, src = /dev/mmcsd-1<br>
> > media listener: event = PARTITION INQUIRY, state = INQUIRY, src =<br>
> > /dev/mmcsd-1<br>
> > media listener: event = PARTITION INQUIRY, state = SUCCESS, src =<br>
> > /dev/mmcsd-1<br>
> > media listener: event = PARTITION ATTACH, state = INQUIRY, src =<br>
> > /dev/mmcsd-1<br>
> > media listener: event = PARTITION ATTACH, state = SUCCESS, src =<br>
> > /dev/mmcsd-1, dest = /dev/mmcsd-1-0<br>
> > media listener: event = MOUNT, state = INQUIRY, src = /dev/mmcsd-1-0<br>
> > media listener: event = MOUNT, state = FAILED, src = /dev/mmcsd-1-0<br>
> > media listener: event = DISK ATTACH, state = INQUIRY, src = mmcsd1boot<br>
> > uhub0: 1 port with 1 removable, self powered<br>
> > uhub1: 1 port with 1 removable, self powered<br>
> > ERROR: SD could not be mounted after timeout<br>
> > ""<br>
> ><br>
> > Thanks,<br>
> > Nils<br>
> ><br>
> > On Mon, 12 Aug 2019 at 18:01, Christian Mauderer <<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a><br>
> > <mailto:<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a>>> wrote:<br>
> ><br>
> > On 12/08/2019 07:28, Nils Hölscher wrote:<br>
> > > Hi,<br>
> > ><br>
> > > Can anyone help me with this?<br>
> > > I need to access the BBB's SD-Card, so that I can load my pru<br>
> > example on<br>
> > > the pru.<br>
> > ><br>
> > > Thanks,<br>
> > > Nils<br>
> > ><br>
> ><br>
> > Hello Nils,<br>
> ><br>
> > take a look at the following application:<br>
> ><br>
> > <a href="https://gitlab.com/c-mauderer/rtems-bbb/blob/master/apps/wifi-sample/init.c#L64" rel="noreferrer" target="_blank">https://gitlab.com/c-mauderer/rtems-bbb/blob/master/apps/wifi-sample/init.c#L64</a><br>
> ><br>
> > <a href="https://gitlab.com/c-mauderer/rtems-bbb/blob/master/apps/wifi-sample/libbsdhelper.c#L122" rel="noreferrer" target="_blank">https://gitlab.com/c-mauderer/rtems-bbb/blob/master/apps/wifi-sample/libbsdhelper.c#L122</a><br>
> ><br>
> > You should mainly need the stuff from the libbsdhelper_init_sd_card()<br>
> > and libbsdhelper_wait_for_sd().<br>
> ><br>
> > Please note that the SD card needs quite some time to initialize on BBB.<br>
> > I haven't had a look at it why that is the case.<br>
> ><br>
> > Best regards<br>
> ><br>
> > Christian<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > users mailing list<br>
> > <a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
> > <a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a><br>
> ><br>
> _______________________________________________<br>
> users mailing list<br>
> <a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a><br>
</blockquote></div>