element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Cypress
  • Products
  • Manufacturers
  • Cypress
  • More
  • Cancel
Cypress
Blog Cypress PSoC 6 ModusToolbox
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: jomoenginer
  • Date Created: 3 Jan 2019 10:19 AM Date Created
  • Views 15175 views
  • Likes 4 likes
  • Comments 2 comments
  • modustoolbox
  • eclipse ide
  • cypress psoc6 ble kit
  • spi master
Related
Recommended

Cypress PSoC 6 ModusToolbox

jomoenginer
jomoenginer
3 Jan 2019

Cypress has a new PSoC 6 tool in town and it's called ModusToolbox.  ModusToolbox is a development environment for the PSoC which includes the PSoC SDK, ModusToolbox IDE and Cypress Programmer. The PSoC 6 SDK includes the standard Cypress tools such as PSoC PDL API (based on PDL 3.1), Middleware Libraries, Command-Line Tools, fw-loader, PSoC 6 MCU Configurators, CapSense and more.

 

Link to ModusToolbox site:

http://www.cypress.com/products/modustoolbox-software-environment

 

Image from the ModusToolbox Release Notes:

http://www.cypress.com/file/455206/download

 

image

 

The PSoC 6 Software Library (psoc6sw-1.0) is comprised of two main pieces; Peripheral Device Library (PDL) and middleware/software libraries.

 

The main interface is the ModusToolbox IDE which is an Eclipse based product which means it includes the standard features of the Eclipse IDE plus some extra tools specific to the Cypress PSoC 6 devices.

 

The following is a partial list of some of the features available in the current release of ModusToolbox (1.0)

 

  • PSoC 6 digital and analog peripheral drivers, which enable rapid peripheral software development
  • The ARM Cortex Microcontroller Software Interface Standard (CMSIS) core access header files directly from the CMSIS 5.3.0 release
  • CMSIS compliant device header files, startup code (platform initialization) and device configuration header files
  • A Device Firmware Update library that can be readily integrated for any application need
  • FreeRTOS source code integrated with the PDL
  • Bluetooth Low Energy (BLE) middleware and stack library
  • PDL Application Programming Interface (API) Reference Guide

 

Currently, ModusToolbox 1.0 supports all PSoC 6 MCU architecture devices.

 

The kits supported with this ModusToolbox version include:

 

  • CY8CKIT-062-BLE PSoC+BLE
  • CY8CKIT-062-WIFI-BT PsoC+WIFI+BT
  • CY8CPROTO-062-4343W PSoC2M+WIFI+BT

NOTE: ModusToolbox requires KitProg3 so a firmware upgrade may be required.

 

 

GUI -based Configuration tools called Configuators are included as part of the SDK and can be run either from the ModusToolbox IDE or from command-line:

 

  • Device Configurator: Set up the system (platform) functions, as well as the basic peripherals (e.g., UART and Timer, etc.).
  • CapSense Configurator and Tuner: Configure CapSense, test it, and generate the required firmware. 
  • USB Configurator: Configure USB settings and generate the required firmware.
  • QSPI Configurator: Configure external memory and generate the required firmware.
  • BLE Configurator: Configure BLE settings and generate the required firmware.
  • Smart I/OTm Configurator: Configure Smart I/O settings and generate the required firmware.

 

The following utilities are available with the SDK:

 

  • CyMCUElfTool: Merges core executable images into a single file for programming / debugging.
  • OpenOCD: Open On-Chip Debugger provides debugging, in-system programming, and boundary-scan testing for embedded target devices.
  • Cypress KitProg Firmware Loader: Used to upgrade firmware on Cypress kits. It allows you to switch the KitProg firmware from KitProg2 to KitProg3, and back
  • JRE: Java Runtime Environment

 

 

To install ModusToolbox, the tool can be downloaded from the Cypress web site at:

http://www.cypress.com/products/modustoolbox-software-environment

 

NOTE: ModusToolbox is only supported on the following 64-bit operating systems

NOTE2: There is no 32-bit support

 

  • Windows 7 64-bit / Windows 10 64-bit
  • macOS 10.13and 10.14
  • Ubuntu Linux 16.04 LTS

 

