Affordable and flexible platform to ease prototyping using a STM32L152RET6 microcontroller.

Linux Xubuntu 16.04 qstlink2 utility does not work

24 Dec 2016

I got recently the Nucleo L152RE board (my birthday) and after happily playing with the demo program (just the blink as I don't have yet the LCD shield), I decided that it is time to test my first "hello world!" program on the my first STM32 microcontroller.

Good! I went to a lot of documentation installing the STM32CubeMX, Eclipse IDE, ARM plug-in, openOCD and qstlink2 utility compiled from sources. The blinking LED example compiled well, also in binary form, and was ready to be flashed. qstlink (Qt library) utility started well and connected ok to the board (yes, the udev linux rights were ok, me acting as a limited rights linux user, member of the user group having rights over the STLink device) and displayed correct information about the Nucleo board. The Nucleo STlink2 programmer LED switched from RED, to Green color and remained Green. It would remain Green also after a termination program of qstlink software, requiring to unmount the board and disconnect/reconnect to USB to get the RED light.

I tried to send the example program to the board, loading it from disk and when qstlink2 warned me that the entire flash will be erased (so the demo program will disappear) , I was ok with that. The STLink LED started to blink intermittently RED-GREEN and after a while ended with the ORANGE light signaling that there is a communication error. It also displayed in console the fact that the application was not in the 0x20000000 RAM zone. Any trial to write the "hello world" program (which also was configured with the STM32CubeMX application, providing the correct Nucleo board and thus having the correct initial pin configuration) ended with the ORANGE light.

I registered the board to work with the mbed system and compiled the blinking LED example - the binary was downloaded on my HDD because "Plug & play" programming style it does not work (didn't tried this before, when demo program was still active). BTW, first move was to upgrade the STlink firmware to the latest version. But qstlink2 utility continued to provoke the ORANGE light to appear. I have zero experience with STM32 microcontrollers but I worked with PIC and AVR microcontrollers and I thought I did something wrong and bricked my Nucleo board.

After hours of readings of similar topics from internet, I ended with a github link to a stlink software developed for linux by Alexander, which I compiled and successfully flashed both my "hello world!" and mbed blinking LED example. The board is not included yet in the official list of supported boards (I sent a note to the developer) but I read the list just when I started to write this topic :P The github link is . It solved my problem, I don't know if here was already a solution to this problem, I just jumped in and started to write about my experience.

My opinion about the Nucleo board? Congratulations to the designer, it is well put and quite well protected against newbies. Now I work with the STM32CubeMX plus OpenSTM32 AC6 IDE combination.

You need to log in to post a reply