Discussion in "8051 Discussion Forum" started by    scorcho    Oct 29, 2007.
Mon Oct 29 2007, 09:00 am
#1
Hi,
I have a few functions in my 8051 firmware that have a few byte parameters in them, and I noticed that these parameters are stored in DATA space, making me run out of DATA space since I only have 128bytes to work with.

Is there any way of storing these parameters in xdata instead? I noticed that I'm only able to store byte pointers to xdata by using the "xdata" qualifier. The qualifier doesn't work on regular byte parameters.
Mon Oct 29 2007, 09:09 am
#2
OK, I tried declaring the functions as large and now they don't use DATA but rather xdata, with a slight increase in code space. Other than this are there any other implications?

The project is built using the small memory model if that makes a difference.
Mon Oct 29 2007, 11:11 am
#3
use linker script to link your data and code space according to your needs.. that might help you..

do you have xram on board?

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

ztaletpzca
Wed Apr 24 2024, 11:19 pm
IrardlPex
Wed Apr 24 2024, 08:42 pm
Charlestehed
Wed Apr 24 2024, 05:20 pm
Robertgurse
Wed Apr 24 2024, 02:43 pm
Richardedils
Wed Apr 24 2024, 04:07 am
Malcolmaccek
Wed Apr 24 2024, 01:21 am
ChrisLub
Tue Apr 23 2024, 05:21 pm
Davidbab
Tue Apr 23 2024, 10:41 am