cancel
Showing results for 
Search instead for 
Did you mean: 

how to to flash stm32mp257-DK in baremetal with cube ide ?

maths
Associate

STM32CubeIDE

 

Version: 2.1.1

Build: 28236_20260312_0043 (UTC)

 

How can I make sense of this ?

maths_0-1780276784026.pngmaths_1-1780276922290.png

 

TMicroelectronics ST-LINK GDB server. Version 7.13.0
Copyright (c) 2026, STMicroelectronics. All rights reserved.

Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled

Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.22.0                  
      -------------------------------------------------------------------



Log output file:   /tmp/STM32CubeProgrammer_Xj0e11.log
Error: Unable to connect to the target device, Access port is not valid.
Encountered Error when opening /home/soham/st/stm32cubeide_2.1.1/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.linux64_2.2.400.202601091506/tools/bin/STM32_Programmer_CLI
Shutting down...
Exit.

 

I have added the "monitor flash mass_erase" to starter as explained in this thread, 

I have set the boot switches into dev mode 0011:

maths_2-1780277129598.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

HI @maths 

bare-metal on cortex-A35 for STM32MP25 is not supported. It is not planned, but maybe it will come this year bare-metal support for Cortex-A35 on STM32MP21.

 

In any case, unlike STM32 MCUs, on STM32MP platforms, it is NOT possible to Flash (external Flash) using JTAG/SWD.

 

For Cortex-M33 SW, STM32MP products external Flash could be up with SSH (RJ45 or ETHoverUSB) which need to have Linux running on the platform or using USB with CubeProgrammer.

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP2_boards/STM32MP257x-DK/Develop_on_Arm_Cortex-M33/Modify,_rebuild_and_reload_the_firmware

 

Otherwise, OpenSTLinux image build with Yocto is flashed with CubeProgrammer using USB (no involvement of CubeIDE).

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP2_boards/STM32MP257x-DK/Let%27s_start/Populate_the_target_and_boot_the_image 

 

Regards.

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.
Tip of the day: Try Sidekick STM32 AI agent, see here

View solution in original post

3 REPLIES 3
Duc
Senior

Hi @maths ,

Have you followed this tutorial: Modify, rebuild and reload the firmware - stm32mpu ?

maths
Associate

yes, But

"STM32CubeIDE requires a connection to Linux® running on an STM32MP2 device though a serial connection."

WHy is linux needed to write into flash ? isn't there an easier way of writing into flash ?

 It can't reach the board : " [Debugger]: The inet address '192.168.7.1' is not reachable."

The board does not have a default IP configured for its ethernet interface, I configured it but couldn't connect either.

I tried configuring the IP tables, I still can't ping the board.

 

HI @maths 

bare-metal on cortex-A35 for STM32MP25 is not supported. It is not planned, but maybe it will come this year bare-metal support for Cortex-A35 on STM32MP21.

 

In any case, unlike STM32 MCUs, on STM32MP platforms, it is NOT possible to Flash (external Flash) using JTAG/SWD.

 

For Cortex-M33 SW, STM32MP products external Flash could be up with SSH (RJ45 or ETHoverUSB) which need to have Linux running on the platform or using USB with CubeProgrammer.

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP2_boards/STM32MP257x-DK/Develop_on_Arm_Cortex-M33/Modify,_rebuild_and_reload_the_firmware

 

Otherwise, OpenSTLinux image build with Yocto is flashed with CubeProgrammer using USB (no involvement of CubeIDE).

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP2_boards/STM32MP257x-DK/Let%27s_start/Populate_the_target_and_boot_the_image 

 

Regards.

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.
Tip of the day: Try Sidekick STM32 AI agent, see here
Announcement

We’re moving the ST Community to a new platform to give you a better and more reliable community experience.