Forums

BOOT greater than 512KB

Started by mike...@hotmail.com July 5, 2007
Dear all.

We have a DM642 based card, and we build an aplication and then we convert
coff file to ascii hex to program flash.
But the hex file it's greater than 512 KB.
We need to select on boot.asm external address to cover range greater than
512KB of the flash. We have a CPLD that has a register ,located at
0xA000081,that manages external address like A19 to A24.
What modifications i have to do on boot.asm to boot can load all data from
flash to SDRAM.
I did this:
stw a3,*+b15[0x6]
nop 2
mvk 0x0081,a3
|| or 0,a3,b5
mvkh 0xa0000000,a3
|| extu b5,10,29,b5
stb b5,*+a3[0x0]
nop 2
ldw *+b15[0x6],a3
nop 4

when i copy something from flash to SDRAM but it doesn't work.
Anyone has idea how can i do that?

Best regards,

Rui Silva
Rui-

> We have a DM642 based card, and we build an aplication and then we convert
> coff file to ascii hex to program flash.
> But the hex file it's greater than 512 KB.
> We need to select on boot.asm external address to cover range greater than
> 512KB of the flash.

It's not clear to me whether your issue is mem size limit on the DM642 (256 kbyte) or
small Flash size (512 kbyte would be a very small Flash)... the only boot-related
comment I would make is that you need to make sure SDRAM is fully initialized in
boot.asm before you can write to it. All EMIF registers have to be initialized.

Also I would point a tools-related issue that might affect you: v5.x.0 versions of
hex6x utility may produce output that does not correctly show a section if the
section is larger than 500 kbyte. This seems to be corrected using v6.0.8 of
hex6x.exe. If you need more info on this bug please ask the TI Hotline and reference
bug report SDSCM00014482.

-Jeff

> We have a CPLD that has a register ,located at
> 0xA000081,that manages external address like A19 to A24.
> What modifications i have to do on boot.asm to boot can load all data from
> flash to SDRAM.
> I did this:
> stw a3,*+b15[0x6]
> nop 2
> mvk 0x0081,a3
> || or 0,a3,b5
> mvkh 0xa0000000,a3
> || extu b5,10,29,b5
> stb b5,*+a3[0x0]
> nop 2
> ldw *+b15[0x6],a3
> nop 4
>
> when i copy something from flash to SDRAM but it doesn't work.
> Anyone has idea how can i do that?
>
> Best regards,
>
> Rui Silva
Rui-

Thanks for the explanation, now I see what you're worried about.

DM642 EMIFA has 23 addr lines for async peripherals. Look for ABEnn signals in the
data sheet ("byte enables"). You should be fine up to 8 Mbyte.

-Jeff

