MCF5223x RAM and user/supervisor protection

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MCF5223x RAM and user/supervisor protection

1,398 次查看
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).
标签 (1)
0 项奖励
回复
1 回复

666 次查看
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 项奖励
回复