Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


Degugging locks up at "Initializing PLDs..."

Hi,

I’m new to OpenSTM32 and wanted to debug. But OCD always locks up at “Initializing PLDs...” making Eclipse to timeout.

Debug: 366 721 command.c:366 register_command_handler(): registering ‘ocd_flash’...
Debug: 367 721 command.c:366 register_command_handler(): registering ‘ocd_flash’...
Debug: 368 721 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_mflash init
Debug: 369 721 command.c:145 script_debug(): command - ocd_mflash ocd_mflash init
Debug: 371 724 mflash.c:1379 handle_mflash_init_command(): Initializing mflash devices...
Debug: 372 724 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_nand init
Debug: 373 724 command.c:145 script_debug(): command - ocd_nand ocd_nand init
Debug: 375 726 tcl.c:497 handle_nand_init_command(): Initializing NAND devices...
Debug: 376 726 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_pld init
Debug: 377 726 command.c:145 script_debug(): command - ocd_pld ocd_pld init
Debug: 379 730 pld.c:207 handle_pld_init_command(): Initializing PLDs...

ST-Link Utility is working fine in accessing the board.

Any idea ?

Best regards
Michael

Hello,

Just after init PLD, openocd start to communicate with STLink.

Close all STLink connections before using SW4STM32.

Which eclipse version are you using ?

Also update SW4STM32 to the latest version too.(menu Help => Check for Updates).

Rgds,
Laurent

Hello Laurent,
 
thanks for replying.
 
I made sure ST-Link Utility did not have any conncetion anymore before using Debugger. Does ST-Link Utility has to run or not ? Nevertheless I tried the following sequence
- Before Starting ST-Link Utility : failed on Initializing PLDs...
- ST-Link Utility started but not yet connected : failed on Initializing PLDs...
- Connecting the board took two attempts before successful .
- ST-Link Utility started and connected: failed at
Debug: 261 83 hla_transport.c:171 hl_transport_init(): current transport hla_swd
Debug: 262 83 hla_interface.c:44 hl_interface_open(): hl_interface_open
Debug: 263 83 hla_layout.c:42 hl_layout_open(): hl_layout_open
Debug: 264 83 stlink_usb.c:1698 stlink_usb_open(): stlink_usb_open
Debug: 265 83 stlink_usb.c:1716 stlink_usb_open(): transport: 1 vid: 0x0483 pid: 0x3748 serial:
Error: 266 287 libusb1_common.c:97 jtag_libusb_open(): libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: 267 287 stlink_usb.c:1729 stlink_usb_open(): open failed
Debug: 268 287 hla_layout.c:49 hl_layout_open(): failed
Debug: 269 287 command.c:628 run_command(): Command failed with error code -4
User : 270 287 command.c:689 command_run_line(): in procedure ‘init’
in procedure ‘ocd_bouncer’
Debug: 271 288 command.c:628 run_command(): Command failed with error code -4
User : 272 288 command.c:689 command_run_line():
Debug: 273 288 hla_interface.c:119 hl_interface_quit(): hl_interface_quit
- ST-Link Utility no more running: failed on Initializing PLDs...
 
I am using
Eclipse IDE for C/C++ Developers
Version: Mars.2 Release (4.5.2)
Build id: 20160218-0600
 
On update, I did not receive any updates, hence I assume I have the latest version
  ARM Compiler for MCU (for Windows 32 bits) 1.7.0.201602121829            fr.ac6.feature.mcu.externaltools.armnone.win32.feature.group   Ac6
  Eclipse IDE for C/C++ Developers      4.5.2.20160218-0600     epp.package.cpp         null
  External Tools for Windows (32 bits)   1.3.0.201507241045      fr.ac6.feature.mcu.externaltools.win32.feature.group            Ac6
  OpenOCD (for Windows 32 bits)         1.10.0.201607261143            fr.ac6.feature.mcu.externaltools.openocd.win32.feature.group   Ac6
  OpenSTM32 IDE         1.10.0.201607251855    fr.ac6.feature.mcu.ide.feature.group     Ac6
  OpenSTM32 Linker Script editor          1.7.0.201602121829      fr.ac6.feature.mcu.ldscript.feature.group           Ac6
  OpenSTM32 Remote debugging support        1.10.0.201607251855    fr.ac6.feature.mcu.debug.feature.group Ac6
 
Best regards

Michael


Hello,

STLink utility should be closed or at least not connected to the STLink of course.

And LIBUSB_ERROR_ACCESS seems exactly the message for that, it means the STLink has already opened the connection elsewhere.

And also close all other software that might connect to the STLink.

Check that you closed all debug sessions that might have still the STLink opened in SW4STM32.
Terminate the launch sessions with the red square (also in console window) and you can “Remove All Terminated launches” with the double cross button in console window.
Check you don’t have any openocd.exe running in background but that shouldn’t be the case.

The version of SW4STM32 plugins are ok.

So, seeing your messages, i made a mistake, the connection on STLink is done in “initializing PLDs”, not after.

Then, i don’t know, is it a custom board ?
If yes, did you connect the Reset line output from STlink to the STM32 reset input on your board ?

Rgds,
Laurent

Yes, it is a custom board and yes, reset line should be connected.

We will check again the hardware and reply again. But the strange thing is that the ST-Link Utility is working.

Which STLink are you using so ? a v2 ? or v2-1 ?
Nucleo are 2-1, some newer discovery too.

I suppose you did a custom board selection but did you choose the right stlink and device?
Choose SWD as transport.

Which device is it ?

Rgds,
Laurent