C

STM32F469I Discovery Kit Starting Instructions

Board features

  1. STM32F469NIH6 microcontroller featuring ARM® Cortex®-M4 core and 324 Kbytes of RAM
  2. 4” TFT Color LCD Touch Display
  3. 128-Mbit SDRAM
  4. 128 Mbit QSPI NOR Flash

Setting up development environment

  • Ensure that the common STM prerequisites are met.
  • The STM32CubeF4 SDK from ST is not shipped together with Qt UltraLight. Download and install the SDK from STM32F469I Discovery website.
    • Create the STM32Cube_FW_F4_SDK_PATH environment variable and set its value to
      <STM32_CUBE_F4_INSTALL_PATH>\STM32Cube_FW_F4_V1.24.0

      where, <STM32_CUBE_F4_INSTALL_PATH> points to the CubeF4 SDK install directory.

Prebuilt demos and examples

Package for STM32F469I-DISCO board is provided with following prebuilt demos

You can flash them onto the device using images from the demos_images folder. Follow the flashing instructions for ST boards, and use STM32469I-DISCO as the board name selecting N25Q128A_STM32469I-DISCO as the external loader script.

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:

  • demos
  • examples
    • wearable
    • chess
    • interrupt_handler
    • redbutton
    • styling
    • translation

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=STM32F469I-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. As STM32F469i Discovery board is equipped with fast external flash, assets can be used for blending/blitting operations without the need to copy those into RAM.

Building Qt Quick Ultralite

If your license provides access to the Qt Quick Ultralite sources, build it with all of supported demos/examples. Run the following commands from the 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=STM32F469I-DISCOVERY

Once Qt Quick Ultralite is built successfully, you can flash the 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>

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 ).

Profiling application

Qt Quick Ultralite does not support profiling yet.

Known limitations

STM32F469NI does not have double precision floating point support. Care should be taken to avoid using them.

Available under certain Qt licenses.
Find out more.