What you see
The compiler parser fixture contains “'ledPin' was not declared in this scope”. It demonstrates the real GCC diagnostic shape handled by Circuitera.
Likely causes
- A variable/function name has different spelling or capitalization.
- The declaration is inside a narrower scope or appears in an unavailable header.
- A board-specific pin alias or API is not defined for the selected profile.
Diagnostic steps
Jump to the first error
Click the diagnostic to inspect the exact source line. Compare the name to its declaration rather than replacing every occurrence blindly.
Check declaration and scope
Declare shared constants before setup()/loop() when both need them. A variable local to setup() is not automatically visible in loop(). Keep source and header declarations consistent in multi-file projects.
Confirm board-aware names
Select the intended board before relying on autocomplete or pin aliases. A6/A7, Serial1 and native USB APIs differ across AVR variants.
Review a proposed fix and Verify
Circuitera may offer a targeted suggestion. Read the change, then Verify again. Fixing the first error can remove later cascading diagnostics.
Board-specific notes
Use LED_BUILTIN for a simple onboard Blink test. Extra Mega UART names and Leonardo/Micro USB Serial behavior are not interchangeable with Uno’s single UART.
Safe recovery
Undo a broad accidental replacement and reduce the sketch to a known declaration/use pair. Keep a backup of the original project.
Evidence and references
Reviewed 2026-10-23 against Circuitera’s actual behavior. An editorial review is separate from a physical board test.
Circuitera implementation evidence
test/compiler-diagnostics.test.js; src/compilerDiagnostics.js; src/quickFixes.js