
Embedded Automotive Firmware Code Reviewer
Analyze embedded automotive firmware for safety, correctness, and performance
What You Can Do
You receive detailed safety and compliance analysis of your embedded automotive firmware, identifying potential bugs, performance bottlenecks, and violations of automotive coding standards. Claude performs static code review with focus on AUTOSAR compliance, ISO 26262 functional safety principles, memory safety, real-time constraints, and hardware interaction correctness. Your team gets actionable recommendations to harden critical sections, optimize performance, and pass compliance audits.
Features
identifies potential safety violations, memory corruption, and unhandled error paths in automotive firmware
checks firmware against functional safety standards and automotive coding guidelines
detects deadline violations, interrupt conflicts, and timing bottlenecks in hard real-time systems
analyzes stack/heap usage, identifies leaks, and detects inefficient buffer management
validates GPIO control, CAN bus communication, sensor integration, and register-level access patterns
checks task synchronization, mutex/semaphore usage, race conditions, and deadlock potential
reviews ISR safety, re-entrancy, priority inversion, and context switch correctness
flags anti-patterns common in embedded systems like busy-waits, polling loops, and non-deterministic behavior
Example Output
Example 1: CAN Driver Analysis
Finding: Unprotected shared buffer access in can_rx_interrupt() and can_transmit() (lines 142–156)
- ✅ Severity: High (Race condition)
Issue: The rx_buffer is modified in the ISR without disabling interrupts, causing data corruption when can_transmit() accesses it.
Recommendation: Use atomic compare-and-swap or spinlock to guard buffer updates.
Example 2: Stack Overflow Risk
Finding: Large local array in process_sensor_data() (line 78)
void process_sensor_data() {
float sensor_values[512]; // 2KB on stack!
}
- ✅ Compliance Gap: Violates AUTOSAR stack budgeting for microcontroller with 8KB RAM
Recommendation: Move to static/global allocation or heap with pre-allocated pool.
Example 3: Timing Analysis
Finding: Task engine_control_task (period 10ms) calls heavy_computation() which runs ~12ms
- ✅ Deadline Miss: Hard real-time violation — task will miss its 10ms deadline
Recommendation: Refactor computation into background tasks or reduce loop complexity.
What's Included
- SKILL.md: Complete firmware code review workflow with analysis frameworks
- Firmware Analysis Checklist: Systematic review template for each firmware module
- Safety Compliance Template: ISO 26262 mapping and AUTOSAR guideline checklist
- Performance Profiling Guide: Real-time deadline analysis and bottleneck identification framework
- Memory Safety Workbook: Stack/heap analysis, buffer overflow detection patterns
- RTOS Verification Checklist: Task synchronization, priority inversion, and race condition patterns
- Hardware Abstraction Layer Review Guide: GPIO, CAN, sensor, and register access validation
- Automotive Coding Standards Reference: AUTOSAR C++ and functional safety code patterns
Who It's For
- Embedded firmware engineers developing safety-critical automotive systems
- Automotive software architects designing ECU firmware architecture
- Functional safety engineers verifying ISO 26262 compliance
- Automotive quality assurance leads conducting pre-release code audits
- RTOS and real-time systems specialists optimizing timing-critical code
Best For
- Pre-commit code review of firmware modules before integration
- Safety compliance verification for ISO 26262 certification preparation
- Real-time performance analysis and hard deadline verification
- Memory safety and buffer overflow prevention audits
- Interrupt handler and hardware abstraction layer correctness review







