A new and improved version of where I setup the Standard C tool chain for the ATmega328P on the Raspberry Pi, however I use VS Code on my Mac (or Windows) for development and connect via SSH to the Raspberry Pi. This is the easy setup and requires the least amount of tool installation.
Note: This new, “easy” version is due to using Raspberry Pi OS Trixie, which now provides fairly up-to-date tools for the AVR microcontollers. The previous version has been deprecated. Make sure you are on the latest version of Raspberry Pi OS (which as of December 2025 is Trixie.
Where I describe the process of developing code for the Microchip ATtiny13A, starting at the chip level.
This is the first in a series of posts describing how to begin developing at the chip level (as compared to board level). In this series, I’ll be using a Microchip ATtiny13A, which is a minimal version of an ATmega328P, the microcontroller used in the Arduino Uno R3.
The chip has the following:
Where I discuss in detail, adding a second serial port to the Uno, soft_serial, and how to use it.
While I was developing code for a robotic arm, I realized it would be best, if I used one serial port for communicating with the arm and another serial port to accept commands for the arm. Thus I created a second serial port, called soft_serial.
The port didn’t need to be fast, as it would be used as a communication link between someone on a keyboard and the Uno. It needed to do the following:
Where I discuss how to improve on the serial input of C and the ATmega328P and adding a second serial port, soft_serial.
In the example serialio_string (code on GitHub or below), I demonstrate the problem with reading text from the serial port. If you use scanf(), it appears to work well, except you can easily over-run the buffer. For example, the program asks for “up to 7 char”, however, it will accept as many as you are willing to type. More than likely, after about 20 characters, the microcontroller will crash.
Where I demonstrate how to use additional tools such as the serial monitor, tio, along with VS Code on your PC to develop code on your Raspberry Pi for the Arduino Uno (ATmega328P).
Even though VS Code has a serial monitor, in fact, in has many serial monitor extensions, I’ve found tio to be the best. The VS Code version has failed to connect too many times, while tio has been rock solid. It also has a nice configuration method and is easy to connect/disconnect.
Where I demonstrate how to use VS Code on your PC to develop code on your Raspberry Pi for the Arduino Uno (ATmega328P).
Now that you have the best setup for developing code for the Arduino Uno, how do you use it?
You will be using VS Code on your PC to interact with the Raspberry Pi. It provides both the coding environment as well as the terminal to perform provides administrative exercises along with CLI applications like a serial monitor (tio).
DEPRECATED The instructions have been updated for Trixie, here Where I setup the Standard C tool chain for the ATmega328P on the Raspberry Pi, however I use VS Code on my Mac (or Windows) for development and connect via SSH to the Raspberry Pi.
Note: There is a new, “easy” version is due to using Raspberry Pi OS Trixie, which now provides fairly up-to-date tools for the AVR microcontollers. This “easy” version is shorter and easier than the build method (Version 2 below). For those that wish to build the latest tools, use this version.
Updated: Where I discuss a simplified approach to development automation using make in AVR_C, add the ability to use Arduino tools.
The previous explanation provided the Makefile from Elliot Williams and can be viewed here. I have made several significant changes to the file since:
DEPTH variable to each local makefile (the one in the examples folder)Here are detailed instructions as to how to use make, the Makefile and env.make to configure and execute your development process.
Where I discuss the various methods of increasing execution speed in Forth and demonstrate the ease in doing so.
In this entry, I showed the relative speeds of board/language combinations from a ARM M0 running CircuitPython to a Pi Pico running C. While execution speed is important in embedded microcontrollers, development speed is equally important along with ease of development. A great attribute of Forth is its ability to combine all three. In this entry, I’ll show how you can start with a simple, fast example and make it significantly faster without great difficulty.
Where I discus debouncing buttons in Flashforth as well as indexing arrays.
Elliott Williams had a great post several years ago as to the best solution to debouncing buttons. The technique worked extremely well in C, and I wanted to attempt it in Forth. It actually works better in Forth, as Forth easily handles the 16-bit data to de-bounce properly. I’ll work through the technique in FlashForth as well as spend some time at the end as to the execution timing of the technique.