Eclipse IDE for ModusToolbox™ Quick Start Guide¶
ModusToolbox™ tools package version 3.0.0
About this document
Scope and purpose
ModusToolbox™ software is a set of tools that support device configuration and application development.
These tools enable you to integrate our devices into your existing development methodology.
Intended audience
This guide provides a quick walkthrough for using the Eclipse IDE provided as part of the ModusToolbox™ tools package. If you wish to use other IDEs, such as VS Code, IAR, or µVision, refer to the “Export to IDEs” chapter in the ModusToolbox™ tools package user guide.
Document conventions
Convention |
Explanation |
---|---|
Bold |
Emphasizes heading levels, column headings, menus and sub-menus |
Italics |
Denotes file names and paths. |
Courier New |
Denotes APIs, functions, interrupt handlers, events, data types, error handlers, file/folder names, directories, command line inputs, code snippets |
File > New |
Indicates that a cascading sub-menu opens when you select a menu item |
Reference documents
Refer to the following documents for more information as needed:
ModusToolbox™ tools package installation guide – This provides information and instructions about installing the tools package on Windows, Linux, and macOS.
Eclipse IDE for ModusToolbox™ user guide – This provides more details about features added to the ModusToolbox™ version of the Eclipse IDE.
Eclipse IDE survival guide – This provides a FAQ about how to use Eclipse to perform common tasks.
Eclipse Workbench User Guide – This provides more details about the generic Eclipse environment.
ModusToolbox™ tools package user guide. – This provides information about all the tools included with ModusToolbox™.
Project Creator user guide – This provides specific information about the Project Creator tool.
Device Configurator guide – This provides specific information about the Device Configurator.
1. Download/Install/Run Eclipse IDE¶
Refer to the instructions in the ModusToolbox™ tools package installation guide for how to download and install ModusToolbox™ software, as well as how to run the Eclipse IDE. As noted in the guide, when you first run the IDE, a dialog opens to specify the workspace.
Then, accept the License Agreement, and the Eclipse IDE opens with the Quick Panel and Console by default.
The Quick Panel provides links to tool commands and documentation.
The Console displays various messages when updating the application in some way (building, programming, etc.).
2. Create new application¶
Creating an application includes several steps, as follows:
2.1 Step 1: Open Project Creator tool¶
In the Quick Panel, click the New Application link.
Or, select File > New > ModusToolbox™ Application.
The Eclipse IDE displays a message and waits for the Project Creator tool to open.
2.2 Step 2: Choose Board Support Package (BSP)¶
When the Project Creator tool opens, expand one of the BSP categories under Kit Name and select an appropriate kit; see the description for it on the right. For this example, select the CY8CKIT-062-WIFI-BT kit. The following image is an example; the precise list of boards available in this version will reflect the platforms available for development.
2.3 Step 3: Select application¶
Click Next > to open the Select Application page. This page displays example applications, which demonstrate different features available on the selected BSP. In this case, the CY8CKIT-062-WIFI-BT provides the PSoC™ 62 MCU and the AIROC™ CYW4343W Wi-Fi & Bluetooth® combo chip. You can create examples for PSoC™ 6 MCU resources such as CAPSENSE™ and QSPI, as well as numerous examples for other capabilities.
For this example, expand Getting Started and select Hello World from the list. This example exercises the PSoC™ 6 MCU to blink an LED.
Note
The actual application names available might vary.
Type a name for your application or leave the default name. Do not use spaces in the application name. Also, do not use common illegal characters, such as:
*.”‘/[]:;|=,
2.4 Step 4: Create application¶
Click Create to start creating the application. The tool displays various messages.
When the process completes, a message states that the application was created, and the Project Creator tool closes automatically. For more information, refer to the Project Creator user guide.
After several moments, the application opens in the Eclipse IDE with the Hello_World project in the Project Explorer, with various files and directories. The README.md file opens in the file viewer/code editor where you can read the text.
3. Add/modify application code¶
Code example applications work as they are, and there is no need to add or modify code in order to build or program them. However, if you want to update and change the application to do something else, open the appropriate file in the code editor.
Double-click the main.c file to open it.
As you type into the file, an asterisk (*) will appear in the file’s tab to indicate changes were made. The Save/Save As commands will also become available to select.
4. View device resources¶
To view peripherals, pins, clocks, etc., open the Device Configurator. Right-click on the project folder and select ModusToolbox™ > Device Configurator <version>.
The Device Configurator provides access to the BSP resources and settings. Each enabled resource contains one or more links to the related API documentation. There are also buttons to open other configurators for CAPSENSE™, QSPI, Smart I/O, etc. For more information, refer to the Device Configurator guide, which is also available by selecting View Help from the tool’s Help menu.
Note
The Device Configurator cannot be used to open Library Configurators, such as Bluetooth® and USB.
5. Build the Application¶
Building the application is not specifically required, because building will be performed as part of the programming and debugging process. However, if you are running the Eclipse IDE without any hardware attached, you may wish to build your application to ensure all the code is correct.
In the Project Explorer, click on the Hello_World project. In the Quick Panel, click the Build Application link.
Build information will display in the Console pane.
If you have the Hello_World project selected, you can also select Build Project from the Project menu or from the right-click menu. The Eclipse menus change based on what you have selected in the Project Explorer.
6. Program the Device¶
There are several different “Launch Configurations” for programming and debugging the various development kits and starter applications within the Eclipse IDE. These Launch Configurations provide details about how to configure the application. This section provides a brief walkthrough for programming this example. For more details about other Launch Configurations and settings, refer to the Eclipse IDE for ModusToolbox™ user guide, “Program and Debug” chapter.
6.1 Connect the Kit¶
Follow the instructions provided with the CY8CKIT-062-WIFI-BT kit to connect it to the PC with the USB cable.
Note
This kit’s firmware may be set to KitProg2. To use this kit with the ModusToolbox™ software, you must upgrade the firmware to KitProg3. Refer to the* KitProg3 user guide for more details.
6.2 Program¶
In the Project Explorer, select the Hello_World application. Then, in the Quick Panel, click the Hello_World Program (KitProg3_MiniProg4) link.
If needed, the IDE builds the application and messages display in the Console. If the build is successful, device programming starts immediately. If there are build errors, then error messages will indicate as such. When complete, the LED will start blinking.
7. Debug the program¶
As mentioned under the Program the device section in this document, there are many different Launch Configurations for different kits and applications. This section provides a brief walkthrough for debugging this example. For more details about other Launch Configurations and settings, refer to the Eclipse IDE for ModusToolbox™ user guide, “Program and Debug” chapter.
In the Project Explorer, select the Hello_World application. Then, in the Quick Panel, click the Hello_World Debug (KitProg3) link under Launches.
If needed, the IDE builds the application and messages display in the Console. If the build is successful, the IDE switches to debug mode automatically. If there are build errors, then error messages will indicate as such.
Revision history
Revision |
Date |
Description |
---|---|---|
** |
2017-12-29 |
New document. |
*A |
2018-11-20 |
Completely rewritten from previous version based on Eclipse changes. |
*B |
2019-03-05 |
Updated screen captures and associated text for version 1.1. |
*C |
2019-10-16 |
Updated for version 2.0. |
*D |
2020-03-26 |
Updated for version 2.1. |
*E |
2020-04-02 |
Fixed broken links. |
*F |
2020-06-22 |
Updated screen captures to show AnyCloud. |
*I |
2021-09-13 |
Updated for version 2.4. |
*J |
2022-09-27 |
Updated for version 3.0. |