Home › Forums › Mastering STM32 book support forum › Nucleo L011
- This topic has 4 replies, 2 voices, and was last updated 8 years, 1 month ago by vilts.
-
AuthorPosts
-
September 28, 2016 at 1:53 pm #4558viltsParticipant
Hello!
Has anyone successfully tried Stm32L011 Nucleo board?
I started to play with it, but after a while I came to a conclusion, that OpenOCD doesn’t quite support STM32L011K4 chip yet. I can connect with stm32l0discovery.cfg config, display registers, but cannot write to flash.
Here’s the openocd startup
12345678910111213141516171819PS C:\STM32Toolchain\openocd\scripts> ..\bin\openocd.exe -f .\board\stm32l0discovery.cfgOpen On-Chip Debugger 0.9.0 (2015-05-19-12:06)Licensed under GNU GPL v2For bug reports, readhttp://openocd.org/doc/doxygen/bugs.htmladapter speed: 300 kHzadapter_nsrst_delay: 100Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWDnone separatesrst_only separate srst_nogate srst_open_drain connect_deassert_srstInfo : Unable to match requested speed 300 kHz, using 240 kHzInfo : Unable to match requested speed 300 kHz, using 240 kHzInfo : clock speed 240 kHzInfo : STLINK v2 JTAG v27 API v2 SWIM v15 VID 0x0483 PID 0x374BInfo : using stlink api v2Info : Target voltage: 3.261740Info : stm32l0.cpu: hardware has 4 breakpoints, 2 watchpointsInfo : accepting 'telnet' connection on tcp/4444auto erase enabledBut when I try to do flash_write
1234> flash write_image erase "C:/Download/L011.elf"auto erase enabledCannot identify target as a STM32L family.auto_probe failedI can upload binaries with the latest 4.0.0 ST-LINK. 3.9.0 failed, so maybe it’s quite new chip and OpenOCD support hasn’t reached just yet?
Being completely new to all this, just started working throught the excellent “Mastering” book, I am quite lost… Probably some config (openocd?) is messed up somehow (wrong memory size, location?). Any help would be appreciated.
Same procedure works just fine with Nucleo-F303RE, so at least toolchain seems to be allright.
September 28, 2016 at 1:59 pm #4564Carmine NovielloKeymasterHi,
Unfortunately the support to L0 boards in the current stable OpenOCD release (0.9) is largely broken. The next release (0.10) works better, but it’s still under development.Liviu Ionescu has compiled the 0.10 release and it’s available on his website:
http://gnuarmeclipse.github.io/openocd/releases/
Try to use that one to see if it works. Otherwise, the only reliable solution I know is to upgrade the integrated ST-LINK to a SEGGER J-LINK and to use SEGGER’s tools that are a lot better:
https://www.segger.com/jlink-st-link.html
Let me know if it helps.
September 28, 2016 at 2:08 pm #4568viltsParticipantThanks for quick response!
I tried the 0.10 release, it has the same issue. At least trying with the stm32l0discovery.cfg.
I will try the Segger later tonight. Is it possible to ‘downgrade’ back to standard st-link after the Segger upgrade? Not that I would want to do that, if it works, but just to be sure.
September 28, 2016 at 2:10 pm #4570Carmine NovielloKeymasterYes, you can revert to the standard ST-LINK in any moment. But, believe me, there are no reasons to go back to the ST-LINK 😉
September 29, 2016 at 12:25 pm #4611viltsParticipantWell, this is weird. I did try with Segger j-link firmware, but I just couldn’t get it working well. It crashed, “lost” the device and only driver reinstall made it reappear. During debug session it would work for a while and then start randomly throwing “cannot read mem loc”, after which couldn’t even reconnect to back j-link… Tried this in VisualGDB and Eclipse.
Switched the Nucleo-F303RE back to st-link and now works like a charm, again. Maybe it’s something with my Win10 setup, drivers etc. Same behaviour with F303 and L011 nucleos after upgrade. Sticking with St-Link for now :).
I have one the nano size F031 nucleo coming, so hopefully I can use that for the small form-factor stuff. Though, would be nice to get this solved sometime. Probably will try this on another PC, see what it does there.
-
AuthorPosts
- You must be logged in to reply to this topic.