Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Error[e16]: Segment IDATA_Z (size: 0x58 align: 0) is too long for segment definition: IAR workbench

Status
Not open for further replies.

Hiroshi_S

Junior Member level 1
Joined
Feb 19, 2015
Messages
18
Helped
1
Reputation
2
Reaction score
2
Trophy points
3
Activity points
171
Hi,
I have imported the AT89S52's Keill's c code to IAR workbench, after compiling I am getting this error but in keil it's not showing such error.
/***********This is the error************/
Error[e16]: Segment IDATA_Z (size: 0x58 align: 0) is too long for segment definition. At least 0xf more bytes needed. The problem occurred while processing the
segment placement command "-Z(IDATA)IDATA_I,IDATA_Z,IDATA_N=08-_IDATA0_END", where at the moment of placement the available memory ranges were
"IDATA:b7-ff"
Reserved ranges relevant to this placement:
IDATA:8-9 VREG
IDATA:a-1f IDATA_I
IDATA:21-ff IDATA_I
BIT:0-7 BREG
BIT:80-97 SFR_AN
BIT:a0-b7 SFR_AN

/************************************/

I also think as suggested in error message, it required 0xf more bytes, if we extend this memory, maybe it will be resolved but if to extend the memory, how to do it?
I am new to IAR workbench, Guys kindly give your suggestions and corrections.
 

I tried to reduce the number of global variable and then I got this new error.

Error[e16]: Segment ISTACK (size: 0xf0 align: 0) is too long for segment definition. At least 0xef more bytes needed. The problem occurred while processing the
segment placement command "-Z(IDATA)ISTACK+_IDATA_STACK_SIZE#08-_IDATA0_END", where at the moment of placement the available memory ranges
were "IDATA:ff-ff"
Reserved ranges relevant to this placement:
IDATA:8-d VREG
IDATA:e-1f IDATA_I
IDATA:21-b6 IDATA_I
IDATA:b7-fe IDATA_Z
IDATA:ff-ff ISTACK
BIT:0-7 BREG
BIT:80-97 SFR_AN
BIT:a0-b7 SFR_AN
Error while running Linker

Now my error changed to IDATA to ISTACK. Does anyone have any clue how to resolve it?
 

AT89S52 has 256 Byte total RAM available. You have to think carefully how much can be assigned to stack and variables. It looks like your application still needs more RAM than the processor can provide. Without knowing the application details, we can't decide if it can ever fit a 8052. You may want to switch to a x51 derivate with more memory.
 

Well, I agree with you. I have done this code successfully in Keil software and hardware is working fine and not i am porting it to IAR workbench, this problem occurs, that's why i am puzzled
 

O.k., if the code is working with 8052 in Keil, it should also in IAR. There are probably different memory assignmentsor may be different memory usage defaults of the run time library. You need to understand how the memory is used in Keil compilation and how to port this settings to IAR.
 

yes.. i got to this point and got stuck. it would be great help if i get little push in this .. I have attached the both ide settings below.
Please look into it, if any clue you get kindly help me to understand.
 

Attachments

  • keilProperties.png
    keilProperties.png
    101.5 KB · Views: 196
  • iarpr1.png
    iarpr1.png
    101.9 KB · Views: 213
  • iarpr2.png
    iarpr2.png
    100.8 KB · Views: 166
  • iarpr3.png
    iarpr3.png
    101.6 KB · Views: 171
  • iarpr4.png
    iarpr4.png
    97.5 KB · Views: 173

I'm not familiar with x51 IAR, but some settings are probably inappropriate, e.g. reentrant function calls, constants in RAM.
 

yeah, I noticed too. I am going back to level one to understand again.. hmm..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top