After installing ModusToolbox, open the tool by double clicking the Desktop Icon; that is if running Windows and there is a shortcut created.

image

 

When ModusToolbox first starts, a slash screen appears.

image

 

After the splash screen appears, as in a standard Eclipse IDE, the user is prompted to either open or create a workspace.

image

 

NOTE: For users with a Cypress PSoC 6 BLE Pioneer Kit (CY8CKIT-062-BLE) earlier than rev 13, the startup file from the PDL folder must be replaced otherwise the code will not run on the kit.

See the data at the following link for info on how to perform this.

https://community.cypress.com/thread/42859?start=15&tstart=0

 

This will be located at the following location:

C:\Users\<MyUserName>\ModusToolbox_1.0\libraries\psoc6sw-1.0\components\psoc6pdl\devices\psoc6\startup\gcc

 

When ModusToolbox finally launches, it starts with a Welcome screen that includes links to help get started with the tool

image

 

If this page is closed. then the blank IDE screen can be seen where a new project can be created or imported from an existing project.

image

 

Under the Project Explorer Pane, there is a section with the ModusToolbox IDE logo in it.  In this section, click on the Quick Panel tab and two Start options are shown; New Application and Search Online for Code Examples.

Click on New Application and a screen to Choose Target Hardware appears with an options for Dev/Eval Kit or Custom Hardware are seen.

image

 

The Custom Hardware option is for use when a new custom application is being created.  The Dev/Eval Kit option can be used to access starter examples for the supported PSoC 6 boards.

In this example, the Dev/Eval Kit option will be used.

Once the Dev/Eval Kit option is selected, a screen will appear listing the supported board for ModusToolbox.

image

 

The CY8CKIT-062-BLE kit will be used in this example.   Select CY8CKIT-062-BLE from the list and click Next.

 

image

 

The CE221120 - PSoCRegistered 6 MCU SPI Master example is used in this post.

http://www.cypress.com/documentation/code-examples/ce221120-psoc-6-mcu-spi-master

Download and unzip the file from the link and use Browse Button from the Starter Application window to select this modus.mk file and click open.

 

image

 

After clicking Open, the CE221120_HighLevelSPIMaster project will appear in the application selection pane.

image

 

Highlight this example and click next and the Summary window will appear.

image

 

If all looks correct, click Finish and the project will be loaded into the ModusToolBox IDE

image

image

 

From the imported project, 5 folders are created.

  • CE221120_HighLevelSPIMaster_config - Contains the Design Configurator file design.modus
  • CE221120_HighLevelSPIMaster_mainapp - Contains config files specific for the Cortex M4 core
  • CE221120_HighLevelSPIMaster_mainapp_cm0p - Contains files specific for the Cortex M0 Plus core
  • CE221120_HighLevelSPIMaster_mainapp_cm0p_psoc6pdl - Contains the M0 plus PDL files
  • CE221120_HighLevelSPIMaster_mainapp_psoc6pdl - Contains the M4 PDL files

 

Since this is a Starter Project, there are a few items that need to be adjusted in the project before it will work with the PSoC 6 BLE Pioneer Kit.

There is a PDF document in the CE221120_PSoC6_SPIMaster titled CE221120_PSoC6_SPIMaster.pdf which describes the necessary changes required in the project.

This can be downloaded from the Cypress website as well:

http://www.cypress.com/file/455556/download

 

The first thing to note is the Hardware Setup which notes the KitProg on the BLE Kit must be at rev KitProg3 before it can be used with the ModusToolbox.

Also, the Hardware Setup describes how to connect the Slave and Master SPI signals from the Arduino Headers on the kit.

image

 

In the Resources section of the  CE221120 doc, the ModusToolbox Resource are shown.  In particular a DMA Channel has to be added to the project with the Alias txDma.

image

 

For the CY8CKIT-062-BLE, a DMA DataWrite 0 Channel 0 is required.

image

To add a DMA channel ModusToolbox project, the Device Configuator is used.

This can be launched by either double clicking the 'design.modus' file or clicking 'Configure Device' under the ModusToolbox Quick Panel.

 

