Placing Variables at permanent address in Flash

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

cross mob
MiEl_3261856
Level 2
Level 2
First like given

Hi,

I use PSOC 4 and i have a few variables that I saving in flash memory.

How can I save the variables in predefined flash addresses?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello,

You can use Linker commands for the same. I'm attaching a very basic project in which section command is used for placing an array at a particular address. I'm also attaching the debug watch window screenshot showing the array 'test' being placed at the desired address.

Thanks,

Hima

View solution in original post

3 Replies
lock attach
Attachments are accessible only for community members.
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello,

You can use Linker commands for the same. I'm attaching a very basic project in which section command is used for placing an array at a particular address. I'm also attaching the debug watch window screenshot showing the array 'test' being placed at the desired address.

Thanks,

Hima

Thanks it helped a lot but how do I add more than one custom flag to define a number of different variables in different addresses??

Thanks,

Michelle

0 Likes

Hello Michelle,

You can add multiple commands. As a reference please have a look at the screenshot. I've added another section named SECTION2 here.

two_sections.JPG

Thanks,

Hima

0 Likes