PS. Please post to the group, not to me.
"Rui Silva@Hotmail" wrote:
>
> Hi Jeff,
>
> Thanks for your attention and reply to my problem, but I think you do not
> understand my problem.
> I have an application (h264 encoder) that when compiled and built, the coff
> file has 2 MB of size, composed with various sections.
> I want to make a bootloader application that after an internal or external
> reset, boot the encoder.
> The bootloader after initialize EMIFA it will load all data (sections) from
> flash, but EMIFA has only 19 address line (A22 to A3) and with this address
> line I will be able to load only 512 KB (0x80000) and I need to load 2 MB.
> To solve that I have 4 external address line provided by a CPLD.
> On boot process I will need to manage that external address line to charge
> all data from flash.
>
> Today I have an idea. Make a boot load that will copy a first application
> from flash, that first application will copy from flash the real application
> (h264 encoder) and put sections on the right place, and finaly I will jump
> to another entry point. But I don't know how can I jump to the new entry
> point on C style.
>
> Do you understand my problem now?? What you think about my idea?? It will
> work??Do you know how can I do that branch??
>
> Or do you have another idea?
>
> Thanks once more.
>
> Best regards,
>
> Rui Silva
>
> -----Original Message-----
> From: Jeff Brower [mailto:j...@signalogic.com]
> Sent: sexta-feira, 6 de Julho de 2007 22:54
> To: Rui Silva
> Cc: c...
> Subject: Re: [c6x] BOOT greater than 512KB
>
> Rui-
>
> > We have a DM642 based card, and we build an aplication and then we convert
> > coff file to ascii hex to program flash.
> > But the hex file it's greater than 512 KB.
> > We need to select on boot.asm external address to cover range greater than
> > 512KB of the flash.
>
> It's not clear to me whether your issue is mem size limit on the DM642 (256
> kbyte) or
> small Flash size (512 kbyte would be a very small Flash)... the only
> boot-related
> comment I would make is that you need to make sure SDRAM is fully
> initialized in
> boot.asm before you can write to it. All EMIF registers have to be
> initialized.
>
> Also I would point a tools-related issue that might affect you: v5.x.0
> versions of
> hex6x utility may produce output that does not correctly show a section if
> the
> section is larger than 500 kbyte. This seems to be corrected using v6.0.8
> of
> hex6x.exe. If you need more info on this bug please ask the TI Hotline and
> reference
> bug report SDSCM00014482.
>
> -Jeff
>
> > We have a CPLD that has a register ,located at
> > 0xA000081,that manages external address like A19 to A24.
> > What modifications i have to do on boot.asm to boot can load all data from
> > flash to SDRAM.
> > I did this:
> > stw a3,*+b15[0x6]
> > nop 2
> > mvk 0x0081,a3
> > || or 0,a3,b5
> > mvkh 0xa0000000,a3
> > || extu b5,10,29,b5
> > stb b5,*+a3[0x0]
> > nop 2
> > ldw *+b15[0x6],a3
> > nop 4
> >
> > when i copy something from flash to SDRAM but it doesn't work.
> > Anyone has idea how can i do that?
> >
> > Best regards,
> >
> > Rui Silva
Jeff thanks again,

To use ABEnn signals born another problem. I have an DM642 based board and
that signals are not connected and i dont have access to him.
That are not the best solution! What you think about my idea on previous
mail??
Do you know how can I branch to a new entry point (_c_int00) on C style?
Or do you have a better solution for my problem??

Best regards,

Rui Silva

-----Original Message-----
From: Jeff Brower [mailto:j...@signalogic.com]
Sent: sado, 7 de Julho de 2007 0:37
To: Rui Silva
Cc: c...
Subject: Re: [c6x] BOOT greater than 512KB

Rui-

Thanks for the explanation, now I see what you're worried about.

DM642 EMIFA has 23 addr lines for async peripherals. Look for ABEnn signals
in the
data sheet ("byte enables"). You should be fine up to 8 Mbyte.

-Jeff

