Deploy model on PSoC™ 6 and PSOC™ Edge boards
This section explains how to deploy a model that is trained in Studio on PSoC™ 6 and PSoC™ Edge boards using ModusToolbox™. We provide a keyword Spotter model as a code example, ready for deployment.
Pre-requisites:
- Download and Install ModusToolbox™ (opens in a new tab) (recommended v3.3 or later)
- Infineon PSoC™ 6 or PSOC™ Edge board on which you want to deploy the model
- Download the Imagimob Deploy Code Example for PSOC™ Edge (opens in a new tab) or Imagimob Deploy Code Example for PSoC™ 6 (opens in a new tab)
- ModusToolbox™ PSoC™ E84 Early Access Pack, only for PSOC Edge. See Software setup (opens in a new tab) in the readme.md for more details.
Once you have downloaded the code example, extract the contents of the zip folder and navigate to the Models directory and substitute the provided example model.c and model.h files with the actual model.c and model.h files that were previously generated for your model.
Deploying the model using ModusToolbox™ consists of two parts:
- Create and build the project
- Flash and run the project
Create and Build the project
-
Open ModusToolbox™ > Eclipse IDE for ModusToolbox™ from the Windows Start menu. The Eclipse IDE for ModusToolbox window appears.
-
Browse and select the workspace directory for your project.
-
Click Launch to open the ModusToolbox™ workspace.
-
Select New Application from the Quick Panel or navigate to File> New> Modus Toolbox™ Application to open the Project Creator Tool.
-
Expand the Kit Name (PSoC™ 6 or PSoC™ Edge) from the list and select the corresponding BSP for your board and click Next. The Select Application window appears.
-
Click Browse for Application and select the folder containing the code example for the board downloaded earlier.
-
Select the checkbox against the code example and click to change the code example name to something concise, for instance imagimob-deploy-code-example. When you import a code example for PSOC™ Edge, the name of the imported code example will be different.
-
Click Create to create the project. After the project is created successful, the following window appears.
-
Right-click the imagimob-deploy-code-example project and select Build Project or click Build Application in the Quick panel to build the project.
Flash and Run the project
-
Connect the USB port on the board with the PC using the USB cable.
-
In Quick Panel> Launches, click imagimob-deploy-code-example. The code is deployed on the board.