ARM: Simulator ignores write access to memory by program
Information in this knowledgebase article applies to:
I want to use the µVision simulator to test an application with e. g. a customized RAM memory layout or flash programming routines with standard memory layout. However, when the program tries to write into the memory, nothing happens. The destination address remains 0, even when I have used the MAP command to make this area read/write. I can use the Memory Window to change the content and the program can also read from there. But why can't the program write to such a memory region?
The memory the program tries to write is known to µVision Simulator as the default ROM space. The range for this is taken from the Device Database or the Device Family Pack when a device is selected for the project. You see this then as IROM1 in the Options for Target ... -> Target dialog. To this area the µVision Simulator ignores write access by the simulated program code.
A simple solution is to move the memory range that your program uses out of the default IROM1 area. This may also require adjusting the used MAP commands options to the new area.
An other solution is to move/shrink the default ROM space. But for this the project file needs to be edited manually and re-selecting the device in the project resets this modifications. Future µVision version will maybe also not support this method. So, be aware of that. To do this, open the *.uvproj(x) file in a text editor and look for a line like:
If e. g. your program want's to write to a range 0x30000 - 0x3FFFF change the IROM values like that:
while your project is not loaded in µVision and try again.
Last Reviewed: Wednesday, July 5, 2017
of your data.