Sergey Kiselev
Technical Consulting Engineer
Intel Developer Products Division
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
2
Agenda
 IoT Challenge and Intel® System Studio Overview
 Build: Intel® C/C++ Compilers; Performance optimized libraries
 Optimize: Intel® VTune Amplifier; Intel® Energy Profiler; Intel® Inspector
 Other Intel® software development tools
– Intel® IoT Developer Kit
– Intel® System Studio for Microcontrollers
 Implementing an IoT Solution with Intel® System Studio
 Questions and Answers
 Resources
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
44
Connected Devices are Increasing in Complexity & are Everywhere
Challenges & Opportunities are Increasing for System & Embedded Developers
To address these challenges, software developers need tools that…
 Are comprehensive and easy to use
 Quickly help resolve defects in complex systems
 Offer insight into sources of excess power consumption
 Enable & accelerate performance - demanding & unique, competitive use cases
Networks &
CommunicationTransportation MedicalIndustrial
Military,
Aerospace,
Government
Retail
$$
Imaging
Digital
Security
Surveillance
Client &
Mobile
Cloud /
data centers /
storage
IoT Devices
F
143 bpm
Gateways
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
5
Intel® System Studio - A Comprehensive Tool Suite
Provides Deep System-wide Insight for System & Embedded Developers
5
 Enables & accelerates performance-demanding use cases
 Offers insight into sources of excess power consumption
 Quickly helps resolve defects in complex systems
 Is comprehensive & easy to use
Develop Embedded Solutions Faster - Learn more: intel.ly/system-studio
1 Linux*, Embedded Linux*, Wind River* Linux*, Yocto* Project
2 UEFI: Unified Extensible Firmware Interface
COMPILER & LIBRARIES ANALYZERS DEBUGGERS
UEFI*2
Agent
JTAG,
JTAG
over
USB
Simics*
Platform
Simulation
System and Application Code Running on
Linux*1, Android*, Windows* or VxWorks*
Intel® Architecture-based Platforms
C/C++
Compiler
Image, Signal, Math and
Data Processing
Power &
Performance
Memory &
Threading
Application &
System
Debug &
Trace
TARGET SYSTEM
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
6
Editions & Configurations
Intel® System Studio 2017
Composer Edition Professional Edition Ultimate Edition
Build
Intel® C++ Compiler
Intel® Threading Building Blocks
Intel® Integrated Performance Primitives
Intel® Math Kernel Library
√
√
√
√
√
√
√
√
√
√
√
√
Analyze
Intel® VTune Amplifier for Systems – Performance Profiler
Intel® Energy Profiler
Intel® Graphics Performance Analyzers
Intel® Inspector – Memory & Thread Debugger
√
√
√
√
√
√
√
√
Debug
GDB Application Debugger3
Intel® System Debugger
GDB over OpenOCD3
√ √ √
√
√
Host Operating Systems Linux*, Windows*
Target Operating Systems1 Linux*2, Android*, Windows*
Hardware Processors & Platforms4
Processors: Intel® Quark™ X1000 Processor, Intel® Atom™ x3/x5/x7 SoC Processor Series,
Intel® Core™ M Processors, Intel® Core™ i3/i5/i7 Processor Series, Intel® Xeon® Processors
Development Platforms: Intel® Edison Development Platform, Intel® Joule IoT Module,
Intel® Puma™6-Media Gateway, Intel® Galileo Gen 2 Board
1 Target OS licenses available: Linux*+Android* (combined), Windows*
2 Linux*, Embedded Linux*, Wind River* Linux*, Yocto* Project
3 Supported on Linux* target OSes
4 See release notes for detailed information about supported processors and platforms
Additional configurations including, floating, academic and VxWorks* support, are available at: software.intel.com/en-us/intel-system-studio/try-buy
All editions include 1 year of renewable Intel® Premier Support.
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
8
Coremark Pro* benchmarks running on Intel Atom processors
Intel® C++ Compilers deliver Impressive Performance on
Embedded Applications powered by Intel® Atom™ processors
Clang
3.8
GCC
6.1.0
Intel® C++
16.0
Intel® C++
17.0
Clang
3.8
GCC
6.1.0
Intel® C++
16.0
Intel® C++
17.0
32-bit mode 64-bit mode
Configuration: Intel® Atom CPU C2750 @ 2.41GHz. Software: Intel® C++ Compiler 17.0, Intel C++ compiler 16.0, GCC 6.1.0, Clang/LLVVM 3.8. Linux OS: Red Hat Enterprise Linux* 7.0, Kernel 3.10.0-123.el7.x86_64, 32GB RAM. Coremark Pro* Benchmark
(www.eembc.org). Compiler flags: Intel C++ 17.0: -O3 -ipo -no-prec-div -ansi-alias -xATOM_SSE4.2 -static; Intel C++ 16.0: -O3 -ipo -no-prec-div -ansi-alias -xATOM_SSE4.2 -static; GCC 6.1.0: -Ofast -mfpmath=sse -flto -march=native -funroll-loops -ffat-lto-
objects; LLVM 3.8: -Ofast -mfpmath=sse -flto -march=native -funroll-loops -static. GCC and clang/LLVM 32bit compilers have additional flag –m32. Software and workloads used in performance tests may have been optimized for performance only on Intel
microprocessors. Performance tests, such as SYSmark & MobileMark, are measured using specific computer systems, components, software, operations and functions. Any change to any of those factors may cause the results to vary. You should consult other
information & performance tests to assist you in fully evaluating your contemplated purchases, including the performance of that product when combined with other products. Benchmark Source: Intel Corporation - Optimization Notice: Intel’s compilers may or
may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets & other optimizations. Intel does not guarantee the
availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel
microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User & Reference Guides for more information regarding the specific instruction sets covered by this notice. Notice revision #20110804 .
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
Your Building Blocks for Image, Signal & Data Processing Apps
Intel® Integrated Performance Primitives (Intel® IPP)
Optimized for
Supports
Addresses
What is Intel® IPP?
Provides developers with ready-
to-use, processor- optimized
functions to accelerate Image,
Signal, Data Processing &
Cryptography computation tasks
Why use Intel® IPP?
• High Performance
• Easy to use API’s
• Faster Time To Market
• Production Ready
Image Processing
• Medical Imaging
• Computer Vision
• Digital Surveillance
• Biometric Identification
• Automated Sorting
• ADAS
• Visual Search
Signal Processing
• Games (sophisticated audio
content or effects)
• Echo cancellation
• Telecommunications
• Energy
Data Compression &
Cryptography
• Data centers
• Enterprise data Managements
• ID verification
• Smart Cards/wallets
• Electronic Signature
• Information security/cybersecurity
How to get Intel® IPP
Intel System Studio
Intel Parallel Studio XE
Free Tools Program
Find out more at: software.intel.com/intel-ipp
Contact us: software.intel.com/en-us/forums/intel-integrated-performance-primitives
9
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
10
Tencent Speeds its Illegal Image Filter System by >2x
with Intel® Integrated Performance Primitives
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
Get Faster Code Faster with
Accurate Data & Meaningful Analysis
 Accurate CPU, GPU & threading data
 Memory access & storage analysis
 Powerful data analysis & filtering
 Data displayed on the source code
 Easy set-up, no special compiles
