Re: Looking for solution to place data in code segment
- From: "Tom Lucas" <news@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Nov 2006 14:54:45 -0000
<torsten.bitterlich@xxxxxxxxxxxxxx> wrote in message
news:1164894517.187076.208730@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi there,
I'm programming a x86 microcontroller. It's basicly a 80186. the
application is programmed with c using a derivate from the Borland c
compiler version 5. The application is loaded by the controller from
an
serial flash via spi. The startup code for my programm then copies
preinitialised data from the code segment to a data segment. It
assumes
to have seperate memory for program code (flash, rom) and data
(memory). But in my application all is in memory. So this step is
rather unnessecary and wastes a lot of memory. Does anybody know how I
can avoid this? I think there should be serveral possibilities. I
guess
I could output the preininialised data directly to the data segment,
but i don't know how to thell this the locator tool. I also could
place
the data in code segment, but my c compiler does not allow this. So
any
help would by highly appreachiated!
Thanks in advance,
Torsten
Let the locator believe that it is running from flash but set the
address of the flash to be in RAM. Set the data area to start after
that. There should be a switch somewhere fairly obvious to prevent it
copying the code into the data area on startup.
.
- Follow-Ups:
- Re: Looking for solution to place data in code segment
- From: torsten.bitterlich@xxxxxxxxxxxxxx
- Re: Looking for solution to place data in code segment
- References:
- Looking for solution to place data in code segment
- From: torsten.bitterlich@xxxxxxxxxxxxxx
- Looking for solution to place data in code segment
- Prev by Date: Re: Most efficient matrix multiplication algorithm
- Next by Date: Re: Hardware Abstraction
- Previous by thread: Looking for solution to place data in code segment
- Next by thread: Re: Looking for solution to place data in code segment
- Index(es):
Relevant Pages
|