Embedded Computing
  • About
  • Blog
  • Hardware
    • Which Platform?
    • Controller Platforms >
      • Adafruit Platform
      • Arduino Plaform
      • BBC micro:bit
      • Espressif Platform
      • iLabs Platform
      • Raspberry Pi Platform (MCU)
      • Seeed Platform
      • Silicon Labs Platform
      • Teensy Plaform
    • Computer Platforms >
      • BeagleBone Platform
      • Raspberry Pi Platform (SBC)
      • UDOO Platform
    • Peripherals >
      • Shields
      • Grove System
      • Sensors
      • Actuators
    • Displays >
      • E-Paper Displays
      • Reflective Displays
      • TFT Displays
      • LCD Displays
    • Legacy Platforms >
      • chipKIT Plaform
      • 4D Systems Platform
      • Intel Platform
      • LaunchPad Plaform
      • BoosterPacks for LaunchPads
      • LightBlue Bean
      • Maple Plaform
      • Mediatek Platform
      • Microsoft Azure IoT DevKit
      • Particle Platform
  • Software
    • Exploring RTOS with Galaxia >
      • Event Library
      • Semaphore Library
      • Mailbox Library
      • Timer Library
      • Clock Library
      • SWI Library
      • Task Library
    • Ultra-Low Power with EnergyTrace >
      • Ultra-Low Power with MSP430
      • Ultra-Low Power with Energia MT and Galaxia
    • Using Integers Instead of Reals
    • Going Python?
  • IoT
    • IoT Platforms: Which Hardware? >
      • Matter with Silicon Labs MG24
    • IoT Services: Which Solution? >
      • Recommended IoT Solutions
      • Platform-Specific IoT Solutions
      • Other IoT Solutions
      • Not tested IoT Solutions
      • Notification Solutions
    • Get Date and Time from Internet with NTP
    • Fast and Easy WiFi Connection with QR-Code
  • Tools
    • How to Start?
    • Reference >
      • Asking for Help
      • Boards Pins Maps
      • Ruler
      • Boards and Plugs
      • I²C Logic Level Converter
      • Standards for Connectors
    • Training >
      • Texas Instruments Workshops
      • Embedded Systems: Shape The World — MOOC edX UTAustinX UT.6.02x
      • Embedded Systems - Shape The World: Microcontroller Input/Output — MOOC edX UTAustinX UT.6.10x
      • Embedded Systems - Shape The World: Multi-Threaded Interfacing — MOOC edX UTAustinX UT.6.20x
      • Real-Time Bluetooth Networks: Shape the World — MOOC edX UTAustinX UT.RTBN.12.01x
      • Systems Thinking with Texas Instruments Robotics System Learning Kit
    • Books >
      • Getting Started with the MSP430 LaunchPad
      • Getting Started with Arduino
      • Arduino Cookbook
    • IDE >
      • The Battle of IDEs
      • More Options
      • Assessing the Next Generation of IDEs
      • Tools for Documentation
    • Equipment >
      • Saleae Logic Analyser
      • Rigol DS1102E Oscilloscope
      • XDS110 Debug Probe with EnergyTrace​
      • Segger J-Link Programmer-Debugger
      • Nordic Power Profiler Kit II
  • Projects
    • Libraries >
      • Master I²C Software Library
      • Date and Time Library
      • highView Library Suite
      • Others Libraries
    • smartDevices >
      • I²C smartColours Smart Sensor
      • I²C smartRFID Smart Sensor
      • I²C smartLED Display
      • I²C smartControls Smart Device
      • I²C smartWiFi Smart Device
      • I²C smartBLE Smart Device
      • I²C smartNode Smart Device
    • IoT Projects >
      • Remote E-Paper Weather and Message Board
      • Typie-Walkie with LoRa and E-Paper Screen
      • Typie-Walkie with E-Paper Screen
      • Remote e-Paper Pictures Panel
      • Remote e-Paper Messages Panel
      • Industrial IoT Project
      • Remote Contactless Temperature Monitor
      • Using Node-RED for IIoT
      • Low Power Home Network Weather Monitoring
      • Updated Low Power Home Network Weather Monitoring
      • Weather and Security Station with Blynk
      • SensorTag to Blynk Using Node-RED
      • Pervasive Reporting
    • AI Projects >
      • Colour Recognition with Neural Network
    • Other Projects >
      • Air Quality Monitoring
      • Driving a Large E-Paper Display with a Compact Xiao RP2040
      • Low-Power E-Paper Weather Station
      • Portable Particulate​ Matter Monitor
      • FRAM-based E-Paper Screen Controller
      • General Purpose 3.5" Screen
      • Colour Recognition with Neural Network
      • A Low Power Weather Station
      • Digital Volt-Amp-Watt Meter
      • Mobile Measurement with LCD Display
      • Screen with SRAM for GUI
      • Volt-Amp-Watt-Meter for Grove
      • Multi-Touch Project with CapTIvate

