For as popular as the Arduino platform is, it’s not without its problems. Among those is the fact that most practical debugging is often done by placing various print
statements throughout the code and watching for them in the serial monitor. There’s not really a great way of placing breakpoints or stepping through code, either. But this project, known as eye2see, hopes to change that by using the i2c bus found in most Arduinos to provide a more robust set of debugging tools.
The eye2see software is set up to run on an Arduino or other compatible microcontroller, called the “probe”, which is connected to the i2c bus on another Arduino whose code needs to be debugged. Code running on this Arduino, which is part of the eye2see library, allows it to send debugging information to the eye2see probe. With a screen, the probe can act as a much more powerful debugger than would otherwise typically be available, being able to keep track of variables in the main program, setting up breakpoints, and outputting various messages on its screen.
The tool is not without its downsides, though. The library that needs to run on the host Arduino slows down the original program significantly. But for more complex programs, the tradeoff with powerful debugging tools may be worth it until these pieces of code can be removed and the program allowed to run unencumbered. If you’d like to skip needing to use a second Arduino, we’ve seen some other tools available for debugging Arduino code that can run straight from a connected PC instead.
If it is 32-bit Arduino, there are tons of CMSIS-DAP compatible debuggers.
If it is 8-bit Arduino, just use debug-wire. There are some repos containing hardware and software tools.
https://github.com/dcwbrown/dwire-debug
https://github.com/DeqingSun/unoDebugTestPackage
Then Arduino 2.0 IDE will do all debugging work.
This. I really don’t like when people conflate Arduino with Atmega or more broadly AVR architecture when most of current Arduino boards does not even have AVR MCU.
Secure Connection Failed
An error occurred during a connection to search.supplyframe.com. PR_END_OF_FILE_ERROR
Error code: PR_END_OF_FILE_ERROR
The name is confusing because it is a mispronunciation of I squared C.
Which is almost always written as I2C.
Which is most properly written as IIC.
Inter-IC bus
Yet with the smallest of effort can be written I²C
I TWO C is correct, it’s short for IC to IC communications or bus. No idea where this I squared rubbish came from!
The name was originally Inter Integrated Cicuit, hence IIC, Hence I2C – I squared C – I’m not saying it’s ‘right’ whatever that would mean in this context, but that’s the ‘history’. I’m doing that based on my memory, but it also is what Wikipedia says, so it must be right! (sarcasm intended)
According to this Texas Instruments Guide, it stands for Inter-Integrated Circuit protocol, and the common pronunciation is “I squared C”, or “I two C”.
https://www.ti.com/lit/an/sbaa565/sbaa565.pdf
I2C is a Dutch invention from Philips by Herman Schutte (1979) and as far as i can remember we always called it “I kwadraat C” (kwadraat = squared).
Embedded engineer here! Our whole team says Aye-squared-C as do the Electronics department.
Speaking of mispronunciation, shouldn’t the title read “An usable Arduino debugging tool” ?
In English class I learned that the “n” is added, if the following word starts with a vowel (a, e, i, o, u). That way, the tongue doesn’t break.
No, because “usable” is pronounced like “jusable” in English, meaning that it effectively starts with a consonant. Conversely, the correct form is “an hour”, not “a hour”, because the H is silent.
There is no replacement for SWD or full JTAG. I like breakpoints, SWO Trace. I even use printf from time to time. But any code that does more than blink an led needs to be debugged every so often. So bring in the breakpoints and relax.
yeah i’d rather not use avr today, when stm32 and rp2040 sort of things are so powerful, especially with SWD. even without SWD, the rp2040 usb bootloader makes it super convenient to just inspect whatever was in memory at the last reset, if you are willing to accept a sort of watchdog-driven development cycle. the world’s cheapest ‘printf debugging’
STM32 anyone? Used “classic” Arduinos but outgrew them and the discovered STM32 with SWD – OMG! Effortlessly single step, run to breakpoint etc, yeah good!