PS. Please post to the group, not to me.
"Rui Silva@Hotmail" wrote:
>
> Hi Jeff,
>
> Thanks for your attention and reply to my problem, but I think you do not
> understand my problem.
> I have an application (h264 encoder) that when compiled and built, the
coff
> file has 2 MB of size, composed with various sections.
> I want to make a bootloader application that after an internal or external
> reset, boot the encoder.
> The bootloader after initialize EMIFA it will load all data (sections)
from
> flash, but EMIFA has only 19 address line (A22 to A3) and with this
address
> line I will be able to load only 512 KB (0x80000) and I need to load 2
MB.
> To solve that I have 4 external address line provided by a CPLD.
> On boot process I will need to manage that external address line to charge
> all data from flash.
>
> Today I have an idea. Make a boot load that will copy a first application
> from flash, that first application will copy from flash the real
application
> (h264 encoder) and put sections on the right place, and finaly I will jump
> to another entry point. But I don't know how can I jump to the new entry
> point on C style.
>
> Do you understand my problem now?? What you think about my idea?? It will
> work??Do you know how can I do that branch??
>
> Or do you have another idea?
>
> Thanks once more.
>
> Best regards,
>
> Rui Silva
>
> -----Original Message-----
> From: Jeff Brower [mailto:j...@signalogic.com]
> Sent: sexta-feira, 6 de Julho de 2007 22:54
> To: Rui Silva
> Cc: c...
> Subject: Re: [c6x] BOOT greater than 512KB
>
> Rui-
>
> > We have a DM642 based card, and we build an aplication and then we
convert
> > coff file to ascii hex to program flash.
> > But the hex file it's greater than 512 KB.
> > We need to select on boot.asm external address to cover range greater
than
> > 512KB of the flash.
>
> It's not clear to me whether your issue is mem size limit on the DM642
(256
> kbyte) or
> small Flash size (512 kbyte would be a very small Flash)... the only
> boot-related
> comment I would make is that you need to make sure SDRAM is fully
> initialized in
> boot.asm before you can write to it. All EMIF registers have to be
> initialized.
>
> Also I would point a tools-related issue that might affect you: v5.x.0
> versions of
> hex6x utility may produce output that does not correctly show a section if
> the
> section is larger than 500 kbyte. This seems to be corrected using v6.0.8
> of
> hex6x.exe. If you need more info on this bug please ask the TI Hotline
and
> reference
> bug report SDSCM00014482.
>
> -Jeff
>
> > We have a CPLD that has a register ,located at
> > 0xA000081,that manages external address like A19 to A24.
> > What modifications i have to do on boot.asm to boot can load all data
from
> > flash to SDRAM.
> > I did this:
> > stw a3,*+b15[0x6]
> > nop 2
> > mvk 0x0081,a3
> > || or 0,a3,b5
> > mvkh 0xa0000000,a3
> > || extu b5,10,29,b5
> > stb b5,*+a3[0x0]
> > nop 2
> > ldw *+b15[0x6],a3
> > nop 4
> >
> > when i copy something from flash to SDRAM but it doesn't work.
> > Anyone has idea how can i do that?
> >
> > Best regards,
> >
> > Rui Silva

Rui-

> To use ABEnn signals born another problem. I have an DM642 based board and
> that signals are not connected and i dont have access to him.
> That are not the best solution! What you think about my idea on previous
> mail??
> Do you know how can I branch to a new entry point (_c_int00) on C style?
> Or do you have a better solution for my problem??

I think you are overlooking a major problem -- the ABEnn signals need to be connected
to the Flash device. Otherwise, how can you correctly access the Flash? For example,
have you done write and read back tests? You know that writing to Flash requires
very specific address and data "command byte sequences", for example write pattern X
to addr A, write pattern Y to addr B, finally write data to desired addr. How can
you do that if the device is not correctly connected to the DSP EMIF? I don't even
know if that's possible, since A3-A22 would not be moving for every byte.

Maybe you should have a talk with the hardware design guys for your board.

-Jeff

