Importing Code Example into ModusToolbox IDE
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Note: This KBA is for ModusToolbox 2.0 only. For ModusToolbox 2.1, see the ModusToolbox Quickstart Guide, Create New Application.
How to import a code example for ModusToolbox™ software?
You can create a code example for either the ModusToolbox integrated development environment (IDE), or for a third-party IDE. This knowledge base article applies to ModusToolbox 2.0 code examples found at the Infineon GitHub repository. Examples are designed to support one or more kits. Note that the example is on GitHub. A network connection is required to create a code example. The screenshots in this article use the Windows-hosted tools. The same tools are available on macOS and Linux.
For ModusToolbox IDE
In ModusToolbox IDE, in the Quick Panel, click New Application.
You can also use a menu command, |
|
Select your kit and click Next. The code example you want to create must support the kit you select in this step. |
|
Pick the starter application (code example) you want to create. You can change the application name, if required.
Click Next to see a summary of your choices.. |
|
Click Finish to create the application. | |
The application appears in the Project Explorer. The required resources and source files are downloaded from GitHub, so this may take some time. |
The downloaded library files (for example, the Peripheral Driver Library or the CapSense library) are in the libs folder in the project. The readme.md file describes the example and how to use it.
For a Third-Party IDE
The Project Creator tool serves the same purpose as the ModusToolbox IDE’s New Application wizard. The tool is located here: <ModusToolbox install>/tools_n.n/project-creator/.
Launch the Project Creator tool. The tool gets the required manifests that define available examples. Click Next. |
|
Select your kit and click Next. The code example you want to create must support the kit you select in this step. |
|
Pick the starter application (code example) you want to create. You can change the application name, if required.
|
|
Click Create to create the application. | |
All the code required for the application (including dependent libraries) appears in a folder with the application name, at the location you specified in the previous step. This can take some time. All dependent libraries are copied locally and appear in the libs folder. You can then add these source files to your IDE’s project. |