Faster, Scalable Code, Faster
Intel® VTune™ Amplifier Performance Profiler
intel.ly/vtune-amplifier-xe
Claire Cates
Principal Developer
SAS Institute Inc.
“Last week, Intel® VTune™ Amplifier
helped us find almost 3X
performance improvement. This
week it helped us improve the
performance another 3X.”
12
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
Find Answers Fast
Intel® VTune™ Amplifier
Double Click Function
to View Source
Adjust Data Grouping
… (Partial list shown)
Click [+] for Call Stack
Filter by Timeline Selection
(or by Grid Selection)
Filter by Process
& Other Controls
Tuning Opportunities Shown in Pink
Hover for Tips
13
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
Timeline Visualizes Thread Behavior
Intel® VTune™ Amplifier
Optional: Use API to mark frames and user tasks
Optional: Add a mark during collection
CPU Time
Hovers:
Transitions
Basic Hotspots Advanced HotspotsLocks & Waits
14
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
Visualize Parallel Performance Issues
Look for Common Patterns
Coarse Grain
Locks
High Lock
Contention
Load
Imbalance
Low
Concurrency
15
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
Caller / Callee – Analyze Parent/Child
Intel® VTune™ Amplifier
Click on a
function in
the left pane
to see data
for the callers
& callees
Quickly Find the Bottleneck in Time Critical Call Paths
16
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
17
Quickly Identify Software that is Wasting Power
Actionable Wake-Up, Sleep State, Frequency & Temperature Data
Intel® Energy Profiler
 Consolidate wake-ups & save
energy by remaining in a lower
power state for longer periods
of time, leading to longer
battery life
 Optimize fan-less systems
thermals
software.intel.com/en-us/intel-energy-profiler
The lower the core
frequency over time,
the better the power
efficiency
C6 deep sleep mode
causes less power
consumption
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
Correctness Tools Increase ROI By 12%-21%1
 Errors found earlier are less expensive to fix
 Several studies, ROI% varies, but earlier is cheaper
Diagnosing Some Errors Can Take Months
 Races & deadlocks not easily reproduced
 Memory errors can be hard to find without a tool
Debugger Integration Speeds Diagnosis
 Breakpoint set just before the problem
 Examine variables & threads with the debugger
