<p dir="ltr"><br>
On Jun 29, 2015 5:33 PM, "Ed Sutter" <<a href="mailto:edsutterjr@gmail.com">edsutterjr@gmail.com</a>> wrote:<br>
><br>
> Jarielle,<br>
> Ok, I think I may have stumbled on some "hope" for the  boot-from-sd card stuff...<br>
> I'm looking at the cpuio.c that is currently in master and unless I'm missing something,<br>
> it appears to be incomplete.  That incompleteness may explain why your uSD boot<br>
> attempts didn't succeed.  Here's what I'm thinking...<br>
></p>
<p dir="ltr">You are correct, I have not completed the cpuio.c file yet.  I was planning to update it and implement the parts as I proceeded with the porting process.  I believe that you're absolutely right about the incompleteness being the cause of the uSD boot to fail.</p>
<p dir="ltr">> When the rom bootloader starts up, it first attempts to boot from SD card, then if that<br>
> fails it falls through to the UART.  When we do the boot from UART stuff, it works, but I<br>
> think the current version in master is working "luckily"...<br>
> Think about it... for the bootloader in ROM to interact with the UART to run an XMODEM<br>
> download, IT has to initialize the UART.  So, the code it downloads (boot.bin) doesn't even<br>
> have to do that and it will still appear to work.<br>
></p>
<p dir="ltr">I think you might be onto something.  I was assuming that I didn't have to worry about initializing the UART as I was under the impression that since it was already working it wasn't something I had to worry about.  I have no doubt that my assumption could be wrong all along.</p>
<p dir="ltr">> Now, if we're trying to use that same boot.bin to boot from SD (earlier in the boot sequence<br>
> than the UART; hence possibly the UART is not initialized) , then its possible that the<br>
> bootloader hasn't initialized the UART at the time of the SD boot attempt.  That would<br>
> mean that our current boot.bin would not boot properly because it doesn't have the code in<br>
> it to initialize the UART.<br>
><br>
> Know what I mean?</p>
<p dir="ltr">It makes perfect sense.  After my attempts at uSD booting, I was already suspecting that it could be the boot.bin file all along that's causing the uSD boot to not come through.  I just did not know how to verify at the time during my attempts.  Hence why it motivated me to get a JTAG debugger.</p>
<p dir="ltr">><br>
> I believe I have that UART initialization code.  My version of this (which I did about 6 weeks<br>
> back) has the UART initialization in there.  Its hard to tell if its right, simply because it still<br>
> may be depending on the bootloader's initialization for something; however, I *think* its<br>
> correct.<br>
><br>
> Am I making any sense?</p>
<p dir="ltr">Crystal clear. I will look into this right now.</p>
<p dir="ltr">> Ed<br>
> _______________________________________________<br>
> umon-devel mailing list<br>
> <a href="mailto:umon-devel@rtems.org">umon-devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/umon-devel">http://lists.rtems.org/mailman/listinfo/umon-devel</a><br>
</p>