November 23, 2024, 09:41:40 PM

STM32-H152 + ARM-USB-OCD-H + IAR problem

Started by dim_grig, October 01, 2016, 07:23:54 PM

Previous topic - Next topic

dim_grig

Hi!
Im using STM32-H152 with ARM-USB-OCD-H.
I make the connection and receive available hardware breakpoints in command promt


cd C:\OpenOCD-OLIMEX-WINDOWS\openocd-0.9.0-rc1\bin
C:\OpenOCD-OLIMEX-WINDOWS\openocd-0.9.0-rc1\bin>openocd.exe -f ./interface/ftdi/
olimex-arm-usb-ocd-h.cfg -f ./target/stm32l1.cfg
Open On-Chip Debugger 0.9.0-rc1 (2015-04-24-22:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use
'transport select <transport>'.
adapter speed: 300 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
none separate
cortex_m reset_config sysresetreq
Info : clock speed 300 kHz
Info : JTAG tap: stm32l1.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xb
a00, ver: 0x4)
Info : JTAG tap: stm32l1.bs tap/device found: 0x06429041 (mfg: 0x020, part: 0x64
29, ver: 0x0)
Info : stm32l1.cpu: hardware has 6 breakpoints, 4 watchpoints


Than I open Demo software Blinking LED in IAR (for ARM 7.50.2)... Use IAR built-in CMSIS in Project-options-General Options-Library Configuration... Choose GDB Server in Debugger and set localhost, 3333... Check Memory Regions in Linker (128kB ROM from 0x08000000 to 0x0801FFFF and RAM from 0x20000000 to 0x20003FFF)
After building I try Download and Debug


Info : accepting 'gdb' connection on tcp/3333
Warn : STM32L probed flash size assumed incorrect since FLASH_SIZE=65408k > 128k
, - assuming 128k flash
Info : STM32L flash size is 128kb, base address is 0x8000000
Info : The target is not running when halt was requested, stopping GDB.
undefined debug reason 7 - target needs reset
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.
Info : dropped 'gdb' connection


Whats wrong? Please help me :-\

LubOlimex

It seems that the demo program that we load kills the JTAG. It leaves only SWD available.

Either use SWD interface, or boot from SRAM and erase (overwrite) the flash.

I am working on a long-term solution but for now:

- boot from the embedded SRAM instead of the flash - set the boot jumpers to the opposite positions and erase the flash without any restarts.

I highly recommend you the blog posts by this customer who details the issue and the solution: https://balau82.wordpress.com/2013/08/14/flashing-the-stm32-p152-board-with-openocd/

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex