I was writing a simple test code to test pointers and memory allocation in VisualDSP++. I wrote it in this manner
#define address1 0x3B000000
#define address2 0x3C000000
volatile ULONG *data1;
volatile ULONG *data2;
*data1 = *(volatile ULONG*)(address1);
*data2 = *data1;
*(volatile ULONG*)(address2) = *data2 ;
(I agree this can be done by defining it as simple ULONG instead of ULONG* and i have already verified it using this, this is just a case for testing the compiler, pointers and debug windows )
after building and compiling it, I monitored it on the Expressions window and I found that the addresses assigned to data1 and data2 were the same i.e. 0x00000000. I even used #pragma to explicitly define addresses and data at those addresses, but to no avail.
Do I need to make any changes in the LDF file for the same? Or is there some other way to define pointer related statements?
Hoping for a positive reply at the earliest.
Thanks and Regards,