How to write a variable at particular memory location in PSoC 4100s

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
om
Level 1
Level 1
25 sign-ins 10 sign-ins 5 questions asked

Hello everyone,

I am stuck at one problem, I want to write one variable at particular memory location. So if I initialized my variable then at that memory location I should get initialized data.

for example,

a = 20; and my memory location is 0x20000000 then my variable's address should be 0x20000000 (& a = 0x20000000)

and at 0x20000000  I should get 20.

there are some techniques like using __attribute__  and creating own section in ARM. But when I used attribute in PSoC 4100s it is not working properly and also giving warning that attribute is ignored. So if anyone knows about this then please help me out. 

0 Likes
1 Reply
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @om 

You can refer to the following KBA article that mentions how to store a constant value at a particular location in case of PSoC 4: https://community.cypress.com/t5/Knowledge-Base-Articles/Defining-Const-Variables-for-Fixed-Address-...

Let me know if you face any issues.

Best Regards

Ekta

0 Likes