element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
Low Power IoT Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Low Power IoT Design Challenge
  • More
  • Cancel
Low Power IoT Design Challenge
Blog Smart Air Quality Monitor #2 - Creating a Project in Modus Toolbox 2.3.1
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: vlasov01
  • Date Created: 12 Sep 2021 12:21 PM Date Created
  • Views 1376 views
  • Likes 11 likes
  • Comments 1 comment
  • android
  • ble
  • modus toolbox 2.3.1
  • i2c
  • fw-loader
  • cysmart
  • low_power_iot
  • low power iot design challenge
  • ubuntu 20.04
  • arm
  • pmod
  • kitprog3
  • linux
Related
Recommended

Smart Air Quality Monitor #2 - Creating a Project in Modus Toolbox 2.3.1

vlasov01
vlasov01
12 Sep 2021

Challenge Kit Received

I received my Challenge Kit CY8CKIT-062S2-43012 via UPS Thursday afternoon (September 9th). Thank Infineon, the Element14 team, and danzima ! So I'm now set for the challenge.

 

Modus Toolbox 2.3.1 Installation on Ubuntu 20.04

 

Modus Toolbox requires 64-bit Win10. And I'm still running a 32-bit version of it. So I've decided to install it on my Ubuntu 20,04 box.

 

After I've downloaded the packages I've uncompressed it

tar xvf ModusToolbox_2.3.0.4276-linux-install.tar.gz
tar xvf ModusToolbox_2.3.1.4663-linux-install.tar.gz

 

It unzipped the IDE 2.3 and the upgrade 2.3.1 into  ./ModusToolbox/ide_2.3

 

As well its installed ARM GCC Toolchain 9.3.19.3.1 20200408

vlasov01@remote:~$ /home/vlasov01/ModusToolbox/tools_2.3/gcc/bin/arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 9-2020-q3-update) 9.3.1 20200408 (release)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

Creating the AnyCloud: BluetoothRegistered LE Environmental Sensing Service project

Modus Toolbox 2.3.1 comes with several project samples. My project requires sending sensor data over BLE to an app I've selected the AnyCloud: BluetoothRegistered LE Environmental Sensing Service template as a starting point.

I've filtered boards by the board type CY8CKIT-062S2-43012.

image

 

 

And then selected the AnyCloud: BluetoothRegistered LE Environmental Sensing Service template:

image

I've read the documentation provided with the project and adjusted some variables.

Setting ARM Toolchain GCC path

image

 

As well I've checked fw-loader KitProg3 version.

image

And I've created a starting script for the IDE mtb.sh

cd  ModusToolbox/ide_2.3/eclipse/
export TOOLCHAIN=/home/vlasov01/ModusToolbox/tools_2.3/gcc
export CY_TOOLS_PATH=/home/vlasov01/ModusToolbox/tools_2.3/
./ModusToolbox

 

Build

The build was relatively fast and completed without any errors or warnings.

 

image

And then I run the project, It did another build and uploaded binaries to the board. It was very fast and straightforward,

image

CySmart App in Action

After I've installed and open CySmart app I've got a list of devices, but the the board was not their. I've reset the board by pressing SW1 XRES button. This button is used to reset PSoC 6 MCU. And I've got a new device - Thermistor.

image

I've tried to pair the device, but it was not bonding.

image

I've pressed on the Termistor button and the User LED switched on.

I've selected Environmental Sensing Service and got the following prompt:

image

 

And I've got CySmart app GATT DB screen with simulated values of Temperature.

image

The app has a nice feature of data logging:

image

Once the connection to the board from the app got lost the LED switched off.

 

KitProg3 Update

I've got the following warnings during the firmware upload:

Info : KitProg3: FW version: 2.0.809
Warn : 
*******************************************************************************************
* KitProg firmware is out of date, please update to the latest version (2.21.1005)
* using fw-loader tool which can be found in the following folder
* /home/vlasov01/ModusToolbox/tools_2.3/fw-loader

So I've decided to fix it.

vlasov01@remote:~/ModusToolbox/tools_2.3/fw-loader/bin$ ./fw-loader --update-kp3
Cypress Firmware Updater, Version: 3.2.0.1003
(C) Copyright 2018-2021 by Cypress Semiconductor
All Rights Reserved


