<div dir="ltr">Hi,<div><br></div><div>Short update.</div><div><br></div><div>It seems the device only hangs while I am connected with the debugger.</div><div>looks like a Heisenberg bug.</div><div><br></div><div>Best,</div><div>Nils</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 16 Aug 2019 at 09:50, Nils Hölscher <<a href="mailto:nilhoel1@gmail.com">nilhoel1@gmail.com</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"><div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 15 Aug 2019 at 19:51, Christian Mauderer <<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</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">Hello Nils,<br>
<br>
maybe another bug in our FAT file system...<br>
<br>
Please do three things:<br>
<br>
1. Create an image of your current card (with dd or a similar tool). FAT<br>
bugs are sometimes hard to reproduce but it's really urgent that we fix<br>
them. So maybe I'll ask for that image later.<br>
<br></blockquote><div>I did that. </div><div>Let me know if you need the image.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2. Create a complete list of the files on your card (for example the<br>
Linux `tree -h` command), post it here and tell me what you tried to open.<br>
<br></blockquote><div> .</div>├── [ 50K] am335x-boneblack.dtb<br>├── [ 49K] am335x-boneblack+pruss.dtb<br>├── [ 883] AM335X-PRU-UIO-00A0.dtbo<br>├── [ 649] AM335X-PRU-UIO-BSD-00A0.dtbo<br>├── [162K] Linux-with-UIO.dtb<br>├── [ 44] loob.bin<br>├── [108K] MLO<br>├── [2.1M] pru.exe.img<br>├── [ 12] test.bin<br>├── [471K] u-boot.img<br>├── [ 390] uEnvLinuxfdt.txt<br>└── [ 560] uEnv.txt<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> 3. Try another name / folder for the file you wanted to open.\<br>
<br></blockquote><div>I moved the file in another folder and renamed it.</div><div>It now works but I got en error, I am currently investigating if this is on the pru driver side or not.</div><div>The tree while doing this was:</div><div>.<br>├── [ 50K] am335x-boneblack.dtb<br>├── [ 49K] am335x-boneblack+pruss.dtb<br>├── [ 883] AM335X-PRU-UIO-00A0.dtbo<br>├── [ 649] AM335X-PRU-UIO-BSD-00A0.dtbo<br>├── [162K] Linux-with-UIO.dtb<br>├── [ 44] loob.bin<br>├── [108K] MLO<br>├── [2.1M] pru.exe.img<br>├── [2.0K] test<br>│ └── [ 12] test2.bin<br>├── [ 12] test2.bin<br>├── [471K] u-boot.img<br>├── [ 390] uEnvLinuxfdt.txt<br>└── [ 560] uEnv.txt<br><br></div><div><br></div><div>Thanks,</div><div>Nils </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Best regards<br>
<br>
Christian<br>
<br>
On 15/08/2019 19:32, Nils Hölscher wrote:<br>
> Hi Christian,<br>
> <br>
> The commands ls and cat work.<br>
> I just tested them, this seems kinda awkward.<br>
> <br>
> Best,<br>
> Nils<br>
> <br>
> On Thu, 15 Aug 2019 at 19:27, 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>
> Hello Nils,<br>
> <br>
> does some other access to the file system work? Like a ls on the console<br>
> or creating a file. Can you do a `cat` on some text file on the file<br>
> system? If not: Does it work for a file in the root file system (should<br>
> be a IMFS)?<br>
> <br>
> Best regards<br>
> <br>
> Christian<br>
> <br>
> On 15/08/2019 15:54, Nils Hölscher wrote:<br>
> > Hi,<br>
> ><br>
> > I when my app wants to open a file on the SD card dev=mmcsd-0-0 rtems<br>
> > freezes.<br>
> > Exact call is:<br>
> > fd = open(file, O_RDONLY);<br>
> > With file being the pru binary I want to upload.<br>
> ><br>
> > Thanks,<br>
> > Nils<br>
> ><br>
> > On Tue, 13 Aug 2019 at 17:56, Christian Mauderer<br>
> > <<a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a><br>
> <mailto:<a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a>><br>
> > <mailto:<a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a><br>
> <mailto:<a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a>>>> wrote:<br>
> ><br>
> > Hello Nils,<br>
> ><br>
> > a third possibility: You could start a FTP server and push the<br>
> file<br>
> > via network.<br>
> ><br>
> > Best regards<br>
> ><br>
> > Christian<br>
> ><br>
> > Am Dienstag, 13. August 2019 schrieb Nils Hölscher:<br>
> > > Hi,<br>
> > ><br>
> > ><br>
> > > Thanks for the input I will try the SD card first.<br>
> > > That way I won't have to alter the code when I want to run other<br>
> > stuff on the pru.<br>
> > ><br>
> > ><br>
> > > Best,<br>
> > > Nils<br>
> > ><br>
> > ><br>
> > > On Tue, 13 Aug 2019 at 17:32, Gedare Bloom <<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a><br>
> <mailto:<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>><br>
> > <mailto:<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a> <mailto:<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>>>> wrote:<br>
> > ><br>
> > > 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<br>
> > <<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a> <mailto:<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> <mailto:<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.<br>
> Some guesses:<br>
> > > ><br>
> > > > - Did you add FAT file system to your application?<br>
> > > > - Is there some odd formatting on the SD? Normally at<br>
> 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<br>
> some<br>
> > files,<br>
> > > > you can try to connect a USB stick instead. Maybe that<br>
> works better.<br>
> > > ><br>
> > > > Best regards<br>
> > > ><br>
> > > > Christian<br>
> > > ><br>
> > > ><br>
> > > > media listener: event = DISK ATTACH, state = INQUIRY, src<br>
> = mmcsd<br>
> > > > media listener: event = DISK ATTACH, state = SUCCESS, src =<br>
> > mmcsd, dest<br>
> > > > = /dev/mmcsd-0<br>
> > > > media listener: event = MOUNT, state = INQUIRY, src =<br>
> /dev/mmcsd-0<br>
> > > > mmcsd0: 4GB <SDHC TO 15.15 SN 000002F6 MFG 02/2017 by 25<br>
> DY> at mmc0<br>
> > > > 24.0MHz/4bit/65535-block<br>
> > > > media listener: event = MOUNT, state = FAILED, src =<br>
> /dev/mmcsd-0<br>
> > > > media listener: event = PARTITION INQUIRY, state =<br>
> INQUIRY, src =<br>
> > > > /dev/mmcsd-0<br>
> > > > media listener: event = PARTITION INQUIRY, state =<br>
> SUCCESS, src =<br>
> > > > /dev/mmcsd-0<br>
> > > > media listener: event = PARTITION ATTACH, state = INQUIRY,<br>
> src =<br>
> > > > /dev/mmcsd-0<br>
> > > > media listener: event = PARTITION ATTACH, state = SUCCESS,<br>
> src =<br>
> > > > /dev/mmcsd-0, dest = /dev/mmcsd-0-0<br>
> > > > media listener: event = MOUNT, state = INQUIRY, src =<br>
> /dev/mmcsd-0-0<br>
> > > > media listener: event = MOUNT, state = SUCCESS, src =<br>
> > /dev/mmcsd-0-0,<br>
> > > > dest = /media/mmcsd-0-0<br>
> > > > media listener: event = DISK ATTACH, state = INQUIRY, src<br>
> = mmcsd<br>
> > > > media listener: event = DISK ATTACH, state = SUCCESS, src =<br>
> > mmcsd, dest<br>
> > > > = /dev/mmcsd-1<br>
> > > > media listener: event = MOUNT, state = INQUIRY, src =<br>
> /dev/mmcsd-1<br>
> > > > mmcsd1: 4GB <MMCHC MMC04G 5.8 SN 160D224B MFG 09/2014 by 112<br>
> > 0x0000> at<br>
> > > > mmc1 48.0MHz/8bit/65535-block<br>
> > > > media listener: event = MOUNT, state = FAILED, src =<br>
> /dev/mmcsd-1<br>
> > > > media listener: event = PARTITION INQUIRY, state =<br>
> INQUIRY, src =<br>
> > > > /dev/mmcsd-1<br>
> > > > media listener: event = PARTITION INQUIRY, state = FAILED,<br>
> src =<br>
> > > > /dev/mmcsd-1<br>
> > > > media listener: event = DISK ATTACH, state = INQUIRY, src =<br>
> > 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<br>
> could not be<br>
> > > > > mounted after timeout".<br>
> > > > > Even after raising the waiting time.<br>
> > > > ><br>
> > > > > The sources I use start here:<br>
> > > > ><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,<br>
> src = mmcsd<br>
> > > > > media listener: event = DISK ATTACH, state = SUCCESS, src =<br>
> > mmcsd, dest<br>
> > > > > = /dev/mmcsd-0<br>
> > > > > media listener: event = MOUNT, state = INQUIRY, src =<br>
> /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<br>
> > 2.00/1.00, addr 1><br>
> > > > > on usbus0<br>
> > > > > uhub1: <Mentor Graphics OTG Root HUB, class 9/0, rev<br>
> > 2.00/1.00, addr 1><br>
> > > > > on usbus1<br>
> > > > > media listener: event = MOUNT, state = FAILED, src =<br>
> /dev/mmcsd-0<br>
> > > > > media listener: event = PARTITION INQUIRY, state =<br>
> INQUIRY, src =<br>
> > > > > /dev/mmcsd-0<br>
> > > > > media listener: event = PARTITION INQUIRY, state =<br>
> SUCCESS, src =<br>
> > > > > /dev/mmcsd-0<br>
> > > > > media listener: event = PARTITION ATTACH, state =<br>
> INQUIRY, src =<br>
> > > > > /dev/mmcsd-0<br>
> > > > > media listener: event = PARTITION ATTACH, state =<br>
> SUCCESS, src =<br>
> > > > > /dev/mmcsd-0, dest = /dev/mmcsd-0-0<br>
> > > > > media listener: event = MOUNT, state = INQUIRY, src =<br>
> > /dev/mmcsd-0-0<br>
> > > > > media listener: event = MOUNT, state = FAILED, src =<br>
> > /dev/mmcsd-0-0<br>
> > > > > media listener: event = DISK ATTACH, state = INQUIRY,<br>
> src = mmcsd<br>
> > > > > media listener: event = DISK ATTACH, state = SUCCESS, src =<br>
> > mmcsd, dest<br>
> > > > > = /dev/mmcsd-1<br>
> > > > > media listener: event = MOUNT, state = INQUIRY, src =<br>
> /dev/mmcsd-1<br>
> > > > > media listener: event = MOUNT, state = FAILED, src =<br>
> /dev/mmcsd-1<br>
> > > > > media listener: event = PARTITION INQUIRY, state =<br>
> INQUIRY, src =<br>
> > > > > /dev/mmcsd-1<br>
> > > > > media listener: event = PARTITION INQUIRY, state =<br>
> SUCCESS, src =<br>
> > > > > /dev/mmcsd-1<br>
> > > > > media listener: event = PARTITION ATTACH, state =<br>
> INQUIRY, src =<br>
> > > > > /dev/mmcsd-1<br>
> > > > > media listener: event = PARTITION ATTACH, state =<br>
> SUCCESS, src =<br>
> > > > > /dev/mmcsd-1, dest = /dev/mmcsd-1-0<br>
> > > > > media listener: event = MOUNT, state = INQUIRY, src =<br>
> > /dev/mmcsd-1-0<br>
> > > > > media listener: event = MOUNT, state = FAILED, src =<br>
> > /dev/mmcsd-1-0<br>
> > > > > media listener: event = DISK ATTACH, state = INQUIRY, src =<br>
> > 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<br>
> > <<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a> <mailto:<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> <mailto:<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> <mailto:<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> <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<br>
> > 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>
> > > > > <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>
> > > > > <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<br>
> > libbsdhelper_init_sd_card()<br>
> > > > > and libbsdhelper_wait_for_sd().<br>
> > > > ><br>
> > > > > Please note that the SD card needs quite some time to<br>
> > 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> <mailto:<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a>><br>
> <mailto:<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a> <mailto:<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> <mailto:<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a>><br>
> <mailto:<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a> <mailto:<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>
> > --<br>
> > --<br>
> > --------------------------------------------<br>
> > embedded brains GmbH<br>
> > Herr Christian Mauderer<br>
> > Dornierstr. 4<br>
> > D-82178 Puchheim<br>
> > Germany<br>
> > email: <a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a><br>
> <mailto:<a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a>><br>
> > <mailto:<a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a><br>
> <mailto:<a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a>>><br>
> > Phone: +49-89-18 94 741 - 18<br>
> > Fax: +49-89-18 94 741 - 08<br>
> > PGP: Public key available on request.<br>
> ><br>
> > Diese Nachricht ist keine geschäftliche Mitteilung im Sinne<br>
> des EHUG.<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > users mailing list<br>
> > <a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a> <mailto:<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>
</blockquote></div></div>
</blockquote></div>