C

STM32H750B Discovery Kit Setup Instructions

This topic helps your setup the development environment for STM's STM32H750B discovery kit.

Board features

  1. Dual-Core ARM® Cortex®-M7 and -M4
  2. 4.3” RGB Touch Display
  3. 128-Mbit SDRAM
  4. 1 Mbit NOR Flash
  5. 4-Gbyte on-board eMMC

Setting up development environment

Prerequisites

  • Download Qt Online installer from Qt account and use it to install Qt for MCUs package.
  • Create the Qul_DIR environment variable and set its value to
    <QT_INSTALL_PATH>\QtMCUs\<VERSION>

    where,

    • <QT_INSTALL_PATH> is the Qt install directory,
    • and <VERSION> is the directory containing the Qt Quick Ultralite version you are using, for example 1.1.0.
  • Install CMake 3.13 or (newer) and update the System PATH
    • CMake can be installed by the Qt Installer. In that case, the System PATH needs to updated with the following entry
      <QT_INSTALL_PATH>\Tools\CMake_<ARCH>\bin

      where,

      • <QT_INSTALL_PATH> is the Qt install directory,
      • and <ARCH> is the directory name suffix depending on machine's architecture, for example 64
    • For manual installation, download and run CMake installer
      • Remember to select Add CMake to the System PATH for all users or Add CMake to the System PATH for the current user while installing CMake.
  • Install Ninja 1.10.0 ( or newer ) and update the System PATH
    • Ninja can be installed by the Qt Installer. In that case, the System PATH needs to updated with the following entry
      <QT_INSTALL_PATH>\Tools\Ninja

      where,

      • <QT_INSTALL_PATH> is the Qt install directory
    • For manual installation, download and unpack Ninja to your desired location
      • Add the following entry to the System PATH
        <NINJA_INSTALL_PATH>

        where, <NINJA_INSTALL_PATH> is the path to the directory to which you've extracted ninja.zip

    Note: Ninja Build is optional and can be replaced with other build system.

  • Install ARM Toolchain 8-2019-q3-update and create the ARMGCC_DIR environment variable (Download)
    • The ARMGCC_DIR environment variable should point to the directory where the ARM Toolchain is installed.
  • Install STM32CubeProg 2.4.0 ( or newer ) ( Download )
    • Make sure to install CubeProgrammer in the default location ( C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\ ) or add install directory to System PATH
  • Install STM32CubeIDE and update the System PATH ( Download )
    • Add ST-LINK_gdbserver.exe directory to System PATH
      <STM32_CUBE_IDE_INSTALL_PATH>\stm32cubeide_1.3.0\plugins\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_1.3.0.202002181050\tools\bin

      where, <STM32_CUBE_IDE_INSTALL_PATH> is the Cube IDE install path.

    Note: STM32CubeIDE is optional and required only for on-chip debugging purposes

  • CubeH7 SDK 1.5.0 installed (exactly this version)
    • Download and install SDK for STMCubeH7 1.5.0
    • Create the STM32Cube_FW_H7_SDK_PATH environment variable and set its value as follows:
      set STM32Cube_FW_H7_SDK_PATH=<STM32_CUBE_H7_INSTALL_PATH>\STM32Cube_FW_H7_V1.5.0

      Where, <STM32_CUBE_H7_INSTALL_PATH> is the CubeH7 SDK install path.

  • Flash the bootloader image onto the device. See Bootloader Flashing Instructions for ST boards

Prebuilt demos and examples

The package for STM32H750B board comes with a prebuilt thermo demo binary. You can find it in the demos_images directory.

See Flashing Instructions for ST boards section on how to flash the device.'

Demos and examples source code

Qt for MCUs provides the source code of several demos and examples. You can modify, build, and flash custom binaries onto the target device.

Source code for supported demos and examples is organized in the following directory structure:

Note: Demos or examples that are highlighted in bold are the only ones supported on this board.

Building applications with prebuilt Qt Quick Ultralite libraries

The following example builds the watch demo for this board:

cd %Qul_DIR%\demos\watch
mkdir build
cd build
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=%Qul_DIR%\lib\cmake\Qul\toolchain\armgcc.cmake -DQUL_PLATFORM=stm32h750b-discovery
cmake --build .

Once you have successfully built the watch demo, you can flash it from command line:

cmake --build . --target flash_watch

The same procedure applies to any other application.

Note: By default, the asset data for application is copied to SDRAM on application startup. In order to keep resources in external flash, and not load it to RAM on startup, use the QUL_COPY_TO_RAM cmake option with the value Never when adding assets to the application with qul_add_resource.

Building Qt Quick Ultralite