Find & Debug Memory & Threading Errors
Memory & Thread Debugger – Intel® Inspector
Debugger Breakpoints
Diagnose in hours instead of months
Intel® Inspector dramatically sped up
our ability to track down difficult to
isolate threading errors before our
packages are released to the field.
Peter von Kaenel, Director,
Software Development,
Harmonic Inc.
1 Cost Factors – Square Project Analysis
CERT: U.S. Computer Emergency Readiness Team, and Carnegie Mellon CyLab
NIST: National Institute of Standards & Technology : Square Project Results
intel.ly/inspector-xe
18
Otherintel®softwaredevelopment
tools
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
Intel® IoT
Gateway
Tools to Ease System & Embedded Development
Intel® System Studio
Develop Embedded Solutions Faster
Intel® System Studio
for Microcontrollers
Expedient Tools for Creating
Microcontroller-based Solutions
For CPU-based System &
Embedded Developers
3 Editions: Composer,
Professional, Ultimate
Additional Free Toolkits
Intel® Computer Vision
SDK
Intel® Media SDK or
Intel® Media Server Studio
Intel® SDK for OpenCL™
Applications
Accelerate Computer
Vision Solutions
Fast, Dense Media
Processing
Optimize Compute with
Intel Graphics
IoT Edition
Get Your IoT Gateway to
Market Quickly & Easily
Intel® IoT Developer Kit
The Easy Way to Create IoT Solutions
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. 20
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
21
IDE/ToolsHardwareOSImageMiddlewareCloud
Edge
Analytics
Intel® IoT Developer Kit
software.intel.com/iot
API Bindings (C,C++,Node.JS,Python,Java)
Intel® Edison
Board
Intel® IoT
Gateway
Prototyp
e
Evaluate/ Develop/ Deploy
MCUs
(Intel® Quark™ SE
Microcontroller, Intel® Quark™
Microcontroller D2000
Actuators
Trusted
Analytics
Platform
IBM* BlueMix*, Microsoft* Azure*,
Amazon* AWS*,AT&T*, etc.
IoT Edge
Analytics
Communication Stack
(Wi-Fi, Bluetooth®
Technology, ZigBee*, etc.)
Manageability,
Security, cloud
connectors, etc.
Sensor &
Actuator
Libraries
IO Library
(SPI, GPIO, I2C,
AIO, UART)
Intel® Galileo
Board
IDP / Workbench
Sensors
Intel®
Supports Intel® Edison board, Intel® Galileo board,
Intel® IoT Gateway, & MCUs
Middleware libraries for IO and sensors/ actuators
IDEs & tools to create, run, debug & optimize IoT
solutions
 Intel System Studio IoT Edition
 Intel XDK IoT Edition
 Wind River* Helix* Cloud
 MCU development tools
 C, C++, JavaScript, Python & Java programming
language support
IoT Cloud & Edge Analytics for data collection,
visualization & analytics
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
libmraa – mraa.io for GNU/Linux
● Supports multiple platforms: Galileo,
MinnowBoard, Edison, Joule, ..
● Board detection done automatically
● Provides clear pin mapping & capabilities
● Supports low level programing
languages C & C++
● Supports high level scripting languages
(python, node.js) with an object oriented
API
● Clear documentation of API and
examples for each module
● Free Open Source licensing (MIT license)
● Developed with the community, for the
community
API providing low-level and high-level
wrappers to low-level communication
protocols development platforms.
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
UPM – Useful Packages & Modules for mraa.io
UPM is a software suite supporting over 250 sensors
and actuators
http://upm.mraa.io
25 25
Sensors
Actuators
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
24Intel Confidential
OpenOCD*-
based JTAG
DEBUGGERCOMPILERS & LIBRARIES
Code running on bare metal or real-time operating system
JTAG Debug &
Flash ProgrammingC Compilers
Optimized C, Floating
Point, Sensor, Crypto
& DSP libraries
Intel® Quark™ microcontroller-based systems
ANALYZER
Power
Analysis
Eclipse*, Sample Code,
HW Abstraction API,
Board Support Package
Intel® System™ Studio for Microcontrollers
Empowering Intel® Quark™ Microcontroller Developers to Create Fast, Intelligent Things
 Free, comprehensive and easy to use
 Optimized for Intel® Quark™ microcontrollers
 Offer insight into sources of excess power consumption
 Quickly help resolve issues in MCU-based systems
Createsmartercode—smarter,withIntel®SystemStudioforMicrocontrollers
Learn more at: http://bit.ly/system-studio-microcontrollers
IDE & SOFTWARE
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
25
Intel® System Studio for Microcontrollers
Intel® Quark™ microcontroller
INTEL® Quark™ microcontroller D2000, INTEL®
Quark™ SE microcontroller C1000, and INTEL® Curie
Module, Arduino/Genuino 101*, tinyTILE*, Arrow
Panther Board*
Intel® Quark™
microcontroller D1000
Compilers &
Libraries
GNU* C Compiler
Intel® Compiler for Intel® Quark™ Microcontrollers
Runtime Libraries (C or C/C++)
Intel® IPP for Microcontrollers (DSP Library)
Floating Point Emulation Library
Sensor Library (mraa/upm)
TinyCrypt* Library
System &
Application
Debugger
OpenOCD* JTAG Debugger
Intel-enhanced GDB* Application Debugger
Energy Analysis Energy Analyzer
Software
Sample Applications
Board Support Package (BSP)
Quark Microcontroller Software Interface (QMSI)
Environment
Eclipse* Integrated Development Environment
Command line
Host Operating Systems Linux*, Windows* Linux*, Windows*
Target Environment / Operating Systems
Bare metal and real-time operating
system
Bare metal
Intel Confidential
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
27
Smart Home Monitoring System - Prototype
 Intel® Atom™ Based IoT Gateway
 Environment monitoring
– Intel® Quark™ SE Microcontroller C1000 based sensor nodes
– Use Bluetooth* Low Energy for communication
 Face detection and recognition
– OpenCV* optimized with Intel® Integrated Performance Primitives
 HVAC control, locks control, etc.
– MRAA and UPM Sensor Libraries
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
28
 Intel® NUC (Apollo Lake)
 Additional Hardware:
– Arduino 101 for GPIO extension
– Seeed Studio* Grove Starter kit
 Use Ubuntu* Linux for development
 Software installation
– MRAA and UPM
– Bluetooth® support and PyGATT package
– Sqlite3 and cloud connector
IoT Gateway Setup
Intel® NUC
NUC6CAYS
Arduino* 101 seeed*
Grove Starter kit
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
29
IoT Gateway – Sensors and Actuators Control
Prototype using MRAA/UPM library
Python* bindings
 Rapid prototyping
 Simple and consistent API
from upm import pyupm_grove as grove
import mraa
...
# Initialize temperature sensor
sensor = grove.GroveTemp(512, 0.66)
# Initialize relays on pins 7 and 8
relay1 = grove.GroveRelay(512 + 7)
relay2 = grove.GroveRelay(512 + 8)
...
relay2.off()
relay1.on()
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
30
 Analysis: Intel® VTune Amplifier
 Cause: Stock Ubuntu OpenCV* is not
optimized
 Solution: Rebuild OpenCV*
– Intel® C/C++ Compiler
– Intel® Integrated Performance Primitives
library
 Result: More than x2 speed-up
Face Detection and Recognition:
Performance Issues
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
31
 Intel® Quark™ SE Microcontroller
Evaluation Kit C1000
 Bosch* BME280 integrated
environmental sensor
 Intel® System Studio for Microcontrollers
– Zephyr* Real-time Operating System
– Zephyr* built-in BME280 driver
– More sensors in UPM Drivers Library
Sensor Node Setup
Intel® Quark™ SE Microcontroller
Evaluation Kit C1000
Bosch* BME280
integrated
environmental
sensor
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
32
 BLE - Environmental Sensing Profile
Peripheral sample
 Zephyr* Bosch* BME280 driver
Sensor Node – Software Development
#define SENSOR_DEVICE_NAME "BME280"
char *sensor_dev_name = SENSOR_DEVICE_NAME;
int sensor_channels[] = {SENSOR_CHAN_TEMP,
SENSOR_CHAN_PRESS, SENSOR_CHAN_HUMIDITY};
struct device *dev;
struct sensor_value val;
unsigned int i;
int rc;
dev = device_get_binding(sensor_dev_name);
rc = sensor_sample_fetch(dev);
for (i = 0; i < 3; i++) {
rc = sensor_channel_get(dev, sensor_channels[i], &val);
}
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
33
 Using UPM Bosch* BME280 driver
Sensor Node – Software Development
#include "bmp280.h"
float temp, pressure, humidity;
/* Instantiate a BME280 using default I2C bus and address */
bmp280_context sensor = bmp280_init(BME280_DEFAULT_I2C_BUS,
BME280_DEFAULT_ADDR, -1);
bmp280_update(sensor);
temp = bmp280_get_temperature(sensor);
pressure = bmp280_get_pressure(sensor);
humidity = bmp280_get_humidity(sensor);
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
35
Resources
 Intel® System Studio
– https://software.intel.com/en-us/system-studio/2017
 Intel® System Studio for Microcontrollers
– https://software.intel.com/en-us/intel-system-studio-microcontrollers
– Zephyr* RTOS: https://www.zephyrproject.org/
 Intel® IoT Developer Kit:
– Intel® System Studio IoT Edition:
– https://software.intel.com/en-us/iot/tools-ide/ide/iss-iot-edition
– MRAA: http://mraa.io
– UPM: http://upm.mraa.io
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
36
Resources - Intel® IoT Path to Product
 Smart Home
– https://software.intel.com/en-us/articles/iot-path-to-product-smart-home
 Transportation Case Study
– https://software.intel.com/en-us/articles/intel-iot-commercial-dev-kit-
path-to-product
 The Making of an Intelligent Vending Machine
– https://software.intel.com/en-us/articles/path-to-product-the-making-of-
an-intelligent-vending-machine
Copyright © 2017, Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.
Optimization Notice
Legal Disclaimer & Optimization Notice
INFORMATION IN THIS DOCUMENT IS PROVIDED “AS IS”. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO
ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. INTEL ASSUMES NO LIABILITY WHATSOEVER AND
INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO THIS INFORMATION INCLUDING LIABILITY OR
WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT,
COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors.
Performance tests, such as SYSmark and MobileMark, are measured using specific computer systems, components, software,
operations and functions. Any change to any of those factors may cause the results to vary. You should consult other information
and performance tests to assist you in fully evaluating your contemplated purchases, including the performance of that product
when combined with other products.
Copyright © 2016, Intel Corporation. All rights reserved. Intel, Pentium, Xeon, Xeon Phi, Core, VTune, Cilk, and the Intel logo are
trademarks of Intel Corporation in the U.S. and other countries.
Optimization Notice
Intel’s compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel
microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the
availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent
optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture
are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the
specific instruction sets covered by this notice.
Notice revision #20110804
37
Software Development Tools for Intel® IoT Platforms

Software Development Tools for Intel® IoT Platforms

  • 1.
    Sergey Kiselev Technical ConsultingEngineer Intel Developer Products Division
  • 2.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 2 Agenda  IoT Challenge and Intel® System Studio Overview  Build: Intel® C/C++ Compilers; Performance optimized libraries  Optimize: Intel® VTune Amplifier; Intel® Energy Profiler; Intel® Inspector  Other Intel® software development tools – Intel® IoT Developer Kit – Intel® System Studio for Microcontrollers  Implementing an IoT Solution with Intel® System Studio  Questions and Answers  Resources
  • 4.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 44 Connected Devices are Increasing in Complexity & are Everywhere Challenges & Opportunities are Increasing for System & Embedded Developers To address these challenges, software developers need tools that…  Are comprehensive and easy to use  Quickly help resolve defects in complex systems  Offer insight into sources of excess power consumption  Enable & accelerate performance - demanding & unique, competitive use cases Networks & CommunicationTransportation MedicalIndustrial Military, Aerospace, Government Retail $$ Imaging Digital Security Surveillance Client & Mobile Cloud / data centers / storage IoT Devices F 143 bpm Gateways
  • 5.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 5 Intel® System Studio - A Comprehensive Tool Suite Provides Deep System-wide Insight for System & Embedded Developers 5  Enables & accelerates performance-demanding use cases  Offers insight into sources of excess power consumption  Quickly helps resolve defects in complex systems  Is comprehensive & easy to use Develop Embedded Solutions Faster - Learn more: intel.ly/system-studio 1 Linux*, Embedded Linux*, Wind River* Linux*, Yocto* Project 2 UEFI: Unified Extensible Firmware Interface COMPILER & LIBRARIES ANALYZERS DEBUGGERS UEFI*2 Agent JTAG, JTAG over USB Simics* Platform Simulation System and Application Code Running on Linux*1, Android*, Windows* or VxWorks* Intel® Architecture-based Platforms C/C++ Compiler Image, Signal, Math and Data Processing Power & Performance Memory & Threading Application & System Debug & Trace TARGET SYSTEM
  • 6.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 6 Editions & Configurations Intel® System Studio 2017 Composer Edition Professional Edition Ultimate Edition Build Intel® C++ Compiler Intel® Threading Building Blocks Intel® Integrated Performance Primitives Intel® Math Kernel Library √ √ √ √ √ √ √ √ √ √ √ √ Analyze Intel® VTune Amplifier for Systems – Performance Profiler Intel® Energy Profiler Intel® Graphics Performance Analyzers Intel® Inspector – Memory & Thread Debugger √ √ √ √ √ √ √ √ Debug GDB Application Debugger3 Intel® System Debugger GDB over OpenOCD3 √ √ √ √ √ Host Operating Systems Linux*, Windows* Target Operating Systems1 Linux*2, Android*, Windows* Hardware Processors & Platforms4 Processors: Intel® Quark™ X1000 Processor, Intel® Atom™ x3/x5/x7 SoC Processor Series, Intel® Core™ M Processors, Intel® Core™ i3/i5/i7 Processor Series, Intel® Xeon® Processors Development Platforms: Intel® Edison Development Platform, Intel® Joule IoT Module, Intel® Puma™6-Media Gateway, Intel® Galileo Gen 2 Board 1 Target OS licenses available: Linux*+Android* (combined), Windows* 2 Linux*, Embedded Linux*, Wind River* Linux*, Yocto* Project 3 Supported on Linux* target OSes 4 See release notes for detailed information about supported processors and platforms Additional configurations including, floating, academic and VxWorks* support, are available at: software.intel.com/en-us/intel-system-studio/try-buy All editions include 1 year of renewable Intel® Premier Support.
  • 8.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 8 Coremark Pro* benchmarks running on Intel Atom processors Intel® C++ Compilers deliver Impressive Performance on Embedded Applications powered by Intel® Atom™ processors Clang 3.8 GCC 6.1.0 Intel® C++ 16.0 Intel® C++ 17.0 Clang 3.8 GCC 6.1.0 Intel® C++ 16.0 Intel® C++ 17.0 32-bit mode 64-bit mode Configuration: Intel® Atom CPU C2750 @ 2.41GHz. Software: Intel® C++ Compiler 17.0, Intel C++ compiler 16.0, GCC 6.1.0, Clang/LLVVM 3.8. Linux OS: Red Hat Enterprise Linux* 7.0, Kernel 3.10.0-123.el7.x86_64, 32GB RAM. Coremark Pro* Benchmark (www.eembc.org). Compiler flags: Intel C++ 17.0: -O3 -ipo -no-prec-div -ansi-alias -xATOM_SSE4.2 -static; Intel C++ 16.0: -O3 -ipo -no-prec-div -ansi-alias -xATOM_SSE4.2 -static; GCC 6.1.0: -Ofast -mfpmath=sse -flto -march=native -funroll-loops -ffat-lto- objects; LLVM 3.8: -Ofast -mfpmath=sse -flto -march=native -funroll-loops -static. GCC and clang/LLVM 32bit compilers have additional flag –m32. Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors. Performance tests, such as SYSmark & MobileMark, are measured using specific computer systems, components, software, operations and functions. Any change to any of those factors may cause the results to vary. You should consult other information & performance tests to assist you in fully evaluating your contemplated purchases, including the performance of that product when combined with other products. Benchmark Source: Intel Corporation - Optimization Notice: Intel’s compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets & other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User & Reference Guides for more information regarding the specific instruction sets covered by this notice. Notice revision #20110804 .
  • 9.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Your Building Blocks for Image, Signal & Data Processing Apps Intel® Integrated Performance Primitives (Intel® IPP) Optimized for Supports Addresses What is Intel® IPP? Provides developers with ready- to-use, processor- optimized functions to accelerate Image, Signal, Data Processing & Cryptography computation tasks Why use Intel® IPP? • High Performance • Easy to use API’s • Faster Time To Market • Production Ready Image Processing • Medical Imaging • Computer Vision • Digital Surveillance • Biometric Identification • Automated Sorting • ADAS • Visual Search Signal Processing • Games (sophisticated audio content or effects) • Echo cancellation • Telecommunications • Energy Data Compression & Cryptography • Data centers • Enterprise data Managements • ID verification • Smart Cards/wallets • Electronic Signature • Information security/cybersecurity How to get Intel® IPP Intel System Studio Intel Parallel Studio XE Free Tools Program Find out more at: software.intel.com/intel-ipp Contact us: software.intel.com/en-us/forums/intel-integrated-performance-primitives 9
  • 10.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 10 Tencent Speeds its Illegal Image Filter System by >2x with Intel® Integrated Performance Primitives
  • 12.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Get Faster Code Faster with Accurate Data & Meaningful Analysis  Accurate CPU, GPU & threading data  Memory access & storage analysis  Powerful data analysis & filtering  Data displayed on the source code  Easy set-up, no special compiles Faster, Scalable Code, Faster Intel® VTune™ Amplifier Performance Profiler intel.ly/vtune-amplifier-xe Claire Cates Principal Developer SAS Institute Inc. “Last week, Intel® VTune™ Amplifier helped us find almost 3X performance improvement. This week it helped us improve the performance another 3X.” 12
  • 13.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Find Answers Fast Intel® VTune™ Amplifier Double Click Function to View Source Adjust Data Grouping … (Partial list shown) Click [+] for Call Stack Filter by Timeline Selection (or by Grid Selection) Filter by Process & Other Controls Tuning Opportunities Shown in Pink Hover for Tips 13
  • 14.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Timeline Visualizes Thread Behavior Intel® VTune™ Amplifier Optional: Use API to mark frames and user tasks Optional: Add a mark during collection CPU Time Hovers: Transitions Basic Hotspots Advanced HotspotsLocks & Waits 14
  • 15.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Visualize Parallel Performance Issues Look for Common Patterns Coarse Grain Locks High Lock Contention Load Imbalance Low Concurrency 15
  • 16.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Caller / Callee – Analyze Parent/Child Intel® VTune™ Amplifier Click on a function in the left pane to see data for the callers & callees Quickly Find the Bottleneck in Time Critical Call Paths 16
  • 17.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 17 Quickly Identify Software that is Wasting Power Actionable Wake-Up, Sleep State, Frequency & Temperature Data Intel® Energy Profiler  Consolidate wake-ups & save energy by remaining in a lower power state for longer periods of time, leading to longer battery life  Optimize fan-less systems thermals software.intel.com/en-us/intel-energy-profiler The lower the core frequency over time, the better the power efficiency C6 deep sleep mode causes less power consumption
  • 18.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Correctness Tools Increase ROI By 12%-21%1  Errors found earlier are less expensive to fix  Several studies, ROI% varies, but earlier is cheaper Diagnosing Some Errors Can Take Months  Races & deadlocks not easily reproduced  Memory errors can be hard to find without a tool Debugger Integration Speeds Diagnosis  Breakpoint set just before the problem  Examine variables & threads with the debugger Find & Debug Memory & Threading Errors Memory & Thread Debugger – Intel® Inspector Debugger Breakpoints Diagnose in hours instead of months Intel® Inspector dramatically sped up our ability to track down difficult to isolate threading errors before our packages are released to the field. Peter von Kaenel, Director, Software Development, Harmonic Inc. 1 Cost Factors – Square Project Analysis CERT: U.S. Computer Emergency Readiness Team, and Carnegie Mellon CyLab NIST: National Institute of Standards & Technology : Square Project Results intel.ly/inspector-xe 18
  • 19.
  • 20.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Intel® IoT Gateway Tools to Ease System & Embedded Development Intel® System Studio Develop Embedded Solutions Faster Intel® System Studio for Microcontrollers Expedient Tools for Creating Microcontroller-based Solutions For CPU-based System & Embedded Developers 3 Editions: Composer, Professional, Ultimate Additional Free Toolkits Intel® Computer Vision SDK Intel® Media SDK or Intel® Media Server Studio Intel® SDK for OpenCL™ Applications Accelerate Computer Vision Solutions Fast, Dense Media Processing Optimize Compute with Intel Graphics IoT Edition Get Your IoT Gateway to Market Quickly & Easily Intel® IoT Developer Kit The Easy Way to Create IoT Solutions OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. 20
  • 21.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 21 IDE/ToolsHardwareOSImageMiddlewareCloud Edge Analytics Intel® IoT Developer Kit software.intel.com/iot API Bindings (C,C++,Node.JS,Python,Java) Intel® Edison Board Intel® IoT Gateway Prototyp e Evaluate/ Develop/ Deploy MCUs (Intel® Quark™ SE Microcontroller, Intel® Quark™ Microcontroller D2000 Actuators Trusted Analytics Platform IBM* BlueMix*, Microsoft* Azure*, Amazon* AWS*,AT&T*, etc. IoT Edge Analytics Communication Stack (Wi-Fi, Bluetooth® Technology, ZigBee*, etc.) Manageability, Security, cloud connectors, etc. Sensor & Actuator Libraries IO Library (SPI, GPIO, I2C, AIO, UART) Intel® Galileo Board IDP / Workbench Sensors Intel® Supports Intel® Edison board, Intel® Galileo board, Intel® IoT Gateway, & MCUs Middleware libraries for IO and sensors/ actuators IDEs & tools to create, run, debug & optimize IoT solutions  Intel System Studio IoT Edition  Intel XDK IoT Edition  Wind River* Helix* Cloud  MCU development tools  C, C++, JavaScript, Python & Java programming language support IoT Cloud & Edge Analytics for data collection, visualization & analytics
  • 22.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice libmraa – mraa.io for GNU/Linux ● Supports multiple platforms: Galileo, MinnowBoard, Edison, Joule, .. ● Board detection done automatically ● Provides clear pin mapping & capabilities ● Supports low level programing languages C & C++ ● Supports high level scripting languages (python, node.js) with an object oriented API ● Clear documentation of API and examples for each module ● Free Open Source licensing (MIT license) ● Developed with the community, for the community API providing low-level and high-level wrappers to low-level communication protocols development platforms.
  • 23.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice UPM – Useful Packages & Modules for mraa.io UPM is a software suite supporting over 250 sensors and actuators http://upm.mraa.io 25 25 Sensors Actuators
  • 24.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 24Intel Confidential OpenOCD*- based JTAG DEBUGGERCOMPILERS & LIBRARIES Code running on bare metal or real-time operating system JTAG Debug & Flash ProgrammingC Compilers Optimized C, Floating Point, Sensor, Crypto & DSP libraries Intel® Quark™ microcontroller-based systems ANALYZER Power Analysis Eclipse*, Sample Code, HW Abstraction API, Board Support Package Intel® System™ Studio for Microcontrollers Empowering Intel® Quark™ Microcontroller Developers to Create Fast, Intelligent Things  Free, comprehensive and easy to use  Optimized for Intel® Quark™ microcontrollers  Offer insight into sources of excess power consumption  Quickly help resolve issues in MCU-based systems Createsmartercode—smarter,withIntel®SystemStudioforMicrocontrollers Learn more at: http://bit.ly/system-studio-microcontrollers IDE & SOFTWARE
  • 25.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 25 Intel® System Studio for Microcontrollers Intel® Quark™ microcontroller INTEL® Quark™ microcontroller D2000, INTEL® Quark™ SE microcontroller C1000, and INTEL® Curie Module, Arduino/Genuino 101*, tinyTILE*, Arrow Panther Board* Intel® Quark™ microcontroller D1000 Compilers & Libraries GNU* C Compiler Intel® Compiler for Intel® Quark™ Microcontrollers Runtime Libraries (C or C/C++) Intel® IPP for Microcontrollers (DSP Library) Floating Point Emulation Library Sensor Library (mraa/upm) TinyCrypt* Library System & Application Debugger OpenOCD* JTAG Debugger Intel-enhanced GDB* Application Debugger Energy Analysis Energy Analyzer Software Sample Applications Board Support Package (BSP) Quark Microcontroller Software Interface (QMSI) Environment Eclipse* Integrated Development Environment Command line Host Operating Systems Linux*, Windows* Linux*, Windows* Target Environment / Operating Systems Bare metal and real-time operating system Bare metal Intel Confidential
  • 27.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 27 Smart Home Monitoring System - Prototype  Intel® Atom™ Based IoT Gateway  Environment monitoring – Intel® Quark™ SE Microcontroller C1000 based sensor nodes – Use Bluetooth* Low Energy for communication  Face detection and recognition – OpenCV* optimized with Intel® Integrated Performance Primitives  HVAC control, locks control, etc. – MRAA and UPM Sensor Libraries
  • 28.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 28  Intel® NUC (Apollo Lake)  Additional Hardware: – Arduino 101 for GPIO extension – Seeed Studio* Grove Starter kit  Use Ubuntu* Linux for development  Software installation – MRAA and UPM – Bluetooth® support and PyGATT package – Sqlite3 and cloud connector IoT Gateway Setup Intel® NUC NUC6CAYS Arduino* 101 seeed* Grove Starter kit
  • 29.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 29 IoT Gateway – Sensors and Actuators Control Prototype using MRAA/UPM library Python* bindings  Rapid prototyping  Simple and consistent API from upm import pyupm_grove as grove import mraa ... # Initialize temperature sensor sensor = grove.GroveTemp(512, 0.66) # Initialize relays on pins 7 and 8 relay1 = grove.GroveRelay(512 + 7) relay2 = grove.GroveRelay(512 + 8) ... relay2.off() relay1.on()
  • 30.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 30  Analysis: Intel® VTune Amplifier  Cause: Stock Ubuntu OpenCV* is not optimized  Solution: Rebuild OpenCV* – Intel® C/C++ Compiler – Intel® Integrated Performance Primitives library  Result: More than x2 speed-up Face Detection and Recognition: Performance Issues
  • 31.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 31  Intel® Quark™ SE Microcontroller Evaluation Kit C1000  Bosch* BME280 integrated environmental sensor  Intel® System Studio for Microcontrollers – Zephyr* Real-time Operating System – Zephyr* built-in BME280 driver – More sensors in UPM Drivers Library Sensor Node Setup Intel® Quark™ SE Microcontroller Evaluation Kit C1000 Bosch* BME280 integrated environmental sensor
  • 32.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 32  BLE - Environmental Sensing Profile Peripheral sample  Zephyr* Bosch* BME280 driver Sensor Node – Software Development #define SENSOR_DEVICE_NAME "BME280" char *sensor_dev_name = SENSOR_DEVICE_NAME; int sensor_channels[] = {SENSOR_CHAN_TEMP, SENSOR_CHAN_PRESS, SENSOR_CHAN_HUMIDITY}; struct device *dev; struct sensor_value val; unsigned int i; int rc; dev = device_get_binding(sensor_dev_name); rc = sensor_sample_fetch(dev); for (i = 0; i < 3; i++) { rc = sensor_channel_get(dev, sensor_channels[i], &val); }
  • 33.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 33  Using UPM Bosch* BME280 driver Sensor Node – Software Development #include "bmp280.h" float temp, pressure, humidity; /* Instantiate a BME280 using default I2C bus and address */ bmp280_context sensor = bmp280_init(BME280_DEFAULT_I2C_BUS, BME280_DEFAULT_ADDR, -1); bmp280_update(sensor); temp = bmp280_get_temperature(sensor); pressure = bmp280_get_pressure(sensor); humidity = bmp280_get_humidity(sensor);
  • 35.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 35 Resources  Intel® System Studio – https://software.intel.com/en-us/system-studio/2017  Intel® System Studio for Microcontrollers – https://software.intel.com/en-us/intel-system-studio-microcontrollers – Zephyr* RTOS: https://www.zephyrproject.org/  Intel® IoT Developer Kit: – Intel® System Studio IoT Edition: – https://software.intel.com/en-us/iot/tools-ide/ide/iss-iot-edition – MRAA: http://mraa.io – UPM: http://upm.mraa.io
  • 36.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 36 Resources - Intel® IoT Path to Product  Smart Home – https://software.intel.com/en-us/articles/iot-path-to-product-smart-home  Transportation Case Study – https://software.intel.com/en-us/articles/intel-iot-commercial-dev-kit- path-to-product  The Making of an Intelligent Vending Machine – https://software.intel.com/en-us/articles/path-to-product-the-making-of- an-intelligent-vending-machine
  • 37.
    Copyright © 2017,Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Legal Disclaimer & Optimization Notice INFORMATION IN THIS DOCUMENT IS PROVIDED “AS IS”. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO THIS INFORMATION INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors. Performance tests, such as SYSmark and MobileMark, are measured using specific computer systems, components, software, operations and functions. Any change to any of those factors may cause the results to vary. You should consult other information and performance tests to assist you in fully evaluating your contemplated purchases, including the performance of that product when combined with other products. Copyright © 2016, Intel Corporation. All rights reserved. Intel, Pentium, Xeon, Xeon Phi, Core, VTune, Cilk, and the Intel logo are trademarks of Intel Corporation in the U.S. and other countries. Optimization Notice Intel’s compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice. Notice revision #20110804 37