DSPRelated.com
Forums

Estimating Code Size for DSK6713

Started by sank...@hotmail.com April 18, 2008
Hi,

I just would like to know if I can fit my program into the DSK6713 Flash, which is 512KB maximum in size. I am now simulating the program using CCS. Compilation is done in debug mode and no optimization is used.

1. The COFF .out file resulting from simulation is 510KB. I know it is not an executable one. It has debug stub along with others that may not be in the execuatable file. Can anyone tell me how big it could be if the .out file is converted into hex file using hex6x.exe.

Just to have an idea, I tried converting the file into hex using the following command

hex6x.exe -a -memwidth 8 myfile.out

It ended up giving me 590KB of hex file. I know that it is not the right way to get the actual hex file (I need to link the boot loader into it which is 1KB).

That confuses me. I thought it would be smaller than .out file.

Please comment.

2. Memory map file resulting from simulation shows that I can fit my program into 256KB of L2 memory of C6713 (no cache is used). I had to allocate some constants and buffers into SDRAM. Yet I allocated about 70KB of memory for stack.

Summung .text. .cint, .const(which is allocated in SDRAM), .pint, and some other segments results in a size that is not bigger than 256KB. So it seems to me that there should be no problem to fit my code into 256KB of flash that I have in DSK6713 by default.

Moreover so far I understood, the bootloader (Secondary) will use the info from the memory map to build the hex file that would go into the flash. So the hex file can not be bigger than what I have in memory map file.

Please comments.

Thanks

Sankar
Sankar-

> I just would like to know if I can fit my program into the DSK6713
> Flash, which is 512KB maximum in size. I am now simulating the program
> using CCS. Compilation is done in debug mode and no optimization is used.
>
> 1. The COFF .out file resulting from simulation is 510KB. I know it is
> not an executable one. It has debug stub along with others that may not
> be in the execuatable file. Can anyone tell me how big it could be if
> the .out file is converted into hex file using hex6x.exe.
>
> Just to have an idea, I tried converting the file into hex using the
> following command
>
> hex6x.exe -a -memwidth 8 myfile.out
>
> It ended up giving me 590KB of hex file. I know that it is not the right
> way to get the actual hex file (I need to link the boot loader into it
> which is 1KB).
>
> That confuses me. I thought it would be smaller than .out file.
>
> Please comment.
>
> 2. Memory map file resulting from simulation shows that I can fit my
> program into 256KB of L2 memory of C6713 (no cache is used). I had to
> allocate some constants and buffers into SDRAM. Yet I allocated about
> 70KB of memory for stack.
>
> Summung .text. .cint, .const(which is allocated in SDRAM), .pint, and
> some other segments results in a size that is not bigger than 256KB.
> So it seems to me that there should be no problem to fit my code into
> 256KB of flash that I have in DSK6713 by default.
>
> Moreover so far I understood, the bootloader (Secondary) will use the
> info from the memory map to build the hex file that would go into the
> flash. So the hex file can not be bigger than what I have in memory
> map file.
>
> Please comments.

Your code will fit into the DSK 6713 Flash no problem. The hex6x output file is a
text file -- you edit it to see -- that's why it's so big.

-Jeff
Sankarbarua,

you can easily perform the HEX conversion yourself, no need to ask anyone else.

However, to find out just how big your executable+const+switch, etc size would be, look at the .map
file. Each and every section, including start and stop addresses is listed.

Also, writing a .cmd file that specifies all the details, including the size of the flash, would
tell you, at link time, if it will all fit into the available space.

R. Williams
---------- Original Message -----------
From: s...@hotmail.com
To: c...
Sent: Fri, 18 Apr 2008 09:46:00 -0400
Subject: [c6x] Estimating Code Size for DSK6713

> Hi,
>
> I just would like to know if I can fit my program into the DSK6713 Flash, which is 512KB
> maximum in size. I am now simulating the program using CCS. Compilation is done in debug
> mode and no optimization is used.
>
> 1. The COFF .out file resulting from simulation is 510KB. I know it is not an executable
> one. It has debug stub along with others that may not be in the execuatable file. Can
> anyone tell me how big it could be if the .out file is converted into hex file using hex6x.exe.
>
> Just to have an idea, I tried converting the file into hex using the following command
>
> hex6x.exe -a -memwidth 8 myfile.out
>
> It ended up giving me 590KB of hex file. I know that it is not the right way to get the
> actual hex file (I need to link the boot loader into it which is 1KB).
>
> That confuses me. I thought it would be smaller than .out file.
>
> Please comment.
>
> 2. Memory map file resulting from simulation shows that I can fit my program into 256KB of
> L2 memory of C6713 (no cache is used). I had to allocate some constants and buffers into
> SDRAM. Yet I allocated about 70KB of memory for stack.
>
> Summung .text. .cint, .const(which is allocated in SDRAM), .pint, and some other segments
> results in a size that is not bigger than 256KB. So it seems to me that there should be no
> problem to fit my code into 256KB of flash that I have in DSK6713 by default.
>
> Moreover so far I understood, the bootloader (Secondary) will use the info from the memory
> map to build the hex file that would go into the flash. So the hex file can not be bigger
> than what I have in memory map file.
>
> Please comments.
>
> Thanks
>
> Sankar
------- End of Original Message -------