cancel
Showing results for 
Search instead for 
Did you mean: 

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

Bumsik Kim
Senior

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

9 REPLIES 9
Olivier GALLIEN
ST Employee

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.

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.

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

Kim,

for easy program uptoad via SWD, have a look at the features branch of https://github.com/UweBonnes/pystlink.git

However A7 is not handled...

@Uwe Bonnes​ Great, I thank you for your work! I just tried your Pystlink fork on the features branch but I couldn't make it work. It hangs by basic eamples like pystlink.py dump:0x08000000:256 , either in engineering mode or production mode. Do I need to configure anything to make it work?

@AntonioST​ Nice! I will definitely try it out. So it looks like I don't need STM32CubeProg at all then. I might missed the guide for OpenOCD & GDB because the wiki is so big :). It feels like ST is pushing so hard for the new STM32MP1 line.

As said befor, A7 is not supported yet . Sorry.

debugging
Lead

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,