ATtiny13A: Debug Part 2

Where I continue to discus how to debug code on the ATtiny13A on a Linux computer using the Microchip Snap, bloom and avr-gdb. This entry goes into a little more detail as to how to use gdb along with Bloom to debug the ATtiny13A.

Sources#

The code for this article and other articles on the ATtiny13A can be found in the ATtiny13A repository.

Debugging the ATtiny13A — terminal TUI + Bloom Insight#

  avr-gdb  ──►  Bloom  ──►  SNAP  ──►  ATtiny13A
 (TUI in a   (debugWire ↔            (debugWire over RESET)
  terminal)   GDB server,
              Linux only)

The recommended front end is avr-gdb’s built-in terminal TUI, optionally alongside Bloom’s Insight GUI for registers/peripherals/memory. Two heavier frontends — gdbgui (browser) and Sublime + DAP — were explored and rejected; see Explored and rejected for why, so the dead ends aren’t re-walked.

ATtiny13A: Serial Communications

Where I describe the process of developing serial communications for the Microchip ATtiny13A.

Introduction#

Even with a microcontroller with limited capabilities as the ATtiny13A, it is desirable to have the ability to communicate via the serial port. The ATmega328P and others have a UART built-in which makes it much easier to integrate serial communications. With the ATtiny13A, serial communications must be performed completely in software and using assembly language makes it possible and reliable.

ATtiny13A: Multitasking

Where I describe the process of writing and debugging a multitasking program for the Microchip ATtiny13A.

Introduction#

To get the most of any microcontroller, its best to have a framework for multitasking and to ensure it will be as efficient as possible, write it in assembly code. The second aspect to developing the code is debugging it. Which can be problematic, particularly on a chip with limited resources such as the ATtiny13A. This post covers both the code for multitasking and a clever way to determine which tasks are running and for how long.

ATtiny13A: Debug Setup

Where I illustrate how to debug code on the ATtiny13A on a Linux computer using the Microchip Snap, bloom and avr-gdb.

Sources#

The code for this article and other articles on the ATtiny13A can be found in the ATtiny13A repository.

Introduction#

The Microchip SNAP is a low-cost ($11) board which is great for debugging and uploading code to an AVR microcontroller. It is supported by tools such as avrdude and Bloom. While I had attempted to use the Microchip Snap before, I had not any luck. In my attempts to solve this problem, I ran across this link to Bloom: Enabling “AVR mode” on the MPLAB Snap. The article was great for two reasons, first, it explained why the Snap wasn’t working and provided detailed instructions as to how to fix the problem. Second, if you have a Linux computer, Bloom is a great debugging tool!!

ATtiny13A: Introduction

Where I describe the process of developing code for the Microchip ATtiny13A, starting at the chip level.

Introduction#

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:

ATtiny13A Development

Where I describe the process of developing code for the Microchip ATtiny13A, starting at the chip level.

This is a series of posts describing how to develop at the chip level using assembly language and C. 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 code for this article and other articles on the ATtiny13A can be found in the ATtiny13A repository.