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

Ole Reinhardt ole.reinhardt at embedded-it.de
Fri Mar 4 12:35:45 CET 2016


Hi Uwe,

Am 04.03.2016 10:47, schrieb Uwe Bonnes:
> Request for more information:
> - Is this the standalone ST-Link or a STlink from a Discovery/Nucleo board?

No, this is a standalone STLink. I could also use the nucleo board, but
decided to bye a simple standalone clone.

It's the following module:

http://www.ebay.de/itm/ST-Link-V2-STM8-STM32-USB-Programmer-3-3V-5V-SWD-212-/221884211496

A photo of the opened device can be found here:

https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Programming-an-STM32F103XXX-with-a-generic-%22ST-Link-V2%22-programmer-from-Linux

It is flashed with the stlink-v2 firmware.

> - Do you use the ST-Link software or OpenOCD.
> - If OpenOCD is used, what version?

OpenOCD V0.9.0

I use:

openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg -f
/usr/share/openocd/scripts/target/stm32f4x.cfg

> 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.

Ok, seems I will have to look a littel further into the openocd scripts :)

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

Good question. I have not yet studied the bootloader firmware sources.
Until now I only used the binary blob installed on the device as I got it.

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

I suppose the bootloader is build from these sources:

https://github.com/SmartArduino/WiFiMCU/tree/master/Bootloader

Unfortunately it heavily depends on the MICO sdk (which is included in
the GIT Tree as well). But it makes it hard to strip it down to the
basic functionality.

I'll send a anothe private mail with my test sources and the bootloader
flash dump (you should be able to run it on a nucleo board as well, if
it does not fail because of the missing dataflash or wifi module).

Best regards,

Ole

-- 
Embedded-IT
Alter Weg 3
57223 Kreuztal
http://www.embedded-it.de

Tel.: +49-177-7420433


More information about the En-Nut-Discussion mailing list