- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
help:
I want define a uint ADC_sample[2048] at 0x20000000.
writing as this:
uint16 ADC_sample[2048] _at(0x20000000);
But the psoc creator come out error.How can I wrinting for define this kind of array.
thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ?
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want use this 2048 as a ad buffer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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[2048] __attribute__((at(0x1fff8000)));
Thanks