DSPRelated.com
Forums

question about 5410bootloader

Started by callbackcn September 7, 2004
Hi,everyone.
I've got big problem with bootloader.
I allocated my program to 0x18000,and it cannot
download by the ccs at the first time. but after I download a program
without use of mem 0x18000-0x1ffff and run it,then my program can
download and works well.

But now,the questions comes,how can I boot from external flash?
it seems that the on-chip bootloader cannot write my code from flash
(located at 0x8000-0xffff)to 0x18000. I wondered whether the 0x18000-
0x1ffff rigion can be accessed by the bootloader? if not,how can i
correct it?
Can anyone give some sugestions? any advice would be appreciated.

below is my .cmd file
-c
MEMORY
{
PAGE 0:
VECS: origin = 0x300, len = 0x100
PROGH: origin = 0x18000, len = 0x8000
PAGE 1:
BIOSREGS: origin = 0x7c, len = 0x4
}

SECTIONS
{
vectors: {} > VECS
.text {} > PROGH PAGE 0
}



callbackcn wrote:

> Hi,everyone.
> I've got big problem with bootloader.
> I allocated my program to 0x18000,and it cannot
> download by the ccs at the first time. but after I download a program
> without use of mem 0x18000-0x1ffff and run it,then my program can
> download and works well.

This sounds like the memory map registers (PMST, BSCR, etc.) aren't
setup by your load script.

>
> But now,the questions comes,how can I boot from external flash?
> it seems that the on-chip bootloader cannot write my code from flash
> (located at 0x8000-0xffff)to 0x18000. I wondered whether the 0x18000-
> 0x1ffff rigion can be accessed by the bootloader? if not,how can i
> correct it?
> Can anyone give some sugestions? any advice would be appreciated.
>
> below is my .cmd file
> -c
> MEMORY
> {
> PAGE 0:
> VECS: origin = 0x300, len = 0x100
> PROGH: origin = 0x18000, len = 0x8000
> PAGE 1:
> BIOSREGS: origin = 0x7c, len = 0x4
> }
>
> SECTIONS
> {
> vectors: {} > VECS
> .text {} > PROGH PAGE 0
> }

If you are tyring to use the bootloader to boot from flash I'm of no
help. What I do is map may flash into 0x8000-0xFFFF so that the reset
vector at 0xFFFE/F can be used to boot the system.

Brian --
-----------------
Brian C. Lane (W7BCL) Programmer
www.shinemicro.com RF, DSP & Microcontroller Design


Callback China-

> I've got big problem with bootloader.
> I allocated my program to 0x18000,and it cannot
> download by the ccs at the first time. but after I download a program
> without use of mem 0x18000-0x1ffff and run it,then my program can
> download and works well.
>
> But now,the questions comes,how can I boot from external flash?
> it seems that the on-chip bootloader cannot write my code from flash
> (located at 0x8000-0xffff)to 0x18000. I wondered whether the 0x18000-
> 0x1ffff rigion can be accessed by the bootloader? if not,how can i
> correct it?
> Can anyone give some sugestions? any advice would be appreciated.

Suggest to try Tektronix 32-bit format. The generated .rom file will contain
program (instruction) information that spans 20-bit address space. However,
note that in this case 2 files will be generated, the
second one (with .x10 extension) for data information (limited to 64k addresss
space).

-Jeff




>Hi,everyone.
> I've got big problem with bootloader.
> I allocated my program to 0x18000,and it cannot
>download by the ccs at the first time. but after I download a program
>without use of mem 0x18000-0x1ffff and run it,then my program can
>download and works well.
check CCS GEL initialize script and core register initizlize code.

> But now,the questions comes,how can I boot from external flash?
>it seems that the on-chip bootloader cannot write my code from flash
>(located at 0x8000-0xffff)to 0x18000. I wondered whether the 0x18000-
>0x1ffff rigion can be accessed by the bootloader? if not,how can i
>correct it?
> Can anyone give some sugestions? any advice would be appreciated.

The HEX convert utility makes boot table that contains entry address
initial value of XPC:PC and destination section address with XPC:PC
form. so, hex file must not need to descripted withextended address
range. Boot loader do just copying 0x8000-(flash)to 0x18000-(internal)
and branch 0x18000(it's value describedin hex.cmd) hex.cmd like this...

---

foo.out
-o foo.hex
-map foo.hmp
/*-e 02000h*/ /* boot entry */
-e 18000h /* boot entry .text start ? */
-boot /* convert all sections into bootable form */
ROMS {
ROM: org 00h, length 00h, romwidth, memwidth
}

/* ===== EPROM format ===== */
-m1 /* motorola -S1 for DSK FLASH */
/* -i *//* intel hex */
-image /* valid for BOOT BLOCK */
-bootorg 8000h
-fill 8000h /* valid for BOOT BLOCK */

---

This cmd file generates 0x8000 byte length hexfile. it filled with
0x8000 value rest of code that indicates bootorg(boot loader header)
it's actually needs 0xfffe/0xffff.
see 5410 boot loader appnote SPRA609

hiro


--- In , Jeff Brower <jbrower@s...> wrote:
I've solved the problem. Everything is ok except I am negligent of
checking the program burned to the Flash.
I got no programmer,so I wrote a program to finish the job using the
onboard DSP and I failed to verify the data I wrote to Flash.

C54x bootloader can copy user code(located in external DATA-mem) to
any program space addressable owing to XPC(7) and PC(16) are
contained in the boot table. Thanks Jeff Brower,Brian C.Laine and f_abe for help,
wish you all have a nice day.

guohua/China(CHN)


GuoHua-

> I've solved the problem. Everything is ok except I am negligent of
> checking the program burned to the Flash.
> I got no programmer,so I wrote a program to finish the job using the
> onboard DSP and I failed to verify the data I wrote to Flash.
>
> C54x bootloader can copy user code(located in external DATA-mem) to
> any program space addressable owing to XPC(7) and PC(16) are
> contained in the boot table.
>
> Thanks Jeff Brower,Brian C.Laine and f_abe for help,
> wish you all have a nice day.

Ok good work. Ŀ

-Jeff