> -----Original Message-----
> From: Jeff Brower [mailto:j...@signalogic.com]
> Sent: sado, 7 de Julho de 2007 0:37
> To: Rui Silva
> Cc: c...
> Subject: Re: [c6x] BOOT greater than 512KB
>
> Rui-
>
> Thanks for the explanation, now I see what you're worried about.
>
> DM642 EMIFA has 23 addr lines for async peripherals. Look for ABEnn signals
> in the
> data sheet ("byte enables"). You should be fine up to 8 Mbyte.
>
> -Jeff
>
> PS. Please post to the group, not to me.
>
> "Rui Silva@Hotmail" wrote:
> >
> > Hi Jeff,
> >
> > Thanks for your attention and reply to my problem, but I think you do not
> > understand my problem.
> > I have an application (h264 encoder) that when compiled and built, the
> coff
> > file has 2 MB of size, composed with various sections.
> > I want to make a bootloader application that after an internal or external
> > reset, boot the encoder.
> > The bootloader after initialize EMIFA it will load all data (sections)
> from
> > flash, but EMIFA has only 19 address line (A22 to A3) and with this
> address
> > line I will be able to load only 512 KB (0x80000) and I need to load 2
> MB.
> > To solve that I have 4 external address line provided by a CPLD.
> > On boot process I will need to manage that external address line to charge
> > all data from flash.
> >
> > Today I have an idea. Make a boot load that will copy a first application
> > from flash, that first application will copy from flash the real
> application
> > (h264 encoder) and put sections on the right place, and finaly I will jump
> > to another entry point. But I don't know how can I jump to the new entry
> > point on C style.
> >
> > Do you understand my problem now?? What you think about my idea?? It will
> > work??Do you know how can I do that branch??
> >
> > Or do you have another idea?
> >
> > Thanks once more.
> >
> > Best regards,
> >
> > Rui Silva
> >
> > -----Original Message-----
> > From: Jeff Brower [mailto:j...@signalogic.com]
> > Sent: sexta-feira, 6 de Julho de 2007 22:54
> > To: Rui Silva
> > Cc: c...
> > Subject: Re: [c6x] BOOT greater than 512KB
> >
> > Rui-
> >
> > > We have a DM642 based card, and we build an aplication and then we
> convert
> > > coff file to ascii hex to program flash.
> > > But the hex file it's greater than 512 KB.
> > > We need to select on boot.asm external address to cover range greater
> than
> > > 512KB of the flash.
> >
> > It's not clear to me whether your issue is mem size limit on the DM642
> (256
> > kbyte) or
> > small Flash size (512 kbyte would be a very small Flash)... the only
> > boot-related
> > comment I would make is that you need to make sure SDRAM is fully
> > initialized in
> > boot.asm before you can write to it. All EMIF registers have to be
> > initialized.
> >
> > Also I would point a tools-related issue that might affect you: v5.x.0
> > versions of
> > hex6x utility may produce output that does not correctly show a section if
> > the
> > section is larger than 500 kbyte. This seems to be corrected using v6.0.8
> > of
> > hex6x.exe. If you need more info on this bug please ask the TI Hotline
> and
> > reference
> > bug report SDSCM00014482.
> >
> > -Jeff
> >
> > > We have a CPLD that has a register ,located at
> > > 0xA000081,that manages external address like A19 to A24.
> > > What modifications i have to do on boot.asm to boot can load all data
> from
> > > flash to SDRAM.
> > > I did this:
> > > stw a3,*+b15[0x6]
> > > nop 2
> > > mvk 0x0081,a3
> > > || or 0,a3,b5
> > > mvkh 0xa0000000,a3
> > > || extu b5,10,29,b5
> > > stb b5,*+a3[0x0]
> > > nop 2
> > > ldw *+b15[0x6],a3
> > > nop 4
> > >
> > > when i copy something from flash to SDRAM but it doesn't work.
> > > Anyone has idea how can i do that?
> > >
> > > Best regards,
> > >
> > > Rui Silva
Rui-

I'm taking back what I wrote below. I looked at the EVM DM642 schematic and Spectrm Digital didn't connect byte
enable signals to Flash EEPROM either. So you should be able to get your "page" (bank select) method to work.

One possible way to get more (double) address range would be to specify 16-bit width for the Flash CEn space. That
would require your design to have the Byte/Word pin on the Flash pulled high/low as needed.

-Jeff

-------- Original Message --------------
Subject: Re: [c6x] BOOT greater than 512KB
From: "Jeff Brower"
Date: Fri, July 6, 2007 9:43 pm
To: "Rui Silva"
Cc: c...
----

Rui-

> To use ABEnn signals born another problem. I have an DM642 based board and that signals are not connected and i
dont have access to him.
> That are not the best solution! What you think about my idea on previous mail??
> Do you know how can I branch to a new entry point (_c_int00) on C style? Or do you have a better solution for my
problem??

I think you are overlooking a major problem -- the ABEnn signals need to be connected to the Flash device. Otherwise,
how can you correctly access the Flash? For example, have you done write and read back tests? You know that writing
to Flash requires very specific address and data "command byte sequences", for example write pattern X to addr A,
write pattern Y to addr B, finally write data to desired addr. How can you do that if the device is not correctly
connected to the DSP EMIF? I don't even know if that's possible, since A3-A22 would not be moving for every byte.

