[En-Nut-Discussion] STM32: Problems running code with an offset in flash (bootloader)

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Fri Mar 4 10:47:20 CET 2016

>>>>> "Ole" == Ole Reinhardt <ole.reinhardt at embedded-it.de> writes:

    Ole> Hi Uwe, Am 03.03.2016 um 10:23 schrieb Uwe Bonnes:
    >> cmsis/cortex_init.c line 431 is in charge to remap the interrupt
    >> vectors. I guess something goes wrong there. Without a debugger,
    >> things are hard to debug. But the ESP board has listed "SWD debug
    >> interface". And I know you have some ST boards with Stlink at least
    >> version 2. So you could try to set up a SWD connection from the SWD
    >> extension connector on the Stlink board to your ESP board with flying
    >> wires.

    Ole> I got my STLink dongle today but this made things even more
    Ole> strange.

    Ole> If I connect the STLink with the board, the program continues
    Ole> running, but the output is unreadable. Looks like the baudrate (or
    Ole> any clock?)  changed.

    Ole> If the STlink is _not connected_ the Program hangs after a few
    Ole> instructions during the first printf.

    Ole> What could be the difference when the STLink is connected or not?
    Ole> Really strange.

Request for more information:
- Is this the standalone ST-Link or a STlink from a Discovery/Nucleo board?
- Do you use the ST-Link software or OpenOCD.
- If OpenOCD is used, what version?

If OpenOCD is used, tcl/target/stm32f4x.cfg enables debugging in
low-power modes and stops the watchdog during halt. If you reset, speed is
also changed to allow faster programming.

But above the word "watchdog" may be the difference. Does the bootloader use
the watchdog? The watchdog is only stopped by a reset.

Again, a stripped down or even unchanged version of the Bootloader/Programs
under test would allow me to test.

Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------

More information about the En-Nut-Discussion mailing list