I want define a uint ADC_sample at 0x20000000.
writing as this:
uint16 ADC_sample _at(0x20000000);
But the psoc creator come out error.How can I wrinting for define this kind of array.
Have a look at this thread www.cypress.com/ and follow the links.
Another point to consider is: What is the use in having data stored at a specific address? The compiler is able to track variable's addresses, you may assign addresses to pointers, so at the end there is no need for and no use of putting areas of memory on a specific address.
That would be true if all compilers provided perfect optimization. However
I have had instances where compile / link decisions left significant holes of
unused memory, and that if I overrode their address / location assignment
I could get more net code, ram availabilty.
Not an approach I prefer, actually I dislike doing it, but when device packing
and pennies / device collide sometimes necessary.
I wonder if user has another interesting reason for doing this ?
I want use this 2048 as a ad buffer.
You mean as ADC buffer? (if not - what is a 'ad buffer'?). Then you don't need to have it at a specific address, since you can tell the DMA the address of the buffer.
Sorry, adc bufffer.
I am write as follow.But the address of this array at 0x1fff850c in Psoc creator 3.0. It was not my define.why?
uint16 ADC_sample __attribute__((at(0x1fff8000)));