Info: Start API initialization
Info: Connected - KitProg3 CMSIS-DAP BULK-0C1416A4002A9400
Info: Hardware initialization complete 505 ms
Warning: The KitProg3 CMSIS-DAP BULK-0C1416A4002A9400 device supports bridging over HID protocol only. The data transfer rate will be significantly higher if you upgrade to the newer firmware version with USB Bulk bridging enabled.
Device 'KitProg3 CMSIS-DAP BULK-0C1416A4002A9400' opened successfully
Info: Kit FW is 'KitProg3' ver. 2.00 b809.  Upgrade file is 'KitProg3' ver. 2.21 b1005.
Info: Disconnected - KitProg3 CMSIS-DAP BULK-0C1416A4002A9400
Error: CyBridge: Failed to get FW version - Cannot open Hid device with the path: /dev/hidraw1 Err = 13, Permission denied
Info: Connected - KitProg Bootloader-A4000216140C2A94
Info: Bootloader Version: Major 1, Minor 1, Build 60
Info: FW Upgrade to version: 2.21 b1005
Info: Bootloading of KitProg FW...
Info: Verifying of KitProg FW...
Info: Bootloading of DAPLink...
Info: Verifying of DAPLink...
Error: upgradeFirmware failed - Hid write error
Info: Disconnected - KitProg Bootloader-A4000216140C2A94
Info: Connected - KitProg3 CMSIS-DAP BULK-0C1416A4002A9400
FW update on 'KitProg3 CMSIS-DAP BULK-0C1416A4002A9400' device failed

 

I've noticed permission errors. So I've rin it as a privileged user again:

 

vlasov01@remote:~/ModusToolbox/tools_2.3/fw-loader/bin$ sudo ./fw-loader --update-kp3
[sudo] password for vlasov01:
Cypress Firmware Updater, Version: 3.2.0.1003
(C) Copyright 2018-2021 by Cypress Semiconductor
All Rights Reserved


Info: Start API initialization
Info: Connected - KitProg3 CMSIS-DAP BULK-0C1416A4002A9400
Info: Hardware initialization complete 483 ms
Device 'KitProg3 CMSIS-DAP BULK-0C1416A4002A9400' opened successfully
Info: Kit FW is 'KitProg3' ver. 2.21 b1005.  Upgrade file is 'KitProg3' ver. 2.21 b1005.
Info: Disconnected - KitProg3 CMSIS-DAP BULK-0C1416A4002A9400
Info: Connected - KitProg3 Bootloader-A4000216140C2A94
Info: Bootloader Version: Major 1, Minor 1, Build 60
Info: FW Upgrade to version: 2.21 b1005
Info: Bootloading of KitProg FW...
Info: Verifying of KitProg FW...
Info: Bootloading of DAPLink...
Info: Verifying of DAPLink...
Error: upgradeFirmware failed - Hid write error
Info: Disconnected - KitProg3 Bootloader-A4000216140C2A94
Info: Connected - KitProg3 CMSIS-DAP BULK-0C1416A4002A9400
FW update on 'KitProg3 CMSIS-DAP BULK-0C1416A4002A9400' device failed

 

I've noticed on the line 12 that KitProg3 was already upgraded in my previous attempt. I've run another build. And this time it was clean without any warnings about the version of KitProg3 firmware.

 

New Challenge

Now I need to find out how to connect the ZMOD4510 Air Quality sensor to the CY8CKIT-062S2-43012 board.

ZMOD4510 Air Quality sensor ( US082-ZMOD4510EVZ ) provides a standard PmodTm Type 6A (Extended I2C) connection. This new standard was introduced last year.

Some of Cypress boards have PMOD interfaces, but the CY8CKIT-062S2-43012 board doesn't have it. As I never worked with Pmod Extended I2C interface it will be an interesting challenge. I hope I'll apply to apply I2C examples for Modus Toolbox like https://github.com/Infineon/mtb-example-psoc6-i2c-master-ezi2c-slave  .

 

Summary

The installation and patch process was very simple on Ubuntu 20.04. The demo project "AnyCloud: BluetoothRegistered LE Environmental Sensing Service" is working as expected and is very well documented. The CySmart app is working well. It was able to connect to the board over BLE and retrieve simulated data.

  • Sign in to reply
  • DAB
    DAB over 4 years ago

    Nice update.

     

    DAB

    • 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