cancel
Showing results for 
Search instead for 
Did you mean: 

How to program the STM32WB55 Nucleo Pack in linux (jumpers, drivers, udev rules etc...).

CGood.1
Associate

I have an STM32WB55 Nucleo Pack and I am trying to set it up with my machine (Ubuntu 18.04.3 LTS) to run some sample code.

I installed Atolic TrueStudio (version 9.3.0) and downloaded a sample project called "STM32100E-EVAL_USART_IrDA_Transmit". The project builds successfully, but I get the following error when I connect the nucleo device(s) and click on "debug":

ST-Link enumeration failed
Error in initializing ST-Link device.
Reason: (2) ST-Link DLL error.

I tried the relevant suggestions in this thread, but to no avail.

Meanwhile I installed the STM32CubeProgrammer (version 2.2.1) and the STM32CubeIDE (version 1.1.0), but I got the same error message when I clicked on "debug" with an example project.

I was not able to install STMCubeMX (version 5.4.0) because it got stuck in the installation process.

Given that I haven't seen the board in action, I can't rule out things like a wrong configuration of the jumpers or problems with the udev rules on my system - STM32CubeIDE did modify the UDEV rules during the installation.

I tried following the instructions in section 7.6 of the users manual.

The solder jumper (SB37) on the back of the board is disconnected and I shifted JP1 from USB STL to 5V VIN as instructed by the user manual, but that just resulted in LED5 turning off - I still get the same error message as earlier when I try to run "debug". LED5 only lights up when JP1 is in the position "USB STL".

Am I missing something?

How should I go about debugging this?

Thanks in advance,

Chandran

1 REPLY 1
CGood.1
Associate

It was just a question of permissions as suggested here.

Launching TrueStudio as root and then clicking on debug solved the problem on my machine:

sudo su
/opt/Atollic_TrueSTUDIO_for_STM32_x86_64_9.3.0/ide/./TrueSTUDIO