1

I just started working on a STM32L151 microcontroller. I've setup the debugger to break at first instruction (not main), but when I start debugging the program counter stops at 0x1ff00b84 which isn't even a part of the flash (starting at 0x8000000 -> 0x8010000).

It gets wierd, because when i try resetting the debugging session (without downloading the program again), a couple of times it finally stops at the first instruction in my startup-file (startup_stm32l1xx_md.s) and everything runs smoothly until the next time I need the program the device and start the debugger again.

I use CoIDE with the compiler "GNU Tools ARM Embedded 4.8 2014q2". And I run on some custom HW that just arrived. I use SWD from a STM32 Discovery Board to program the chip with.

Hope someone has an idea?

Jolle
  • 1,336
  • 5
  • 24
  • 36

1 Answers1

4

That address is in the bootloader ROM. This behavior suggests that the BOOT0 pin may be floating; make sure that it is tied to GND to boot from flash.

  • Oh, of course! It was flying (HW mistake), and I've just tried to pull it to ground - everything is working just fine.. Thank you very much! :) :) :) – Jolle Mar 22 '16 at 17:41