This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Data RAM problems with the nRF24E1

Hello. I am working with some existing code that we previously used SDCC as the compiler for the Nordic Semiconductor nRF24E1. I am porting this code over to the Keil compiler and I am having some problems. With the SDCC compiler it appeared that we were running out of RAM before so we were using part of the program space as RAM. I was assuming we were doing this using the XDATA command. I could compile the code using the XDATA type on the variable that I needed to place in Program memory space. When using the SDCC compiler, the variable that was being placed in program memory space was being specified to be in a specific memory location. I am was not explicitly picking a location for the variable using Keil. When using the Keil compiler, the code will compile but when I call a function that would use the variable that would be in XDATA, the device responds in a weird manner. Is there a way to explicitly say place the XDATA here and then when I use XDATA it will work properly? Is there any documentation on using the XDATA to store variables or any examples that I could view?

My code will compile and when it does I get the following info:
linking...
Program Size: data=231.0 xdata=0 code=2885 To get this to compile I had to reduce the size of one of the variables (an array, reduced from 15 bytes to 8) so that the code would compile. I kept receiving data overflow errors with the array being a larger size.
My question is: Looking at the above program size it states data = 231 and looking at the datasheet it states the nRF24E1 has 256 bytes of RAM. Why is it that I cannot use the entire contents of RAM? I could make use of the extra RAM if there is any available. Can you please let me know?
In Keil, I am using the small memory model: variables in Data, code rom size: compact 2K functions, and no operating system.

Here is the information about my version of the Keil Compiler.

IDE-Version:
µVision3 V3.72
Copyright (c) Keil Elektronik GmbH / Keil Software, Inc. 1995 - 2008

Tool Version Numbers:
Toolchain: C51 Compiler/Assembler Kit Version: 8.17
Toolchain Path: C:\Keil\C51\BIN\
C Compiler: C51.Exe V8.17
Assembler: A51.Exe V8.01
Linker/Locator: BL51.Exe V6.15
Librarian: LIB51.Exe V4.24
Hex Converter: OH51.Exe V2.6
CPU DLL: S8051.DLL V3.64
Dialog DLL: DP51.DLL V2.53

Thanks for the help.

Josh