Segment ISTACK is too long for segment definition
Technical Note 95811
Architectures:
8051
Component:
linker
Updated:
5/31/2018 9:14 AM
Introduction
You moved a project from IAR Embedded Workbench for 8051 version 8.20 or older, and in version 8.30 you suddenly get linker error e16 for the Internal RAM:
Error[e16]: Segment ISTACK (size: 0xc0 align: 0) is too long for segment definition
Explanation
When you link a project a .xcl linker configuration file is used. It contains commands for the linker.
In IAR Embedded Workbench for 8051 it is found via the menu Project > Options > Linker > Config > Linker configuration file.
There was a change in the V8.30 release so the symbol _NR_OF_VIRTUAL_REGISTERS is no longer used.
It is this extra size that cause the linker error.
Solution
The .xcl file in your project probably comes from IAR Embedded Workbench for 8051 version 8.20 or older, and it contains:
-Z(DATA)VREG+_NR_OF_VIRTUAL_REGISTERS=08-7F
Make a new copy of the file if needed and change that line to:
-Z(DATA)VREG=08-7F
Exact version details
This change was implemented in version 8.30.1 (as identity EW24413), and documented in the Release Notes for version 8.30.2.
Hint
Technical Note 98110 deals with a similar problem.