I'm using the free version of uvision 4 with a STM32F100C4. When I try to simulate my code the, simulator starts at 0x0000000. I have tried to set the program counter to 0x08000000, but every time I try to run it goes back to 0x00000000. If I change the MCU to an STM32F103, then it works without me changing anything.
There are no errors or warnings when I build the project. I'm using startup_stm32f10x_ld_vl.s as my startup file, and I have defined STM32F10X_LD_VL in stm32f10x.h.
Please help.
Thanks
How are you trying to change the value of the program counter?
The normal method when trying to run in RAM is to have an ini file that is loaded by the debugger when you start debugging.
In the command line $=0x08000000.
I'm not trying to run in RAM. I want it to run like normal from ROM starting at 0x08000000.
Hello
It seems that I have the same problem with the STM32 value line simulator. Up to now I used a hardware target and it worked. If I switch to the simualtor, simulation also starts at 0x00000000.
Are there any news about this issue. Could it be solved in the meantime?
Best regards.
Raphael
Hello Jonathan Quenzer,
In Options for Target - Debug - 'Simulator section' CPU DLL you can add "-REMAP" to Parameter. This will automatically remap the code from address 0x08000000 to address 0x00000000.
But be aware that this device is not simulated and also the address space for the peripherals are not mapped. To map the periperal address space you need an INI file which does this mapping.
Use command MAP.
MAP 0x40000000, 0x40001FFF Read Write // map peripherals
Best Regards, Martin Guenther