When debugging an example using the ARM simulator, the PC on startup in the simulator doesn't match the entry in the vector array.
I'm using CrossStudio Release 184.108.40.2069110400.6059, with the STMicroelectronics STM32 CPU SUpport Package (V2.3) and Standard Peripherals Library Updates (V1.0) installed. I followed the instructions at: http://www.micromouseonline.com/blog/2009/12/13/crossworks-blinky-project-1, to create a very simple project. Now, I'm pretty sure that I could have a main.c with nothing except a return in it and it would do the same thing.
Since I don't have the hardware ready, I decided to try this using the ARM simulator. When I dump the memory at 0x08000004 I see 0x080002cf; when I look at the PC on startup, it says: 0x08000230.
If I go into STM32_Startup.s and at line 64 change "reset_handler" to "reset_handler_foo", I don't get a compile error which tells me that the #ifdef around it is false. I verifed this by changing "reset_main" on line #66 to "reset_main_foo" and I do get an error.
Then I finally turned on the build output and it shows that the linker command has a "-ereset_handler" option turned on and I'm sure that is somehow over-riding the PC at startup but I don't know how.
I've attached the .hzr file.
Please sign in to leave a comment.