image

 

Once the Device Configurator is open, click the DMA tab to add a DMA Channel.

image

 

See Figure 4. txDma Resource Configuration from the CE221120 doc for the proper settings.

 

Once the DMA channel is added, this needs to assigned to the appropriate SBC. In this case it is the SPI Master SBC 2 where it is used to send the data to the SPI Slave.  Also, note the other settings for SBC 2 as described in the CE221120 doc.

image

 

The SCBs can be accessed via the Peripherals Tab in the Device Configurator and assigning it to TX Trigger Output under Connections.

image

 

The SPI Slave SBC 1 connections are configured as follows.

image

The SBCs can be configured as either a EZI2C, I2C, SPI or UART from the drop down list box the right of the Communication listing of each SBC.

 

image

 

The KIT_LED2 (RED LED at LED9 Port 13 Pin 7) may need to be configured if not already set.  This is used to indicate that the data transfer between the Mast and Slave SPI interfaces has completed.  This is under the Pins tab in the Device Configurator tool.

image

 

The SBC and LED Pins assignments are as seen here:

image

 

 

Ensure the clocks listed under the Peripheral-Clocks tab are set as follows:

image

 

Under the Platform Tab, the Debug port assignment is set  to SWD mode.

image

 

Once all of the changes are made in the Device Configurator, Save the changes and close the tool.

 

One note, as previously mentioned, before the project is built, it is best to replace the startup file with the updated one from the Cypress Community posting.

https://community.cypress.com/thread/42859?start=15&tstart=0

 

image

 

 

In the ModusToolbox IDE, it is best to clean the project if changes are made in Device Configurator to ensure no leftover configurations are still active. This can be performed by clicking

  Clean CE221120_HighLevelSPIMaster Application

under the Quick Panel tab and CE221120_HighLevelSPIMaster_mainapp selection.

 

After cleaning the  build, it is best to Rebuild the Index for each project folder.  This is performed by right clicking on a project folder and selecting 'Index' Then 'Rebuild' to rebuild the Index.  Then right click the project folder again and select 'Index' and then ' Update with Modified files'.

Then build the project. This can be performed by clicking

  Build CE221120_HighLevelSPIMaster Application

under the Quick Panel tab and CE221120_HighLevelSPIMaster_mainapp selection.

 

image

 

Once the program builds successfully, there are two options the load the code on the PSoC 6 board; Debug or Program with either a J-Link or programmer or the builtin KitProg3 programmer.  These are listed under Launches in the Quick Panel.

image

 

As in a typical Eclipse IDE, if the Debug option is used, then the Debug session will be started allowing the code to be stepped through one line at a time or adding a Breakpoint to stop the code at a particular point. If the example was configured properly, the KIT_LED2 will blink each time the code completes a loop through the data transfer or every 1 sec if the code is loaded on the board.

 

Example of a Debug session.

image

 

Once the code is running properly, the KIT_LED2 should blink every second indicating the data transfer was completed.

 

This is a quick video showing the example running on a PSoC 6 BLE Pioneer kit rev. 8.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Summary:

The ModusToolbox 1.0 from Cypress is a very capable tool that adds and option to programming a PSoC 6 device using a standard IDE.   The SCBs (Serial Communication Blocks) are quite useful and easy to set-up to add either a SPI, i2C, or UART to a project.  I have just scratched the surface of this tool and plan to use it in a project I am working to see if will suite my purposes to program the PSoC.  I have yet to test any C++ code with this, but I would suspect that it is an Eclipse based tool that C++ should be supported.  That will be my next test with this.

 

Enjoy.

  • Sign in to reply

Top Comments

  • DAB
    DAB over 6 years ago +1
    Nice overview of the Cypress software. I have always been impressed with the PSOC series and the support provided by Cypress. DAB
  • DAB
    DAB over 6 years ago

    Nice overview of the Cypress software.

     

    I have always been impressed with the PSOC series and the support provided by Cypress.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren over 6 years ago

    Very nice write-up on this tool set.  This is something that I should check out at some point.

     

    Thanks for the information!

    Gene

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube