The Development Environment

Dan Goldsmith

Introduction

Topics to Discuss

  • Programming embedded systems
  • Tools we will use
  • Developing, and deploying a simple Embedded program.

What Are Embedded Systems

What are Embedded Systems

  • Traditionally Low Cost Micro-controllers
  • Single Board Computing / SOC
  • Limited processing / memory

What are Embedded Systems

  • Now moved to much more powerful devices
    • ARM based platforms
    • Linux Support
  • Raspberry Pi

Where do we find them

  • Everywhere
    • Consumer, Industrial, Automotive, Military etc.
  • Wireless Sensor Networks
  • The Internet of Things

Question?

What examples of embedded systems can you think of?

Programming Embedded Systems

Programming Embedded Systems

  • Most make use of an C/C++ based approach to developing.
  • Code -> Compile -> Execute life cycle
  • We need a set of tools that supports this.

Development Environment, Decisions

  • Depends on choice of hardware, organisation, and personal preferences:
    • Windows, Linux or Mac?
    • IDE or separate tools?
    • Bare metal or Libraries?

Our Development Environment: Platform IO

  • https://platformio.org/
  • Python based development environment
  • Two “Flavours” Command Line and IDE integration
  • Painless 1

Platform IO: CLI

  • Command Line Interface
    • Set of Python Scripts for generating templates, compiling and debugging embedded systems.
    • Downloads and manages all the requirements for doing what we need to do.
    • Integrates with editor of your choice.
    • 0% Faffing, installs the compilers for you.

Platform IO: IDE

  • We will use the Visual Studio Code2 integration
  • Contains all the tools in one place
    • Writing Code
    • Compiling and Uploading
    • Debugging

Platform IO: Visual Studio Code IDE.

VSCode IDE

Platform IO: Visual Studio Code Development Mode

VSCode IDE

Alternate Development Environments

Discussion of Alternate Tool-chains

  • Development Environments are like clothes:
    • Everyone needs them
    • Personal Preference means a lot

Tool-chains: Bare Bones

  • Install a compiler for the target platform and write Everything by hand
    • Advantages: Ultimate Control over what you do.
      • Editor, Compiler, and Build system
    • Disadvantages: Difficult to setup, difficult to use, steep learning curve.

Tool-chains: Command Line Interfaces

  • Make use of a set of helper scripts to create and manage projects
    • Example: MBED CLI
    • Example: Platform IO CLI
  • Advantages Freedom to use your own editor, but a lot of the hard work is done for you
  • Disadvantages Still a reasonably steep learning curve. Tools are reconfigured.

Tool-chains: CLI with plugin for Editors

  • Platform IO has dedicated support for Atom and VSCode
  • Adds tool-chain dedicated functionality to the editor
  • Advantages Tighter integration between Editor and Tools
  • Disadvantage Lack of dedicated Debugging tools

Dedicated IDE’s: Kiel μVision

  • Dedicated development environment for embedded systems
  • Built in Debugging and testing environment
  • Commercial Licence, but a limited free alternative available
  • Can (in my experience) have a very steep learning curve to setup.
  • Advantages Extremely high level of integration, designed purely for working with these things
  • Disadvantages Cost, Complexity

Dedicated IDE’s: GNU ARM Eclipse

  • Development environment based on Eclipse IDE
  • Combines Editor and Tool-chain
  • Free
  • Can take some time to get things working properly

Tool-chain Summary.

  • We have a choice of using individual tools to integrated environments
  • In the General Case
    • Lower level programs give more control at the expense of usability
    • General purpose IDE’s streamline the development process
    • Dedicated Embedded IDE’s can be expensive, but provide desirable functionality such as debugging

  1. I really mean this, words fail me for how amazing PIO is, compared to the tools I have used before.↩︎

  2. We will use VS Code, integration for other editors are available.↩︎