Segment ISTACK is too long for segment definition

Technical Note 95811

Arkitekturer:

8051

Komponent:

linker

Uppdaterad:

2018-05-31 09:14

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.

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av iar.com rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.