cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE: How to debug an STM32H7Rx/Sx project without flashing boot every time

CMYL
ST Employee

Introduction

The STM32H7R/S devices come with 64k bytes of boot flash allowing applications to run from external memory. The STM32CubeH7RS firmware package comes with a rich set of examples running on STM32H7S or STM32H7R boards. Each example requires at least two subprojects: [boot] and [appli].

The readme files inside each example of the package directory, describes how to configure the multiprojects for the following toolchains: IAR, MDK-ARM, and STM32CubeIDE. However, the STM32CubeIDE multiproject may seem complicated for inexperienced users. To help facilitate the steps mentioned in the readme files, this document illustrates each step with screenshots for more clarifications.

1. STM32CubeIDE multiproject configuration

Compile the example/application. The elf file is required to configure the debug profile (the “active configuration” must be “debug”, else only assembly debug is available)

CMYL_1-1730239760948.png

 

  • Open the menu [Run][Debug configuration] and double-click on [STM32 C/C++ Application].
    It creates a default debug configuration for the current project selected.
CMYL_2-1730239916974.png
CMYL_3-1730239927784.png
 
In the [Debugger] tab, section [External loaders] add the external loader corresponding to your Board/Memory as described below
  • In the [External loaders] section, click on [Add]
  • Select the loader among the available list [MX25UW25645G_NUCLEO-H7S3L8.stldr or MX66UW1G45G_STM32H7S78-DK.stldr]
CMYL_4-1730240163648.png
  • Check the option [Enabled] and uncheck the checked and option “Initialize” unchecked.
  • If these settings are not configured by default, double-click to change them. 
CMYL_5-1730240214515.png
  • In the [Misc] section, uncheck the option [Verify flash download].
CMYL_6-1730240257531.png
In the [Startup] tab, section [Load Image and Symbols]:
  • Click on “Project” and then select the boot project.
    • Click on "Build configuration" and select “Use active”.
    • Select the following options:
      • [Perform build] checked.
      • [Download] checked.
      • [Load symbols] unchecked.
    • Click on [Add].

If your project contains a boot project, you can import the boot project into workspace as shown below:

 CMYL_7-1730240313057.png

    • Select the added boot project and build/compile it first.
    • Click on the [Add...] button and proceed as shown below:
CMYL_8-1730240365164.pngCMYL_9-1730240414763.png
    • If your project does not contain a boot project:

Click on the [File System] tab and select the boot HEX file corresponding to your board. Find the Boot_XIP.hex in the [Binary] folder on each Template_XIP project. You may need to force the capability to select a .hex file by typing " * " and pressing the [Enter] key in the file name dialog. 

 

CMYL_10-1730240490781.png
Select the following options by double-clicking on the hex file to change the options
  • [Download] checked.
  • [Load symbols] unchecked.
  • Click [Ok]

     CMYL_11-1730240537387.png

    CMYL_12-1730240573623.png

In the [Startup] tab, move the boot project down so it is in the second position. You can do this by selecting the [appli.elf file and click on the [Move up] button.CMYL_13-1730240642890.png

Our debug configuration is ready to use. In the screenshot below our application is executed from the flash external memory @0x70000000.

CMYL_14-1730240697792.png

 

Related links

Version history
Last update:
‎2024-11-27 02:26 AM
Updated by: