Programming on the XC888 microcontroller, I want to save a buffer for some data in the external xdata memory.
I do it like this (just an example where I got rid of unnecessary code):
header.h
extern ubyte xdata rec_buffer[32];
function.c
ubyte xdata rec_buffer[32] = {0}; void foo() {
So I just can’t understand what I don’t see here. In both cases, data is not written to the buffer. (Tested using the debugger). I also checked the address pointed to by pointers -> It actually points to external memory (address 0x000000 , but there should be nothing wrong with that).
When I do this without defining a buffer in xdata , it works completely fine. What am I doing wrong? Is there any special way to write in xdata?
source share