Getting Started (development)
This page details how to compile, load, and run the N6Cam BSP.
Table of Contents
References
Documentation:
Overview
This page will walk you through:
Requirements (hard/software)
Compiling the BSP demo
Loading & running the demo
Requirements
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:
1 x STLink-V3 programmer
2 x STLink-V3MINIE programmer
Note:
Both options include the STDC14-STDC14 flat cable used to program the N6Cam.
Development Software
# | Name (+Link) | Version | Notes |
---|---|---|---|
1 | 3.9+ |
| |
2 | 1.17.0 |
| |
3 | 1.0.0 | CubeIDE extension package | |
4 | 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
Open a terminal in the sources root folder
Create a virtual environment for development:
python -m venv .venv
Activate the environment:
Linux:
. .venv/bin/activate
Windows:
.venv\Scripts\activate.bat
Install the module requirements:
Compile using scripts
Open a terminal in the sources root folder
Activate the Python environment as shown in Getting Started (development) | Prepare environment
Build the binaries running:
The binaries should be available now in:
<ROOT>\RELEASE\SIANA.N6Cam.BSP-Binaries-<VERSION>\Binaries
Compile using IDE
Open STM32CubeIDE
Go to
File > Import...
Select
General > Existing Projects into Workspace
Click Next.
Find and import the projects:
Click
Select root directory
Browse for
<ROOT>\N6Cam.BSP\STM32CubeIDE
Select all projects (FSBL, and Standalone)
Click Finish
Once loaded, your project should look like this:
Build both FSBL and Standalone using the Release profile
The generated binaries can be located at
<ROOT>\N6Cam.BSP\STM32CubeIDE
. Specifically:FSBL:
FSBL\Release\Siana.N6Cam.BSP.FSBL.signed.hex
Standalone:
Standalone\Release\Siana.N6Cam.BSP.Standalone.signed.hex
Loading & running the demo
With the N6Cam unpowered and STLink unplugged from your host machine.
Set the N6Cam switch to development mode
Plug the STDC14-STDC14 flat cable to connect the STLink and the N6Cam
Plug the N6Cam and the STLink to your host machine
Open the STM32CubeProgrammer (if closed):
Configure the external loader:
(1) Go to the “external loaders” tab
(2) Search for
STM32N6
(3) Select the
MX66UW1G45G
loader
Connect to the device:
(1) Select ST-Link from the dropdown menu
(2) Configure the device as shown:
Hot plug
mode, withSoftware reset
, for access port1
(3) Connect
Flash the firmware:
(1) Go to the “erase & programming” tab
(2) Browse for the images to be flashed, to be either:
From script build: All are located in
<ROOT>\RELEASE\SIANA.N6Cam.BSP-Binaries-<VERSION>\Binaries
Model:
SIANA.N6Cam.BSP-Standalone-<VERSION>_AI.Model_PeopleDetect.hex
FSBL:
SIANA.N6Cam.BSP-FSBL-<VERSION>.hex
Standalone:
SIANA.N6Cam.BSP-Standalone-<VERSION>.hex
From IDE build:
Model:
<ROOT>\N6Cam.BSP\Model\network_data.hex
FSBL:
<ROOT>\N6Cam.BSP\STM32CubeIDE\FSBL\Release\Siana.N6Cam.BSP.FSBL.signed.hex
Standalone:
<ROOT>\N6Cam.BSP\STM32CubeIDE\Standalone\Release\Siana.N6Cam.BSP.Standalone.signed.hex
Disconnect both the N6Cam and the STLink
Set the N6Cam to operation mode
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:
N6Cam being detected as a camera device on Windows
N6CamViewer is streaming video from the device. The image shows a single detection from the people-detect model