If your license allows you to access Qt Quick Ultralite sources, you can build QuickUltralite library along with all of supported demos/examples. Run following commands in terminal window:

cd %Qul_DIR%
mkdir build
cd build
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=..\lib\cmake\Qul\toolchain\armgcc.cmake -DQUL_GENERATORS=..\lib\cmake\Qul\QulGenerators.cmake -DQUL_PLATFORM=stm32h750b-discovery

Flashing demos and examples

Once you have successfully built Qt Quick Ultralite, flash supported demos/examples from command line.

cmake --build . --target flash_<DEMO_OR_EXAMPLE_NAME>

where <DEMO_OR_EXAMPLE_NAME> is the name of supported demo/example.

Building applications using a custom built Qt Quick Ultralite

This section describes how to build an application, using a custom Qt Quick Ultralite build.

  • First, you must set up the development environment as described earlier.
  • Build Qt Quick Ultralite from the modified sources and install it to a custom location.
    mkdir some\path\custom_builds\qul
    cd some\path\custom_builds\qul
    
    mkdir qul-build
    cd qul-build
    
    cmake <PATH_TO_INSTALLED_QT_SDK>\QtMCUs\<version> \
          -G "Ninja" \
          -DCMAKE_INSTALL_PREFIX=some\path\custom_builds\qul \
          -DCMAKE_BUILD_TYPE=Release \
          -DCMAKE_TOOLCHAIN_FILE=<PATH_TO_INSTALLED_QT_SDK>\QtMCUs\<version>\lib\cmake\Qul\toolchain\armgcc.cmake \
          -DQUL_PLATFORM=<PLATFORM_NAME> \
          -DQUL_BUILD_TESTS=OFF \
          -DQUL_BUILD_DEMOS=OFF \
          -DQUL_BUILD_EXAMPLES=OFF \
          -DQUL_GENERATORS=<PATH_TO_INSTALLED_QT_SDK>\QtMCUs\<version>\lib\cmake\Qul\QulGenerators.cmake \
    
    ninja install
  • Use the custom Qt Quick Ultralite to build your application, which is not part of the Qt Quick Ultralite source tree:
    cd some\path\custom_builds
    mkdir app # Put your application here. You can use the redbutton example from the SDK.
    cd app
    mkdir build
    cd build
    
    set QUL_DIR=some\path\custom_builds\qul
    cmake .. \
          -G "Ninja" \
          -DCMAKE_BUILD_TYPE=Release \
          -DCMAKE_TOOLCHAIN_FILE=some\path\custom_builds\qul\lib\cmake\Qul\toolchain\armgcc.cmake \
          -DQUL_GENERATORS=<PATH_TO_INSTALLED_QT_SDK>\QtMCUs\<version>\lib\cmake\Qul\QulGenerators.cmake \
          -DQUL_PLATFORM=<PLATFORM_NAME> \
    
    ninja
    ninja flash_<YOUR_APP_NAME>

Flashing the bootloader

The bootloader image can be flashed onto the device along with demo or example using dedicated cmake target.

Run the following command from the terminal window:

cmake --build . --target flash_<DEMO_OR_EXAMPLE_NAME>_and_bootloader

where, <DEMO_OR_EXAMPLE_NAME> is the name of supported demo/example.

Reading debug messages

By default, the output of printf calls are redirected to a virtual serial port, which is exposed on the host machine via USB.

Debugging

  • Open terminal window and run the following command:
    ST-LINK_gdbserver.exe -cp "<STM32_CUBE_PROG_INSTALL_PATH>\bin"

    where, <STM32_CUBE_PROG_INSTALL_PATH> is the directory where you've installed the Cube Programmer tool.

    GDB Server is now listening for TCP connections on the default port, 61234.

    Note: Actual TCP port used by ST-LINK_gdbserver is printed out on gdbserver's console.

  • Run arm-none-eabi-gdb in a separate console
    %ARMGCC_DIR%\bin\arm-none-eabi-gdb.exe <PATH_TO>\your_app.elf
  • Connect to the target via the gdbserver in the arm-none-eabi-gdb console using
    (gdb) target remote 127.0.0.1:61234

Troubleshooting

ST-LINK_gdbserver requires up-to-date ST-LINK firmware to be installed. If you see the following error:

Error in initializing ST-LINK device. Reason: ST-LINK firmware upgrade required.

you must upgrade the firmware to the latest version using the STM32CubeProgrammer tool.

If the problem persists after upgrade, retry with ST-LINK Upgrade tool from the ST webpage ( Download ).

Known limitations

  • The newer SDK version 1.6.0 is not supported yet.

Available under certain Qt licenses.
Find out more.