This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Simulating an STM32 par

Hi All,

I am attempting to simulate an STM32F100 but I cannot seem to get it to work. This is my first attempt at simulating so I may be doing silly.

I can successfully simulate using the example project in Keil\ARM\Examples\Hello - and I can also successfully hardware debug using a ulink, so if someone could point me in the correct direction that would be great.

The first time I tried to debug the STM32 I got errors related to reading / writing memory locations. I also noticed that the first instruction was trying to execute from location 0x0, which I assume is the bootloader location.

I started playing around with a *.ini file:

MAP  0x0, 0x103  READ WRITE  // allow R/W access to IO space
MAP  0xFFFFFF00, 0xFFFFFFFF  READ WRITE  // allow R/W access to IO space
$=0x080023D4

These numbers were picked mostly at Random. The PC address I chose is supposed to point to the reset handler - I am sure there must be a nicer way to do this, such as pointing to __start or something? Is the reset handler the thing to aim for?

Regardless, my problem is that trying to execute any line of code, no matter which one, results in the program counter setting back to 0x0, where no code lives.

The settings seem to be ok in the debug menu - I have even tried creating a new project with only the startup code and a blank main function but it still does not work, always reverting back to 0x0

Do I need to map more addresses in the .ini file? Do I need to remap the interrupt table? If someone has a working .ini file that I can use as a template I would be eternally grateful.

Thanks,

Brian.