Category: Programming

Everything about programming

Replacing the Wire Library—Sometimes

The featured picture of this blog post is by user18526052 on Freepik.

The Wire library is the one that connects your Arduino to sensors and actuators that communicate using the I2C protocol. Unfortunately, this library has a lot of shortcomings, and often you want to replace it with a different I2C library. Replacing the Wire library on a per-sketch basis turns out to be more complicated than one would expect. In this blog post, I describe an easy way to accomplish that.

Continue reading

Link-Time Optimization and Debugging of Object-Oriented Programs on AVR MCUs

The featured image of this post is based on a picture by TheDigitalArtist on Pixabay.

Link-time optimization (LTO) is a very powerful compiler-optimization technique. As I noticed, it does not go very well together with debugging object-oriented programs under GCC, at least for AVR MCUs. I noticed that in the context of debugging an Arduino program, and it took me quite a while to figure out that LTO is the culprit.

Continue reading

Copyright © 2024 Arduino Craft Corner

Theme by Anders NorenUp ↑