dwelch67 / raspberrypi

Raspberry Pi ARM based bare metal examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More detailed bootloader example steps

beriberikix opened this issue · comments

I've tried a bunch of different combinations of upload to upload the src using the bootloader but without any luck. Would it be possible to share the exact commands/steps you use?

For example, I am using bootloader07 from boards/pizero. I got the expected serial output rather easily. I then modify an output string and try to upload. I am unable to successfully upload the .hex using either minicom or CoolTerm (I'm on a mac.)

Any guidance would be much appreciated!

So with minicom if you are seeing the IHEX thing you are a long way
there. I assume no config.txt file is being used.

I use ctrl-a then press s and it gives you a text menu zmodem, ymodem,
xmodem, kermit and ascii are what mine show.

I either up arrow once or down arrow a few to ascii. then hit enter two
times and it gives a No file selected - enter filename: Enter the
path/filename to the .hex file. My experience is that if you launch
minicom in the same directory where you keep the .hex file you dont need
to supply a path, their menu is clunky but functions if you want to
navigate using the goto at the bottom and such.

Then after it has downloaded the file, press g and that causes the
bootloader to jump to 0x8000 to run the program.

     if((ra=='g')||(ra=='G'))
     {
         uart_send(0x0D);
         uart_send('-');
         uart_send('-');
         uart_send(0x0D);
         uart_send(0x0A);
         uart_send(0x0A);
         BRANCHTO(0x8000);
         state=0;
         break;
     }

The program has to be built for 0x8000, see the blinker examples, build
and try one of those.

David

On 08/22/2016 12:59 AM, Jonathan Beri wrote:

I've tried a bunch of different combinations of upload to upload the src
using the bootloader but without any luck. Would it be possible to share
the exact commands/steps you use?

For example, I am using |bootloader07| from |boards/pizero.| I got the
expected serial output rather easily. I then modify an output string and
try to upload. I am unable to successfully upload the .hex using either
minicom or CoolTerm (I'm on a mac.)

Any guidance would be much appreciated!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#23, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXjrKYMP6-nHlFBjf4Du3wBlLcVFnI3ks5qiSy6gaJpZM4Jpg1c.

Thanks for the reply! I put together a short clip of what I'm seeing here.

In the video I try to show that serial is clearly working. I updated the string the gets outputted before I recompile. When I try to upload using ascii, it seems to fail as you can see from the output.

Any obvious things I'm doing wrong? Any suggestions?

Update: using CoolTerm to send the file worked! Pressing g does the trick. Tried it with a few of the blinkers and uart examples. Not sure why the same doesn't work with minicom but I'll ignore that for now.

In case anyone else doesn't realize the obvious like me, the bootloader loads the file in memory and not onto the SD card. If you want to save something to load after restart you'll still have to right the kernel.img to the card. FYI!

Okay from the video you already have bootloader07 running you dont
need/want to re-load bootloader from the bootloader, it should in theory
stomp on itself. you use the bootloder to load and run other programs
like blinker01, etc. any of the other programs not the bootloader.

David

On 08/22/2016 11:39 PM, Jonathan Beri wrote:

Thanks for the reply! I put together a short clip of what I'm seeing
here https://youtu.be/ZJw4Yl4aDLQ.

In the video I try to show that serial is clearly working. I updated the
string the gets outputted before I recompile. When I try to upload using
|ascii|, it seems to fail as you can see from the output.

Any obvious things I'm doing wrong? Any suggestions?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#23 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXjrAqM-ACaz4JffOyeZlSpbC0kR_I7ks5qimtWgaJpZM4Jpg1c.