DSPRelated.com
Forums

writing to 8 bit flash

Started by puli...@yahoo.co.in July 28, 2008
Hi,
My flash is 8 bit.I want to write my boot code into flash.I believe
if I write an instruction in Code Composer it is by default in 32 bits(e.g,LDI,STI etc).How to convert the instructions to 8 bit.I am using assemblylanguage. somebody has raised a similar question for data to which it was answered use AND3 and RPTS.But will this work for instructions?
Asha
Asha,

Your compiler distribution should come with a command line tool called
"hex30.exe". This tool converts the byte codes into a form usable by
the on-chip bootloader.

The documentation is in Chapter 10 of SPRU035.

Regards,
Bill
> -----Original Message-----
> From: c... [mailto:c...] On
> Behalf Of p...@yahoo.co.in
> Sent: Monday, July 28, 2008 6:26 AM
> To: c...
> Subject: [c3x] writing to 8 bit flash
>
> Hi,
> My flash is 8 bit.I want to write my boot code into flash.I believe
> if I write an instruction in Code Composer it is by default
> in 32 bits(e.g,LDI,STI etc).How to convert the instructions
> to 8 bit.I am using assemblylanguage. somebody has raised a
> similar question for data to which it was answered use AND3
> and RPTS.But will this work for instructions?
> Asha
>
> My flash is 8 bit.I want to write my boot code into flash.I believe
> if I write an instruction in Code Composer it is by default in 32 bits(e.g,LDI,STI etc).How to convert the instructions to 8 bit.I am using assemblylanguage. somebody has raised a similar question for data to which it was answered use AND3 and RPTS.But will this work for instructions?

The linker command must be told the memory is 8 bit, then it will insert
the correct information in the first byte of the memory image to tell
the loader the flash is 8 bit.

Here is an example file that I have used:

/*-*/
/* command file to make a boot eprom */
/*-*/
k3master.out /* input file from linker */
-map k3master.mxp /* map filename */
-i /* intel format */
-o k3master.hex /* output filename */
-memwidth 8 /* physical width of memory system */
-bootorg 400000h /* base address of boot memory */
-cg 10FAh /* configure bus for max wait states */
-e 0080484fh /* execution address */

ROMS
{
FLASH: org@0000h, romwidth=8
}
-boot

org, -cg and various filenames must be changed to match your requirements.

Details are in the C31X software manuals.

Lyle
Hello, I am trying to do something similar with the TMS320VC33.

I am trying to serial bootload my program, with matlab.

Once I have my program in intel hex format do I just send those words as is? The boot-loader source does not seem to take into account the hex format. Do I have to write a program to re-form this into the correct format? what about words that aren't 32 bits long yet I have to send 32 bits over the serial port by default? ( gonna repost as my own question too ).

Thanks,

Daniel
Hi,
>My flash is 8 bit.I want to write my boot code into flash.I believe
>if I write an instruction in Code Composer it is by default in 32 bits(e.g,LDI,STI etc).How to convert the instructions to 8 bit.I am using assemblylanguage. somebody has raised a similar question for data to which it was answered use AND3 and RPTS.But will this work for instructions?
>Asha
>

_____________________________________