cancel
Showing results for 
Search instead for 
Did you mean: 

Simulator error

michaelconroy9
Associate
Posted on May 10, 2013 at 22:52

I am getting the following error when using the simulator to debug code that seems to be working on the actual target. '' stopped on write protection at 0x801'' The chip is stm8s105c6 and code is written in C using Raisonnance compiler. I looked at help inside STVD and it mentions looking at the memory mapping under MCU configuration but I cannot seem to locate this dialog and there is no mention on how to navigate to this dialog. Has anyone else encountered this problem? Can anyone help me to solve this issue? Thanks

#stvd-write-protection-simulator
1 REPLY 1
fggnrc2
Associate II
Posted on May 11, 2013 at 06:35

Hello Michael!

stm8s105c6 RAM is mapped at addresses 0x0 - 0x7FF, so 0x801 is an invalid RAM address.

When the simulator is running your code, it therefore stops when it access an undefined RAM location.

When this happens, the instruction that caused the error is highlighted in the disassembler window.

A ''real'' stm8s105c6 doesn't check if an instruction reads or writes a reserved RAM location.

If a code runs on a ''real'' stm8s105c6, it may still contain errors as your case shows.

The simulator is a powerful debug tool, so I suggest to use it as much as possible to discover some bugs that may conceal themselves somewhere and show up when a deadline is expiring...

Regards,

EtaPhi