Skip to main content
Bumsik Kim
Senior
July 16, 2019
Solved

STM32CubeProg does not recognize the ST-Link for STM32MP157-DK1

  • July 16, 2019
  • 2 replies
  • 1826 views

Hi, I'm currently working on STM32MP1.

I tried to use STM32CubeProg with STM32MP157A-DK1 in "the Engineering mode", but it doesn't recognize ST-Link for this board.

So currently the only option I can program under the Engineering Mode seems to be SW4STM32. STM32CubeProg also seems to be perfect tool for the Engineering Mode (and the Production mode) too.

Do you guys have any plan to add support for the MCU part of STM32MP1xx dev boards with STM32CubeProg, or to make any standalone tool?

This topic has been closed for replies.
Best answer by AntonioST

Hi Bumsik,

I'm upstreaming the support for STM32MP1 in mainline OpenOCD.

Today there is a conflict between some other patches waiting to be merged and the ST code to handle ST-Link in the way required by STM32MP1. This conflict prevents merging STM32MP1 code.

I hope this will get solved soon.

In mean time, you can avoid using a IDE by using directly OpenOCD and GDB provided in openSTlinux Developer Package SDK

https://wiki.st.com/stm32mpu/wiki/Which_STM32MPU_Embedded_Software_Package_better_suits_your_needs#Developer_Package

or even using only the OpenOCD from SDK together with any GDB for ARM already available in your PC.

The wiki page below is specific for debugging the Cortex-A core, but many information on how to run OpenOCD with GDB are similar for the Cortex-M case. Please note that the OpenOCD port to connect GDB to Cortex-M is the 3333, while it is 3334 for Cortex-A.

https://wiki.st.com/stm32mpu/wiki/GDB

If you need to rebuild OpenOCD, the code is available inside the yocto recipe in

https://github.com/STMicroelectronics/meta-st-stm32mp/tree/thud/recipes-devtools/openocd

Regards

Antonio

2 replies

Olivier GALLIEN
ST Technical Moderator
July 16, 2019

Hi @Bumsik Kim​ 

You are right, you have to use SW4STM32 and soon, starting from september, STM32CubeIDE to use MP1 with Engineering mode.

Since Engineering mode is only for development/debug purpose we don't see any benefit to support it with STM32CubeProgrammer.

Can you explain in what usage CubePro or a standalone tool would have some benefit compare to IDE ?

Thanks

Olivier

Olivier GALLIEN In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Bumsik Kim
Senior
July 16, 2019

Thank you for a quick response. Support for non-ide tools like CubeProg is will be great for third-party developers, especially open-source communities. They tend not to use proprietary IDEs since they stick with in-house Makefile/CMake scripts. STM32CubeProg will be a good option just for quick flash(not "flash" of course) to see it works. Existing SWD/JTAG tools are supposed to this job but there seems to be no option for now in the open source community because OpenOCD does not yet support STM32MP1xx (to be fair, SW4STM32 does have its own OpenOCD config scripts for STM32MP1xx but I'm not sure if the license (SLA0048) allows to copy these scripts to mainline OpenOCD). Maybe I should just wait until mainline OpenOCD support it.

In my case, I'm currently working on porting STM32Duino. Most of works are pretty much done but I'm currently struggling to adding a way to upload compiled Arduino binary to the dev board because STM32Duino relies on STM32CubeProgrammer. Maybe I could just SSH it to upload the binary in the production mode (and we should do it after all to preserve the binary) but it is not as convenient as just "flash" it in the Engineering mode during testing.

Thanks

Bumsik.

AntonioST
AntonioSTBest answer
ST Employee
July 17, 2019

Hi Bumsik,

I'm upstreaming the support for STM32MP1 in mainline OpenOCD.

Today there is a conflict between some other patches waiting to be merged and the ST code to handle ST-Link in the way required by STM32MP1. This conflict prevents merging STM32MP1 code.

I hope this will get solved soon.

In mean time, you can avoid using a IDE by using directly OpenOCD and GDB provided in openSTlinux Developer Package SDK

https://wiki.st.com/stm32mpu/wiki/Which_STM32MPU_Embedded_Software_Package_better_suits_your_needs#Developer_Package

or even using only the OpenOCD from SDK together with any GDB for ARM already available in your PC.

The wiki page below is specific for debugging the Cortex-A core, but many information on how to run OpenOCD with GDB are similar for the Cortex-M case. Please note that the OpenOCD port to connect GDB to Cortex-M is the 3333, while it is 3334 for Cortex-A.

https://wiki.st.com/stm32mpu/wiki/GDB

If you need to rebuild OpenOCD, the code is available inside the yocto recipe in

https://github.com/STMicroelectronics/meta-st-stm32mp/tree/thud/recipes-devtools/openocd

Regards

Antonio

debugging
Lead
September 14, 2019

Still can't install CubeProg on Ubuntu 19.04

java -jar ./SetupSTM32CubeProgrammer-2.1.0.linux

Error: Invalid or corrupt jarfile ./SetupSTM32CubeProgrammer-2.1.0.linux

./SetupSTM32CubeProgrammer-2.1.0.linux

Error: Unable to access jarfile SetupSTM32CubeProgrammer-2.1.0.exe

+ Is there any guide how to build a sample and flash to the M4 it on a STM32MP157C board ?

Thanks,