Skip to content

Instantly share code, notes, and snippets.

View felias-fogg's full-sized avatar
🏠
Working from home

Bernhard felias-fogg

🏠
Working from home
View GitHub Profile
@felias-fogg
felias-fogg / error.c
Last active November 15, 2025 10:21
A small program leading to debugging problems when compiled with avr-gcc 7.3.0
// This program, when compiled with AVR-GCC 7.3.0, the standard version
// for the Arduino AVR framework, will generate wrong debugging information.
// When stopped just before the line buf[0] = ... and setting
// num to 1001, then after two single-steps, num has become 1003 (which
// is not true!), and after another singel-step it is back to 16000.
// You can check that, e.g., by using simavr and avr-gdb.
#include <string.h>
#include <avr/pgmspace.h>