PDATA stack reentrant calling convention

Technical Note 63666

Arkitekturer:

8051

Komponent:

linker

Uppdaterad:

2018-05-31 09:14

Introduction

This Technical Note applies to IAR Embedded Workbench for 8051 version 7.60.

General

Here are some hints to help you configure the PDATA stack reentrant calling convention. You need to modify the .xcl linker configuration file if you want to use this calling convention.

First of all make sure that you place the PDATA stack before other XDATA memory objects. The .xcl file is read and processed top-down by the linker.

Examples:

-D_PDATA0_START=0x0001
-D_PDATA0_END=0x00FF
-D?PBANK_NUMBER=0x00

This will use "page 0" with the address range 0x0001-0x00FF in the XDATA memory. You need to avoid address zero.

-D_PDATA0_START=0x0100
-D_PDATA0_END=0x01FF
-D?PBANK_NUMBER=0x01

This will use "page 1" with the address range 0x0100-0x01FF in the XDATA memory.

-D_PDATA0_START=0x0200
-D_PDATA0_END=0x02FF
-D?PBANK_NUMBER=0x02

This will use "page 2" with the address range 0x0200-0x02FF in the XDATA memory.

Another thing worth doublechecking is the menu:
Project > Options > General Options > Data Pointer > Page register address
where the top byte is stored for the PDATA stack page.
You do not want other data to overwrite this location.

 

All product names are trademarks or registered trademarks of their respective owners.

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.