OMAP3 boot ROM UART download utility

Hi,

using the protocol description in sprufd6.pdf

http://focus.ti.com/dsp/docs/dspsupporttechdocsc.tsp?sectionId=3&tabId=409&familyId=1526&abstractName=sprufd6

(section 1.4.4) and DaVinci serial download utility as a starting point, I just tried to create an OMAP3 boot ROM UART download utility. And, well, failed :wink:

Two files (target and host) for easy review and complete project in attachment.

The host tool should wait for the ASIC ID of OMAP3 (which it gets) and then it sends 0xF0030002 (peripheral boot), image size (example image has 136 bytes) and then the 136 bytes image.

It is my understanding that the target image is loaded into internal SRAM to 0x40200000 and immediately when size bytes (here 136) of image are downloaded the processor jumps to 0x40200000 executing the code there.

Assuming this, I thougt example code can just write "Hello OMAP3" to UART3 THR register in infinite loop. Then attaching with terminal
program should give infinite hello message. But I get nothing :frowning:

Any ideas?

Many thanks

Dirk

omap3_serial_test.txt (1.71 KB)

omap3_sload.txt (8.74 KB)

omap3_serial.tar.bz2 (4.83 KB)

Dirk,

Dirk Behme said the following on 04/13/2008 04:45 AM:

Hi,

using the protocol description in sprufd6.pdf

Digital signal processors (DSPs) | TI.com

(section 1.4.4) and DaVinci serial download utility as a starting
point, I just tried to create an OMAP3 boot ROM UART download utility.
And, well, failed :wink:

Two files (target and host) for easy review and complete project in
attachment.

The host tool should wait for the ASIC ID of OMAP3 (which it gets) and
then it sends 0xF0030002 (peripheral boot), image size (example image
has 136 bytes) and then the 136 bytes image.

It is my understanding that the target image is loaded into internal
SRAM to 0x40200000 and immediately when size bytes (here 136) of image
are downloaded the processor jumps to 0x40200000 executing the code there.

Assuming this, I thougt example code can just write "Hello OMAP3" to
UART3 THR register in infinite loop. Then attaching with terminal
program should give infinite hello message. But I get nothing :frowning:
  

i have a part patch (attached which i have been trying with).w.r.t
x-loader.. But the result is same as you: No Luck yet!!

mine is based on
http://openlabrador.org/pub/bootloader/serial-boot.tar.gz - rather
simple perl script :wink:

I have not had time to playaround yet.. but essentially the same logic..

however, i am trying to get x-loader talking over SRAM to UART.. not
much luck yet.. (I got myself a new router and been getting it
customized :D)..

So probably later today a better working patch? I am suspecting clock,
pin mux and the usual bottlenecks..

Regards,
NM

x-loader.download.patch (23 KB)

Nishanth,

Nishanth Menon wrote:

Dirk,

Dirk Behme said the following on 04/13/2008 04:45 AM:

Hi,

using the protocol description in sprufd6.pdf

Digital signal processors (DSPs) | TI.com

(section 1.4.4) and DaVinci serial download utility as a starting point, I just tried to create an OMAP3 boot ROM UART download utility. And, well, failed :wink:

Two files (target and host) for easy review and complete project in attachment.

The host tool should wait for the ASIC ID of OMAP3 (which it gets) and then it sends 0xF0030002 (peripheral boot), image size (example image has 136 bytes) and then the 136 bytes image.

It is my understanding that the target image is loaded into internal SRAM to 0x40200000 and immediately when size bytes (here 136) of image are downloaded the processor jumps to 0x40200000 executing the code there.

Assuming this, I thougt example code can just write "Hello OMAP3" to UART3 THR register in infinite loop. Then attaching with terminal
program should give infinite hello message. But I get nothing :frowning:

i have a part patch (attached which i have been trying with).w.r.t
x-loader.. But the result is same as you: No Luck yet!!

mine is based on
http://openlabrador.org/pub/bootloader/serial-boot.tar.gz - rather
simple perl script :wink:

I have not had time to playaround yet.. but essentially the same logic..

however, i am trying to get x-loader talking over SRAM to UART.. not
much luck yet.. (I got myself a new router and been getting it
customized :D)..

So probably later today a better working patch? I am suspecting clock,
pin mux and the usual bottlenecks..

I tried what you proposed in [1], still without luck.

Do you like to have look to attachment? Maybe you see what I'm missing :wink:

Cheers

Dirk

[1] http://www.beagleboard.org/irclogs/index.php?date=2008-04-13#T15:09:36

omap3_target.S (4.57 KB)

Dirk,

