MCF5223x RAM and user/supervisor protection

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCF5223x RAM and user/supervisor protection

1,167 Views
LightElf
Contributor I
Hello!
Is is possible to protect part of internal RAM from overwriting by user code? I was looked carefully into MCF52235RM and CFPRM and found nothing about RAM protection, other than CACR register, which can only be used to protect RAM as whole (which is not an option for single-chip mode).
Labels (1)
0 Kudos
Reply
1 Reply

435 Views
AdamS
Contributor I
Hi,
 
you can try to define your own memory region in liker command file and mark it as read only. And in your code use a #pragma directive to place your read only data there.
A #pragma is a compiler directive. After you have set the pragma to the desired state, all code after that point is compiled with that setting until either you change the setting or reach the end of the file. At the beginning of each file, the compiler reverts to the project or default settings.
 
best regards - Adam
0 Kudos
Reply