AnsweredAssumed Answered

Program always jump to/boot from 0x20000000?

Question asked by cuneo.john on Jan 3, 2015
Latest reply on Jan 4, 2015 by Clive One
Hello all, I just began working on an old project which had some problems that had not been  solved, of which I did manage to pinpoint (in relative terms) the source.

Developing platform: Keil uv4
Chip:                          F105RBT6
Debugging Tool:        Jlink

It seems that the current program that I wrote always try to run from the 0x20000000 address, which is to the best of my knowledge, the RAM starting address. To be more specific, whether I press F5 or F11 in the debug mode of Keil, it always jump right to :

0x20000000 BE00      BKPT     0x000x08

And as you can see, since there is a BKPT there, the program gets halted. In other words, the program just jump to 0x20000000, then stops.

When I hit the reset button, the program can return to:

0x00000000 2308      MOVS     r3,#0x08FF   ; ? Undefined

Just fine, but when I hit F11, expecting it to run to

0x00000002 2000      MOVS     r0,#0x001A   ; ? Undefined

It doesn't. It just jump right to 0x20000000.

I've also placed breakpoints between 0x00000000 and 0x20000000, but no, the program never stops at any of those breakpoints, in other words, the program didn't executed step by step all the way to 0x20000000, but skipped all the lines in between.

Besides all that, I had BOOT0 set to 0, which means it will always boot from USER Flash. And this whole "skip" thing does not change one bit regardless of the BOOT0/BOOT1 configuration combination.

I'm suspecting I made some wrong configurations under "Target Options", but I really don't know which one, and it's just a suspicion. I was also thinking about faulty .s startup file and system_stm32f10x.c, and replaced them with official library files (I didn't modify any of them in the first place, no reason to), and the problem remains.

Could anyone please help me as to what may have caused all these problems?