Dirk Behme said the following on 04/20/2008 12:56 PM:
>
> I tried what you proposed in [1], still without luck.
>
> Do you like to have look to attachment? Maybe you see what I'm missing :wink:
Yes. will do that on monday. kind of tied up today with house chores and
beagle is away for upgrades.. :(..

got my board finally and made some time to look at this.. I got the
LEDs to glow.. but I cant get them to blink (they wont go off now)
:(.. Setting either GPIO-149 or 150 seem to glow both USR0 and USR1
LEDs together :(.. probably I am missing something else.. been
scratching my head for last couple of hours without much use..
probably I gotta hibernate now and look at it afresh later..

By the way, I did get USB peripheral download working with a tiny
variant of the testusb example file. - it detects on windows, but not
much luck without a filter driver.. Linux did work in a breeze without
a kernel driver :slight_smile: - the required data was all in the public TRM :slight_smile:

Regards,
Nishanth Menon

omap3_serial_test.S (5.17 KB)

omap_peripheral_usb.c (12.7 KB)

The USER LEDS are shorted on the Beagle board and they cannot be
controlled individually. You need to control both GPIO_149 and GPIO_150
to control the LEDs.

Gerald

Dirk,

Dirk Behme said the following on 04/20/2008 12:56 PM:
>
> I tried what you proposed in [1], still without luck.
>
> Do you like to have look to attachment? Maybe you see what I'm
missing :wink: Yes. will do that on monday. kind of tied up today with
house chores and beagle is away for upgrades.. :(..

got my board finally and made some time to look at this.. I got the LEDs
to glow.. but I cant get them to blink (they wont go off now) :(..
Setting either GPIO-149 or 150 seem to glow both USR0 and USR1 LEDs
together :(.. probably I am missing something else.. been scratching my
head for last couple of hours without much use.. probably I gotta
hibernate now and look at it afresh later..

By the way, I did get USB peripheral download working with a tiny
variant of the testusb example file. - it detects on windows, but not
much luck without a filter driver.. Linux did work in a breeze without a
kernel driver :slight_smile: - the required data was all in the public TRM :slight_smile:

Regards,
Nishanth Menon

Gerald,

The USER LEDS are shorted on the Beagle board and they cannot be
controlled individually. You need to control both GPIO_149 and GPIO_150
to control the LEDs.

Thanks. yep. it works now.

Dirk,
Looking at the problem on a full stomach helped :wink:

Attached code gives blinky blinky LEDs frequency of 1Hz. Kinda round
about way to test 32Khz clock though ;).. did not add print code
though..

Regards,
Nishanth Menon

omap3_serial_test.S (5.69 KB)

Nishanth Menon wrote:

Gerald,

The USER LEDS are shorted on the Beagle board and they cannot be
controlled individually. You need to control both GPIO_149 and GPIO_150
to control the LEDs.

Thanks. yep. it works now.

YES! Great!

Dirk,
Looking at the problem on a full stomach helped :wink:

Attached code gives blinky blinky LEDs frequency of 1Hz. Kinda round
about way to test 32Khz clock though ;).. did not add print code
though..

It works for me, too! But only using USB download

http://groups.google.com/group/beagleboard/browse_thread/thread/2b9e99886bb7a747

Using serial tool

http://groups.google.com/group/beagleboard/browse_thread/thread/80ad3da0eb2aa555

fails. Have to look into this. Haven't tried

http://www.omapzoom.org/pub/bootloader/serial-boot.tar.gz

though.

Next steps:

- I will add Nishanth's (c), repackage the stuff and then send it to this list in a new thread we can link to from wiki page. With this, people can get everything with one download.

- Now that we have a download/debug (LEDs) tooling, we should start to discuss how download/flash target code should look like. Will start an new thread for this, too.

Many thanks for this code

Dirk

It works for me, too! But only using USB download

Cool...

- I will add Nishanth's (c), repackage the stuff and then send it to
this list in a new thread we can link to from wiki page. With this,
people can get everything with one download.

Done.. attached. (I did change the original name of Dirk'sGames to
omap3_peripheral :wink:

- Now that we have a download/debug (LEDs) tooling, we should start to
discuss how download/flash target code should look like. Will start an
new thread for this, too.

Aaah.. an area at least for the moment I cannot enter.
Regards,
Nishanth Menon

omap3_peripheral_test.tar.bz2 (751 KB)

Just resumed work after some fever and FLU - Badly HIT :frowning:

This is really great work, sorry Nishanth was not able to test your images
before. Will check this out and add them on code.google.com.

Regards,
Khasim

Nishanth Menon wrote:

mine is based on
http://openlabrador.org/pub/bootloader/serial-boot.tar.gz - rather
simple perl script :wink:

Testing this I get

-- cut --
> ./serial-boot.pl -p /dev/ttyUSB0 -s omap3_target.bin -d 1
BYTES=348 file_bytes=5c010000 prefix_bytes=020003f0 string bytes=020003f05c010000
----Please reset the Board NOW (timeout=30 sec)----
1 2 3 4 5 46 07 8 T9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Board Detected
.
TIOCSERGETLSR(21593) ioctl failed: The argument is invalid at ./serial-boot.pl line 374
waiting for draining 40
TIOCSERGETLSR(21593) ioctl failed: The argument is invalid at ./serial-boot.pl line 374
waiting for draining 39
...
TIOCSERGETLSR(21593) ioctl failed: The argument is invalid at ./serial-boot.pl line 374
waiting for draining 1
> Unable To send File Size at ./serial-boot.pl line 127.
-- cut --

Dirk