/
Getting Started (development)

Getting Started (development)

This page details compiling, loading, and running the N6Cam BSP.

Updated for BSP v1.1

Table of Contents


References

Overview

This page will walk you through:

  • Requirements (hard/software)

  • Compiling the BSP demo

  • Loading & running the demo

Requirements

Hardware Tools

To debug and flash new firmware you’ll need either one of the following:

Note:

  • Both options include the STDC14-STDC14 flat cable used to program the N6Cam.

Toolchain

#

Name (+Link)

Version

Notes

#

Name (+Link)

Version

Notes

1

STM32CubeIDE

1.18.0

Required for build sources

2

STM32CubeN6

1.1.0

CubeIDE extension package

3

STM32CubeProg

2.19.0

Required for firmware signing

Note:

  • STM32 tools must be included on the system PATH:

    • STM32CubeIDE:
      By default: C:\ST\STM32CubeIDE_1.18.0

    • STM32CubeProgrammer:
      By default: C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin

Add the above paths to your system environment variables.

BSP Source

The BSP source is available from the Board Support Packages (BSP)

The following steps assume that you have the N6Cam BSP sources, which look like this:

image-20250410-160051.png

This working folder will be considered as <ROOT> in the following instructions.

Compiling the BSP

Follow these steps to compile:

  1. Open the STM32CubeIDE

  2. Go to File > Import...:

    image-20250410-160520.png
    1. (1) Select General > Existing Projects into Workspace

    2. (2) Click Next.

  3. Find and import the projects:

    image-20250410-160717.png
    1. (1) Click Select root directory

    2. (2) Browse for the sources <ROOT> folder

    3. (3) Select all projects (Application, FSBL, and the solution)

    4. (4) Click Finish

  4. Once loaded, your project should look like this:

    image-20250410-160856.png
  5. Build Application and FSBL using the “Release” profile

  6. The generated binaries can be located at:

    1. Application: <ROOT>\Firmware\STM32CubeIDE\Application\Release\Application.bin

    2. FSBL: <ROOT>\Firmware\STM32CubeIDE\FSBL\Release\FSBL.bin

Loading & running the demo

The BSP comes with a preloaded demo when you purchase the N6Cam. This demo consists of a people-detector model and a video streamer over USB, see the Intro (unboxing).

Signing binaries

Before loading the application to the N6Cam, you must sign them. To achieve this you’ll need to:

  1. Create a “Binaries” folder on <ROOT>

  2. Open a terminal on <ROOT> and run the signing command on the compiled binaries:

    1. Application:

      STM32_SigningTool_CLI -bin Firmware\STM32CubeIDE\Application\Release\Application.bin -nk -of 0x80000000 -t fsbl -o Binaries\Application.signed.bin -hv 2.3 Binaries\Application.signed.bin
    2. FSBL:

      STM32_SigningTool_CLI -bin Firmware\STM32CubeIDE\FSBL\Release\FSBL.bin -nk -of 0x80000000 -t fsbl -o Binaries\FSBL.signed.bin -hv 2.3 Binaries\FSBL.signed.bin

Loading binaries

With the N6Cam unpowered and STLink unplugged from your host machine.

  1. Set the N6Cam switch to development mode

  2. Plug the STDC14-STDC14 flat cable to connect the STLink and the N6Cam

  3. Plug the N6Cam and the STLink to your host machine

  4. Open the STM32CubeProgrammer (if closed):

    1. Configure the external loader:

      image-20250410-180127.png
      1. (1) Go to the “External loaders” tab

      2. (2) Search for STM32N6

      3. (3) Select the MX66UW1G45G loader

    2. Connect to the device:

      image-20250410-180312.png
      1. (1) Select “ST-LINK” from the dropdown menu

      2. (2) Configure the device as shown: Hot-plug mode, with Software reset, for access port 1

      3. (3) Click “Connect”

    3. Flashing the firmware:

      image-20250410-180506.png
      1. (1) Go to the “Erasing & Programming” tab

      2. (2) Browse for the binaries and (3) configure the start address as follows:

        1. Application:

          1. Image: <ROOT>\Binaries\Application.signed.bin

          2. Address: 0x70080000

        2. FSBL:

          1. Image: <ROOT>\Binaries\FSBL.signed.bin

          2. Address: 0x70000000

      3. (4) Click “Start Programming”

    4. Flashing the AI model:

      image-20250410-181244.png
      1. (1) Go to the “Erasing & Programming” tab

      2. (2) Browse for model binaries: <ROOT>\Firmware\Model\network_data.hex
        Note: Since this is a hex file you don’t need to set the target address

      3. (3) Click “Start Programming”

  5. Disconnect both the N6Cam and the STLink from the host machine

  6. Set the N6Cam to operation mode

Running the demo

Follow the steps in Intro (unboxing) | Running the demo

Related content