Maybe you should have a talk with the hardware design guys for your board.

-Jeff

> -----Original Message-----
> From: Jeff Brower [mailto:j...@signalogic.com]
> Sent: sado, 7 de Julho de 2007 0:37
> To: Rui Silva
> Cc: c...
> Subject: Re: [c6x] BOOT greater than 512KB
>
> Rui-
>
> Thanks for the explanation, now I see what you're worried about.
>
> DM642 EMIFA has 23 addr lines for async peripherals. Look for ABEnn signals in the
> data sheet ("byte enables"). You should be fine up to 8 Mbyte.
>
> -Jeff
>
> PS. Please post to the group, not to me.
>
> "Rui Silva@Hotmail" wrote:
> >
> > Hi Jeff,
> >
> > Thanks for your attention and reply to my problem, but I think you do not understand my problem.
> > I have an application (h264 encoder) that when compiled and built, the
> coff
> > file has 2 MB of size, composed with various sections.
> > I want to make a bootloader application that after an internal or external reset, boot the encoder.
> > The bootloader after initialize EMIFA it will load all data (sections)
> from
> > flash, but EMIFA has only 19 address line (A22 to A3) and with this
> address
> > line I will be able to load only 512 KB (0x80000) and I need to load 2
> MB.
> > To solve that I have 4 external address line provided by a CPLD. On boot process I will need to manage that
external address line to charge all data from flash.
> >
> > Today I have an idea. Make a boot load that will copy a first application from flash, that first application will
copy from flash the real
> application
> > (h264 encoder) and put sections on the right place, and finaly I will jump to another entry point. But I don't
know how can I jump to the new entry point on C style.
> >
> > Do you understand my problem now?? What you think about my idea?? It will work??Do you know how can I do that
branch??
> >
> > Or do you have another idea?
> >
> > Thanks once more.
> >
> > Best regards,
> >
> > Rui Silva
> >
> > -----Original Message-----
> > From: Jeff Brower [mailto:j...@signalogic.com]
> > Sent: sexta-feira, 6 de Julho de 2007 22:54
> > To: Rui Silva
> > Cc: c...
> > Subject: Re: [c6x] BOOT greater than 512KB
> >
> > Rui-
> >
> > > We have a DM642 based card, and we build an aplication and then we
> convert
> > > coff file to ascii hex to program flash.
> > > But the hex file it's greater than 512 KB.
> > > We need to select on boot.asm external address to cover range greater
> than
> > > 512KB of the flash.
> >
> > It's not clear to me whether your issue is mem size limit on the DM642
> (256
> > kbyte) or
> > small Flash size (512 kbyte would be a very small Flash)... the only boot-related
> > comment I would make is that you need to make sure SDRAM is fully initialized in
> > boot.asm before you can write to it. All EMIF registers have to be initialized.
> >
> > Also I would point a tools-related issue that might affect you: v5.x.0 versions of
> > hex6x utility may produce output that does not correctly show a section if the
> > section is larger than 500 kbyte. This seems to be corrected using v6.0.8 of
> > hex6x.exe. If you need more info on this bug please ask the TI Hotline
> and
> > reference
> > bug report SDSCM00014482.
> >
> > -Jeff
> >
> > > We have a CPLD that has a register ,located at
> > > 0xA000081,that manages external address like A19 to A24.
> > > What modifications i have to do on boot.asm to boot can load all data
> from
> > > flash to SDRAM.
> > > I did this:
> > > stw a3,*+b15[0x6]
> > > nop 2
> > > mvk 0x0081,a3
> > > || or 0,a3,b5
> > > mvkh 0xa0000000,a3
> > > || extu b5,10,29,b5
> > > stb b5,*+a3[0x0]
> > > nop 2
> > > ldw *+b15[0x6],a3
> > > nop 4
> > >
> > > when i copy something from flash to SDRAM but it doesn't work. Anyone has idea how can i do that?
> > >
> > > Best regards,
> > >
> > > Rui Silva