Any text editor, like Notepad, TextEdit, Notepad++, etc., can be used to write C/C++ code for the microcontroller. However, we will use VSCode (Visual Studio Code) in this class because it has a great deal of extra functionalities that makes writing the code easier. These functionalities include syntax highlighting, suggestions, Auto-Complete, and many more. It also interfaces with CMake so that the code can be compiled into a binary with a single click. Following are the steps for setting up VSCode properly. Instructions to install Visual Studio Code are given separately for MacOS and Windows/Linux
Follow the steps shown below. Make sure to tick ‘Open with VSCode’
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Step 8
Step 9
Step 10
Step 11
Install `WSL’ extensions.
Step 1
Step 2
Step 3
Step 4
Step 5
Follow the images below to open WSL in VSCode. Note that when you switch to WSL in VSCode, you’ll see WSL:Ubuntu written in the bottom left blue colored area.