Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IAR linker warning

0 views
Skip to first unread message

Frank

unread,
Aug 16, 2001, 8:56:08 AM8/16/01
to
Hi,

I'm using a H8/3802 microcontroller from Hitachi. For compiling and linking
I use the Hitachi Embedded Workgroup. When I build my code, I have a linker
warning:

> Warning[29]: Parts of segment DATA1 are initialized (as in module
smru_v3), even though it is of type DATA (and thus not promable)

Segment DATA1 is (according to the IAR compiler document):

> Uninitialized statics (tiny, near, far and huge data, respectively)

>TYPE
>Read/write

>DESCRIPTION
>Compiler-only.
>Holds static variables which are not to be zeroed on start-up.


The IAR linker document is writing about segment DATA: DATA Data memory.
There is also a segment which is called:


>IDATA0, IDATA1, IDATA2,IDATA3
>Initialized statics (tiny, near, far and huge data, respectively)

>TYPE
>Read/write

>DESCRIPTION
>Compiler-only.
>Holds static variables which have been declared with explicit initial
values.
>Their initial values are copied over from the CDATAx segment by CSTARTUP
>during initialization.


So my opinion is that there are variables that are placed in the DATA1
segment while it should be in the IDATAx segment. But how do I know which
variables are causing the problems and how can I solve it (for instance by
forcing them into the IDATA segment). I also can not find information about
this in the .map file...

Thanks,
Frank

--
Please, post your answer in the newsgroup.


Thad Smith

unread,
Aug 16, 2001, 11:29:35 AM8/16/01
to
Frank wrote:
>
> Hi,
>
> I'm using a H8/3802 microcontroller from Hitachi. For compiling and linking
> I use the Hitachi Embedded Workgroup. When I build my code, I have a linker
> warning:
>
> > Warning[29]: Parts of segment DATA1 are initialized (as in module
> smru_v3), even though it is of type DATA (and thus not promable)
>
> Segment DATA1 is (according to the IAR compiler document):
...
> So my opinion is that there are variables that are placed in the DATA1
> segment while it should be in the IDATAx segment. But how do I know which
> variables are causing the problems and how can I solve it (for instance by
> forcing them into the IDATA segment). I also can not find information about
> this in the .map file...

I am not familiar with that particular compiler/target setup, but I
suggest you tell the compiler to generate assembly code. That should
show you which variables get placed into the various segments.

Thad

Reinhard Doerner

unread,
Aug 17, 2001, 6:57:46 AM8/17/01
to
Hi Frank,

normaly those errors occur if you define an initialized variable in an
assembly language modul.

Something like that:
RSEG DATA1
var fdb 55 ; generates Data for the segment

use that instead:
var ds 1 ; only reserves space for var

regard,
Reinhard


"Frank" <unknown...@work.com> wrote in message news:<9lgftc$64i$1...@news1.xs4all.nl>...

Frank

unread,
Aug 17, 2001, 8:07:19 AM8/17/01
to
Well, the only assemble file in my project is the original startup assembly
file (cstartup.s20). So this could not be the cause I guess.

Frank

"Reinhard Doerner" <reinhard...@t-online.de> wrote in message
news:6b98a45b.01081...@posting.google.com...

0 new messages