Getting Started (development)

This page details how to compile, load, and run the N6Cam BSP.

Table of Contents


References

Overview

This page will walk you through:

  • Requirements (hard/software)

  • Compiling the BSP demo

  • Loading & running the demo

Requirements

N6Cam

N6CamPlus.png
N6Cam

Power

The N6Cam is powered through the USB-C connector on the IO board (3), providing a UVC stream.

Debug

The debug connector (2) provides a standard STDC14 interface to plug a debugger.

Boot Mode

The boot selector switch (1) selects the board's operating mode. Facing the N6Cam from the front (camera):

  • Switch to the left: Development mode.

  • Switch to the right: Operation mode.

Development Hardware

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

Note:

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

Development Software

#

Name (+Link)

Version

Notes

#

Name (+Link)

Version

Notes

1

Python

3.9+

 

2

STM32CubeIDE

1.17.0

 

3

STM32CubeN6

1.0.0

CubeIDE extension package

4

STM32CubeProg

2.18.0

Required for firmware signing

Note:

  • STM32 tools must be included on the system PATH:

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

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

Compiling the demo

Prepare environment

  1. Open a terminal in the sources root folder

  2. Create a virtual environment for development:

    python -m venv .venv
  3. Activate the environment:

    1. Linux:

      . .venv/bin/activate
    2. Windows:

      .venv\Scripts\activate.bat
  4. Install the module requirements:

Compile using scripts

  1. Open a terminal in the sources root folder

  2. Activate the Python environment as shown in Getting Started (development) | Prepare environment

  3. Build the binaries running:

  4. The binaries should be available now in: <ROOT>\RELEASE\SIANA.N6Cam.BSP-Binaries-<VERSION>\Binaries

Compile using IDE

  1. Open STM32CubeIDE

  2. Go to File > Import...

    image-20250107-184301.png
    1. Select General > Existing Projects into Workspace

    2. Click Next.

  3. Find and import the projects:

    1. Click Select root directory

    2. Browse for <ROOT>\N6Cam.BSP\STM32CubeIDE

    3. Select all projects (FSBL, and Standalone)

    4. Click Finish

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

  5. Build both FSBL and Standalone using the Release profile

  6. The generated binaries can be located at <ROOT>\N6Cam.BSP\STM32CubeIDE. Specifically:

    1. FSBL: FSBL\Release\Siana.N6Cam.BSP.FSBL.signed.hex

    2. Standalone: Standalone\Release\Siana.N6Cam.BSP.Standalone.signed.hex

Loading & running the demo

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:

      1. (1) Go to the “external loaders” tab

      2. (2) Search for STM32N6

      3. (3) Select the MX66UW1G45G loader

    2. Connect to the device:

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

    3. Flash the firmware:

      1. (1) Go to the “erase & programming” tab

      2. (2) Browse for the images to be flashed, to be either:

        1. From script build: All are located in <ROOT>\RELEASE\SIANA.N6Cam.BSP-Binaries-<VERSION>\Binaries

          1. Model: SIANA.N6Cam.BSP-Standalone-<VERSION>_AI.Model_PeopleDetect.hex

          2. FSBL: SIANA.N6Cam.BSP-FSBL-<VERSION>.hex

          3. Standalone: SIANA.N6Cam.BSP-Standalone-<VERSION>.hex

        2. From IDE build:

          1. Model: <ROOT>\N6Cam.BSP\Model\network_data.hex

          2. FSBL: <ROOT>\N6Cam.BSP\STM32CubeIDE\FSBL\Release\Siana.N6Cam.BSP.FSBL.signed.hex

          3. Standalone: <ROOT>\N6Cam.BSP\STM32CubeIDE\Standalone\Release\Siana.N6Cam.BSP.Standalone.signed.hex

  5. Disconnect both the N6Cam and the STLink

  6. Set the N6Cam to operation mode

  7. Connect the N6Cam to the host machine

If the flashing process is OK, the N6Cam will be recognized as a UVC device by the host. Use the N6Cam Viewer application to visualize the stream:

In the image:

  1. N6Cam being detected as a camera device on Windows

  2. N6CamViewer is streaming video from the device. The image shows a single detection from the people-detect model