Best Regards
Tonald DL
WebSite: http://dhcodec.quikstream.com.au/
2007/11/15, vkguduru : >
> Hi,
>
> My command file looks like this:
>
> -c
> -heap 10000
> -stack 40000
>
> /* Memory Map 0 */
>
> MEMORY
> {
> ON_CHIP : origin = 00000000h length = 00100000h
> EMIFA_CE0 : origin = 80000000h length = 10000000h
> EMIFA_CE1 : origin = 90000000h length = 10000000h
> }
>
> SECTIONS
> {
> .text > ON_CHIP
> .stack > ON_CHIP
> .bss > ON_CHIP
> .cinit > EMIFA_CE1
> .cio > EMIFA_CE0
> .const > ON_CHIP
> .data > ON_CHIP
> .switch > ON_CHIP
> .sysmem > ON_CHIP
> .far > EMIFA_CE0
> }
>
> and my main's local variables are getting mapped into .const section,
> which is tampering my other variables which are built into the .cinit
> section.
>
> How can I avoid this memory conflicts?
>
> Vj
>
Reply by Michael Dunn●November 15, 20072007-11-15
Tonald and Vj,
Try this: Understand your target before messing around with LC files.
Please see comments below - NOTE: I have never performed any
significant programming on the DM6446, but the principle is the same
for all TI DSPs.
On 11/14/07, Tonald DL wrote: > Hi Vj,
>
> Try this:
>
> Hi,
>
> My command file looks like this:
>
> -c
> -heap 10000
> -stack 40000
>
> /* Memory Map 0 */
>
> MEMORY
> {
> ON_CHIP : origin = 00000000h length = 00080000h
> ON_CHIP1 : origin = 00000000h length = 00080000h These addresses should reflect the physical internal memory addresses
available in the hardware. The datasheet at TI com contains a memory
map with these addresses. You can subdivide the meory regions, but if
you set them beyong their actual sizes, you will eventually [or right
away have trouble]. Assuming that you are trying to program the ARM,
you only have 16K [length = 00004000h] of on chip memory for
instruction and data. The 16K appears to the ARM as 2 separate 16K
regions of which one is data and the other is program. These are only
intended for limited, time-critical code and data. You could split
them something like:
ON_CHIP_PROG: o = 00000000h l = 00002000h
ON_CHIP_DATA: o = 0000A000h l = 00002000h
Then put everything on EMIFA. Debug your code and analyze the
performance. You can divide the 16K of on chip RAM as you need to
tweak the performance.
and my main's local variables are getting mapped into .const section,
which is tampering my other variables which are built into the .cinit
section.
How can I avoid this memory conflicts?