cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

Anonymous
Not applicable

 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!

0 Likes
Reply
5 Replies
Esteemed Contributor II

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

0 Likes
Reply
Esteemed Contributor

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.

0 Likes
Reply
Anonymous
Not applicable

 I want use this 2048 as a ad buffer.

0 Likes
Reply
Honored Contributor II

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.

0 Likes
Reply
Anonymous
Not applicable

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

0 Likes
Reply