Your leaking thatched hut during the restoration of a pre-Enlightenment state.

 

Hello, my name is Judas Gutenberg and this is my blaag (pronounced as you would the vomit noise "hyroop-bleuach").



links

decay & ruin
Biosphere II
Chernobyl
dead malls
Detroit
Irving housing

got that wrong
Paleofuture.com

appropriate tech
Arduino μcontrollers
Backwoods Home
Fractal antenna

fun social media stuff


Like asecular.com
(nobody does!)

Like my brownhouse:
   I2C bootloader success
Wednesday, February 4 2026
After spending some hours on it yesterday, I spent nearly all of today continuing my work on the I2C bootloader project, which is a branch of something called twiboot that I've altered so it works with my ESP8266 Remote Control master code. By the time I went to bed late tonight, it was actually working. You cannot imagine my joy the first time I checked the version number after doing a reflash (by issuing a "run slave 160") and seeing that it had changed!
The key to my success today was just good old fashioned software debugging instead of trying to lean (as I often do) on ChatGPT and other large language models. I added numerous debugging statements to the bootloader code, and, whenever I found a place where data was failing to flow, I added more debugging. Along the way, mostly all I used ChatGPT for was to write me simple functions to do things like dump out the contents of an array buffer in formatted hexadecimal so I could compare it with images of slave firmware I had on hand. By doing things, I eventually confirmed that I was indeed writing proper 128 byte packets to the slave, and everything seemed to be in place for the slave's flash to be altered. But every time the Atmega328p rebooted, it came up in the old firmware, demonstrating that the flashing process had failed. At this point I turned to ChatGPT for answers, and all it could do was tell me to check fuses that I'd already checked.
dd>ChaGPT also gave me some false information that resulted in about an hour of wasted time, insisting (erroneously) that the addresses passed to functions like boot_page_erase(), boot_page_fill(), and boot_page_write() are supposed to be word addresses, not byte addresses. I clairified to ask if the value I needed to pass was really an ordinal count of how many words I was writing from the beginning, and it assure me that it was. I was skeptical and asked if it was absolutely sure, and ChatGPT said that it was. But later I found documentation refuting this and rubbed what little there is of ChatGPT's nose in it.
Much later in the evening, I used the DuckDuckGo and Google LLMs to see if they could shed light on my problem. The Google LLM wondered if maybe I'd set my bootloader partition too small, which seemed preposterous. But when I gave it the cryptic hexadecimal code I'd just extracted from the high fuse, it told me my AVR device was set up to only use a 512 byte bootloader, which was way too small for my bulky bootloader code. What this meant was that some of my bootloader code was running from within the sketch partition, and code running there is forbidden from writing to the sketch partition. That was the entire problem! But why had that high fuse changed? I'd set it and assumed it would stay the way I'd left it. But then I figured out what was happening: the Arduino IDE was apparently changing that fuse every time I used it to burn a bootloader, something I would have to do occasionally when my slave would become unresponsive. I'd been working on this I2C bootloader project for weeks and had been worried I wouldn't have anything to show for it. But now I had it working! This was huge, because it would greatly simplify the maintenance of remote control nodes having Arduino slaves.

Sandwiched in the middle of all that, this evening I drove to Woodstock to meet Gretchen at the bookstore. I arrived while our friend Lisa P. was there in the closed, darkened bookstore doing a test presentation of a TED-X talk she'll be giving soon.
Gretchen and I walked through the cold over to Nirvana, the newish Indian restaurant that took over the building that had once been home to another flawed-but-oddly-charming Indian restaurant. At Nirvana, we met up with Z and Greg, the couple from Olive Bridge we occasionally socialize with. I was on the same recreational dose of pseυdoephedrine that had just helped me power through all that I2C debugging, and it was making me a little more quiet than usual. So the best I could do was make the occasional witty remark or, in one case, turn the conversation from literature (boring) to travel (less boring). As for food, I ordered a mushroom jalfrezi that was very good (and even fairly spicy). But I was so hungry that it wasn't quite enough food, so I ended up also eating what remained of the sambar that had come with the dosa that Greg and Gretchen had shared.


For linking purposes this article's URL is:
http://asecular.com/blog.php?260204

feedback
previous | next