Arduino Extension for Visual Studio Code​

This is the second test with Visual Studio Code, this time with the dedicated Arduino extension. 

The Arduino extension requires the C/C++ extension, both developed by Microsoft.
​
The Visual studio Code website provides all the required documentation for configuring Visual Studio Code.
Picture
Picture
Picture
Visual Studio Code with the C/C++ and Arduino extensions

Using the Experimental Arduino Extension

This extension requires the Arduino IDE to be installed and actually acts as a front end. All tasks are performed by the Arduino IDE, with a nasty splash screen shown each time (pictured).

At launch, Visual Studio Code requires an internet connection and goes through a lengthy download of platform files (pictured).

At launch, Visual Studio Code requires an internet connection and goes through a lengthy download of platform files (pictured). 

Unfortunately, the extension still relies on arduino_builder, the Arduino proprietary build manager, both slow and non-standard.
Picture
I like the integration for the board selection, as well as with the Board Manager (pictured) and the Libraries Manager.

​All those features require to press cmd-shift-P on macOS or ctrl-shift-P on Windows to call the command menu, then type Arduino and select Arduino: Boards Manager.  

Let's hope next iteration of this extension will feature a native build manager. ​​

Picture
New release 0.2.3 features debugging, based on OpenOCD.

​Only a very limited set of boards are supported, as very few Arduino boards feature a built-in debugger. Interestingly, Microsoft is promoting its own board, the Microsoft Azure IoT Developer Kit.

I set two breakpoints (one standard and another conditional, (pictured) and one watchpoint against the Arduino M0 Pro board. 

​The procedure is well documented at the Debug your Arduino code with Visual Studio Code page.
​
Picture
On debugging mode, the left pane lists the variables, the watchpoints, the call stack and the breakpoints. 

A floating tool-bar provides the different stepping modes, Continue, Step Over, Step Into, Step Out, Restart and Stop.

Picture
Picture

Conclusion

The biggest draw-back of the Arduino extension comes from the limitation of the extension, actually a mere front-end relying on the slow and non-standard Arduino proprietary build manager. 

However, the extension is still at an early stage. Developers are working fast, and considering implementing support for another build manager, as spotted on the dedicated Gitter room. The source code is available at GitHub.

In 2021, the Arduino extension has been dramatically improved. Many issues have been solved: the underlying Arduino splash screen no longer shows up every time, the whole extension runs faster.

Now, with the release of the Arduino IDE 2.0 based on Eclipse Theia, the future of the Arduino extension isn't clear.

Pros

  • Great editor
  • Recommended extensions
  • ​Debugging available
  • Source code available

Cons

  • Extension over-reliant on Arduino IDE
  • Future of the extension?

Wrap-Up

  • Go for the implementation based on the makefiles
  • Responsive development team

Links

  • Arduino for Visual Studio Code extension by Microsoft
  • GitHub repository
  • C/C++ extension by Microsoft
  • Dedicated Gitter room for Arduino extension
  • ​​embedXcode
Picture
Picture

Posted April 17, 2017
Updated June 16, 2017, 18 Aug 2019, 03 Jan 2022

Powered by Create your own unique website with customizable templates.