1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-22 18:12:27 +02:00

add-openocd-script.patch

This is the script for gta03 load by openocd.  We use the single qi
image for all purposes now so U-Boot lowlevel_foo style crap is dead.

We have to run the first part of init before copying qi image to
TEXT_BASE (0x33000000) because DRAM is not functional until then.

Fixed branchthrough at 0x8 is used as a place to hang the breakpoint.

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green 2008-11-28 10:16:37 +00:00 committed by Andy Green
parent 4542548a35
commit d06a3c2c3a
2 changed files with 45 additions and 4 deletions

33
qiboot/gta03-qi.ocd Executable file
View File

@ -0,0 +1,33 @@
# gta03 Qi script
# Andy Green <andy@openmoko.com>
reset halt
wait_halt
# bring the steppingstone part of qi image into steppingstone
#
load_binary /projects/openmoko/bootloader/image/qi 0x0
#
# mark ourselves as JTAG load
#
mww 0x4 0xffffffff
#
# we have to run that so SDRAM exists in a usable way
# fixed jumpthrough at 0x8 is executed after steppingstone
# init (including RAM) has completed
#
bp 0x8 4 hw
resume 0x0
wait_halt
rbp 0x8
#
# now prep the SDRAM
#
load_binary /projects/openmoko/bootloader/image/qi 0x33000000
#
# and continue...
resume 0x8
#

View File

@ -28,6 +28,17 @@ _start: b start_code
_is_jtag:
.word 0
/* it's at a fixed address (+0x8) so we can breakpoint it in the JTAG script
* we need to go through this hassle because before this moment, SDRAM is not
* working so we can't prep it from JTAG
*/
_steppingstone_done:
ldr pc, _start_armboot
_start_armboot:
.word start_qi
_TEXT_BASE:
.word TEXT_BASE
@ -192,10 +203,7 @@ clbss_l:
/* we are going to jump into the C part of the init now */
spin:
ldr pc, _start_armboot
_start_armboot:
.word start_qi
b _steppingstone_done
/*
*************************************************************************