2015-03-19 06:25 AM
Hi I´ve problem with programming stm32l053, after debug get error ''Cannot identify target as a STM32L family''. I´m using Eclipse Indigo under Linux, st-link/v2 debugger, OpenOCD, arm-none-eabi-gdb. My reports
Open On-Chip Debugger 0.8.0 (2014-11-06-14:05) Licensed under GNU GPL v2 For bug reports, read http://openocd.sourceforge.net/doc/doxygen/bugs.html Info : This adapter doesn't support configurable speed Info : STLINK v2 JTAG v21 API v2 SWIM v4 VID 0x0483 PID 0x3748 Info : using stlink api v2 Info : Target voltage: 3.203137 Info : stm32lx.cpu: hardware has 4 breakpoints, 2 watchpoints target state: halted target halted due to debug-request, current mode: Thread xPSR: 0xf1000000 pc: 0x080045b8 msp: 0x20002800 STM32L: Enabling HSI Info : accepting 'gdb' connection from 3333 Warn : Cannot identify target as a STM32L family. Error: auto_probe failed Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'. Error: attempted 'gdb' connection rejected symbol-file WorkSpace/projectxx/Debug/projectxx.elf monitor reset halt ''monitor'' command not supported by this target. load WorkSpace/projectxx/Debug/projectxx.elf You can't do that when your target is `None' My config files: stm32l0discovery.cfg # This is an STM32L discovery board source [find interface/stlink-v2.cfg] set WORKAREASIZE 0x2000 source [find target/stm32l0x_stlink.cfg] # use hardware reset, connect under reset reset_config srst_only srst_nogate stm32l0x_stlink.cfg if { [info exists CHIPNAME] == 0 } { set CHIPNAME stm32lx } if { [info exists CPUTAPID] == 0 } { # STM32L0x set CPUTAPID 0x0bc11477 } if { [info exists WORKAREASIZE] == 0 } { set WORKAREASIZE 0x2000 } source [find target/stm32l_stlink.cfg] set _FLASHNAME $_CHIPNAME.flash flash bank $_FLASHNAME stm32lx 0 0 0 0 $_TARGETNAME proc stm32l_enable_HSI {} { # Enable HSI as clock source echo ''STM32L: Enabling HSI'' # Set HSION in RCC_CR mww 0x40023800 0x00000101 # Set HSI as SYSCLK mww 0x40023808 0x00000001 } $_TARGETNAME configure -event reset-init { stm32l_enable_HSI } stm32l_stlink.cfg if { [info exists CHIPNAME] } { set _CHIPNAME $CHIPNAME } else { set _CHIPNAME stm32lx } # Work-area is a space in RAM used for flash programming # By default use 4kB (as found on some STM32F100s) if { [info exists WORKAREASIZE] } { set _WORKAREASIZE $WORKAREASIZE } else { set _WORKAREASIZE 0x4000 } if { [info exists CPUTAPID] } { set _CPUTAPID $CPUTAPID } else { # this is the SW-DP tap id not the jtag tap id set _CPUTAPID 0x0bc11477 } if { [info exists TRANSPORT] } { set _TRANSPORT $TRANSPORT if { $TRANSPORT == ''hla_jtag'' } { if { [info exists CPUTAPID] == 0 } { # jtag requires us to use the jtag tap id set _CPUTAPID 0x0bc11477 } } } else { set _TRANSPORT hla_swd } # add deprecated transport name check if { $_TRANSPORT == ''stlink_swd'' } { set _TRANSPORT ''hla_swd'' echo ''DEPRECATED! use 'hla_swd' transport not 'stlink_swd''' } if { $_TRANSPORT == ''stlink_jtag'' } { set _TRANSPORT ''hla_jtag'' echo ''DEPRECATED! use 'hla_jtag' transport not 'stlink_jtag''' } # end deprecated checks # # possibles value are hla_swd or hla_jtag # transport select $_TRANSPORT hla newtap $_CHIPNAME cpu -expected-id $_CPUTAPID set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME hla_target -chain-position $_TARGETNAME $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 02015-03-19 07:41 AM
Perhaps something you'd actually want to pursue with the OpenOCD people? The STM32L0 part is relatively new, and perhaps not adequately supported in your chosen software.
http://openocd.sourceforge.net/doc/doxygen/bugs.html
2015-03-25 11:06 PM
Problem was solved by using OpenSTM32 - ''Workbench for STM32'' plugin for Eclipse. Now it´s OK