<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[🔧 Firmware bugs? Post like this]]></title><description><![CDATA[<p dir="auto">Half of firmware debugging is how you ask. A good report gets you an answer in an hour; "it doesn't work" gets you silence. Use this format every time:</p>
<p dir="auto"><strong>What I'm trying to do:</strong> one sentence — the goal, not the method.<br />
<strong>What I tried:</strong> the steps, in order. "Changed the baud rate, added a delay, swapped cables."<br />
<strong>What happened:</strong> exact text, not paraphrase. Paste the panic dump, the serial output, the wrong value.<br />
<strong>My setup:</strong> board (ESP32 DevKitC? which revision), IDE + version, relevant library versions.<br />
<strong>Minimal code:</strong> the smallest snippet that reproduces it — 20 lines beats 500. Use code blocks, never screenshots of code.<br />
<strong>Serial output:</strong> pasted as text, from boot to failure.</p>
<h3>Decode your own crash first</h3>
<p dir="auto">A <code>Guru Meditation Error</code> print is a gift — it tells you the exception cause, the guilty program counter, and a backtrace. The fastest path: rebuild the exact same binary with symbols, feed the addresses to the decoder, and read the function names. Nine times out of ten it lands on one of these:</p>
<ul>
<li><strong>Stack overflow</strong> — a task with a 1 KB stack calling deep library functions, or a large array declared inside a function. Symptom: crash inside random-looking code, corrupted backtrace. Fix: grow the stack, move big buffers to static/global.</li>
<li><strong>Watchdog bite</strong> — a task that never blocks. Any loop without a delay or blocking call starves the idle task and the watchdog resets the chip. Fix: yield every iteration.</li>
<li><strong>Null / wild pointer</strong> — dereferencing a queue handle or object that was never created, or used after deletion. Symptom: <code>LoadProhibited</code> on an address near zero. Fix: check every create call's return before use.</li>
<li><strong>Shared state without protection</strong> — a variable touched from a task and an ISR (or two tasks) with no guard. Symptom: works for hours, then corrupts once. Fix: qualifier or guard, depending on who shares it.</li>
</ul>
<h3>The five gotchas that solve most posts here</h3>
<ol>
<li>ADC reads garbage with WiFi on → use ADC1 pins, never ADC2 under WiFi.</li>
<li>Board resets randomly on USB → weak cable or port; measure the rail under load, try a shorter cable and a powered hub.</li>
<li>Serial shows garbage → monitor baud must match <code>Serial.begin()</code> exactly.</li>
<li>"Worked yesterday" → something changed: code, wiring, power source, library update. Figure out what, then bisect it.</li>
<li>Timing drift under WiFi → never use blocking delays for cadence; sample on a stable timebase.</li>
</ol>
<p dir="auto"><em>Post with the format above and tag with firmware, freertos or esp32.</em></p>
]]></description><link>https://forum.grapesiot.com/topic/80/firmware-bugs-post-like-this</link><generator>RSS for Node</generator><lastBuildDate>Thu, 19 Nov 2026 13:02:47 GMT</lastBuildDate><atom:link href="https://forum.grapesiot.com/topic/80.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 03 Oct 2026 11:40:22 GMT</pubDate><ttl>60</ttl></channel></rss>