Before we go about writing the code for the microcontroller programming, it is important to make sure that everyone can follow along the coding process regardless of the operating system they use. Majority of the PCs or Laptops in today’s time would be running either 1. Windows, 2. MacOS or 3. Linux. Even though the software necessary for microcontroller programming can be set-up in many ways for each operating system, the goal here is to make the process independent of the operating system being used. Upcoming paragraphs discuss how this is achieved for each operating system.
MacOS and Linux are very similar in operation for the purpose of the microcontroller programming in this book. The small changes necessary to make MacOS behave as expected are provided below.
zsh
is being used as the default shell. If bash
is being used then continue to the Bash Steps%
symbol, also called a ‘Prompt’, represents start of the line, so don’t type it.
% chsh -s /bin/bash
Exit the terminal app and reopen it. Note that it is now using bash
as the default shell. Also, the prompt, %
for zsh
, is now changed to $
.
To get Windows to a similar state, a virtual Linux operating system can be installed in it. Windows provides WSL for this purpose. A brief installation guide for WSL is provided at https://learn.microsoft.com/en-us/windows/wsl/install. Following are the step-wise instructions with images to install WSL.
Contact your TA or instructor if you don't feel comfortable changing options in your BIOS.
Contact your TA or instructor if you find the steps given in the link too dificult to follow.
Type wsl --install
. This will enable and install some software components in Windows. It will also install a Linux distribution called Ubuntu in Windows. Once the installation is finished, you’ll receive a message as shown below.
The software necessary to develop the C/C++ code for the microcontroller can be installed now. Instructions for installing this software for Raspberry Pi Pico can be found in its Getting Started guide. Upcoming sections provide a more detailed version of the same.