Reply by Oliver Hager January 9, 20042004-01-09
Hi!

Thanks, it's working now!!!!!!

Oliver


"Anton Erasmus" <junk@junk.net> schrieb im Newsbeitrag
news:v2sovvopk2bgg75k2t38dfpb00ab5kou6c@4ax.com...
> On Wed, 7 Jan 2004 16:00:53 +0100, "Oliver" <ohager@gmx.at> wrote: > > >Hi! > > > > > > > >I'm using an IAR Compiler for Hitachi H8-3687. This Controller has to RAM > >areas (0xE800-0xEFFF(2kByte) and 0xFB80-0xFF7F(1kByte). My segment UDATA1 > >has more than 2kByte an is not linkable. How can I split the segment in
two
> >parts to locate it in both RAM areas? > > > >Oliver > > I have not used the H8-3 IAR compiler, but on the IAR compilers I have > used theres is a compiler flag that keeps text/string data in the ROM > areas. Make sure this is enabled otherwise all text/string data is > copied to RAM. > For locating some variables in other data areas you need to use > something like the following: > #pragma memory=dataseg(anothersection) > int var_in_anothersection; > #pragma memory=default > You can specify in the linker file where "anothersection" should be > located. > > Regards > Anton Erasmus > >
Reply by jtp January 8, 20042004-01-08
"Oliver" <ohager@gmx.at> wrote in message news:<3ffc1fc7$0$27220$91cee783@newsreader01.highway.telekom.at>...
> Hi! > > > > I'm using an IAR Compiler for Hitachi H8-3687. This Controller has to RAM > areas (0xE800-0xEFFF(2kByte) and 0xFB80-0xFF7F(1kByte). My segment UDATA1 > has more than 2kByte an is not linkable. How can I split the segment in two > parts to locate it in both RAM areas? > > Oliver
Hi! If none of your projects translation units e.g. .c files consists more than 2 kBytes uninitialized data, then the linker should be able to place uninitialilzed data to those two RAM areas automatically. But if one of these translation units have more than 2 kBytes uninitialized data then you better do what Dave said in his post.
Reply by Anton Erasmus January 7, 20042004-01-07
On Wed, 7 Jan 2004 16:00:53 +0100, "Oliver" <ohager@gmx.at> wrote:

>Hi! > > > >I'm using an IAR Compiler for Hitachi H8-3687. This Controller has to RAM >areas (0xE800-0xEFFF(2kByte) and 0xFB80-0xFF7F(1kByte). My segment UDATA1 >has more than 2kByte an is not linkable. How can I split the segment in two >parts to locate it in both RAM areas? > >Oliver
I have not used the H8-3 IAR compiler, but on the IAR compilers I have used theres is a compiler flag that keeps text/string data in the ROM areas. Make sure this is enabled otherwise all text/string data is copied to RAM. For locating some variables in other data areas you need to use something like the following: #pragma memory=dataseg(anothersection) int var_in_anothersection; #pragma memory=default You can specify in the linker file where "anothersection" should be located. Regards Anton Erasmus
Reply by Dave Hansen January 7, 20042004-01-07
On Wed, 7 Jan 2004 16:00:53 +0100, "Oliver" <ohager@gmx.at> wrote:

>Hi! > > > >I'm using an IAR Compiler for Hitachi H8-3687. This Controller has to RAM >areas (0xE800-0xEFFF(2kByte) and 0xFB80-0xFF7F(1kByte). My segment UDATA1 >has more than 2kByte an is not linkable. How can I split the segment in two >parts to locate it in both RAM areas?
I've not used that compiler, but a couple of general principles: 1) Initialized and Uninitialized data usually go into two separate segments. A first guess would be IDATA1. Try initializing some data to see if it moves. Tell your linker script to put IDATA1 in one RAM area and UDATA1 in the other. 2) The compiler usually decides where to put data. There may be an option or a pragma you can use when compiling to direct some modules to place data in one or another segment of your own choosing. Maybe UDATA2? Look for something like that. HTH, -=Dave -- Change is inevitable, progress is not.
Reply by Oliver January 7, 20042004-01-07
Hi!



I'm using an IAR Compiler for Hitachi H8-3687. This Controller has to RAM
areas (0xE800-0xEFFF(2kByte) and 0xFB80-0xFF7F(1kByte). My segment UDATA1
has more than 2kByte an is not linkable. How can I split the segment in two
parts to locate it in both RAM areas?

Oliver