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

Pointer interpreted as a NULL pointer. Bug?

I have a struture which is correctly allocated at address 0x4000 (read from the M66 file).
The DPP0 is used by Keil to point to the NDATA memory chunk:
DPP0 = 1

so the pointer to my struture, when stored in a register is 0x0000!!!!

Unfortunately, I check if this value is different from a NULL pointer. The generated assembly code is:
CMP R15 #0
JMPR CC_Z, .....
where R15=0, which is the right value to point to 0x4000 with DPP0=1 and MUST not be interpreted as a NULL pointer!

Is it a bug??

The memory configuration is
0->0x3999 of ROM
0x4000 -> 0x24000 RAM
Near memory model: 32k RAM, 16K ROM