This Technical Note applies to IAR Embedded Workbench for 8051 version 7.60.
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.
-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.
© IAR Systems 1995-2021 - All rights reserved.
We use cookies on this website to provide you with a better experience. You need to accept cookies to continue using this site. Cookies