Files
Kevin Thomas f62db776e1 Initial commit
2026-07-06 14:32:12 -04:00

68 lines
3.2 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800">
<style>
.bg{fill:#0a0a0f}.pnl{fill:#12121a;stroke:#1a1a2e}.hdr{fill:#12121a}
.title{font:bold 42px 'Courier New',monospace;fill:#00ff41}
.sub{font:bold 28px 'Courier New',monospace;fill:#00d4ff}
.txt{font:24px 'Courier New',monospace;fill:#c0c0c0}
.dim{font:20px 'Courier New',monospace;fill:#888}
.grn{font:bold 24px 'Courier New',monospace;fill:#00ff41}
.red{font:bold 24px 'Courier New',monospace;fill:#ff0040}
.cyn{font:bold 24px 'Courier New',monospace;fill:#00d4ff}
.amb{font:bold 24px 'Courier New',monospace;fill:#ffaa00}
.badge{stroke:#00ff41;rx:14}
</style>
<rect class="bg" width="1200" height="800"/>
<rect class="hdr" x="0" y="0" width="1200" height="100" rx="0"/>
<text class="title" x="600" y="52" text-anchor="middle">I2C Struct in Memory</text>
<text class="dim" x="600" y="88" text-anchor="middle">Examining i2c1_inst at 0x2000062C</text>
<!-- GDB output -->
<rect class="pnl" x="30" y="110" width="1140" height="120" rx="8"/>
<text class="sub" x="50" y="145">GDB Memory Dump</text>
<rect x="50" y="160" width="1100" height="50" rx="6" fill="#0a0a0f" stroke="#1a1a2e"/>
<text class="grn" x="70" y="192">x/2wx 0x2000062c:</text>
<text class="amb" x="420" y="192">0x40098000</text>
<text class="amb" x="670" y="192">0x00000000</text>
<!-- Struct layout diagram -->
<rect class="pnl" x="30" y="245" width="1140" height="280" rx="8"/>
<text class="sub" x="50" y="280">i2c_inst_t Struct Layout</text>
<!-- Member 1: hw pointer -->
<rect x="50" y="300" width="540" height="70" rx="6" fill="#0a0a0f" stroke="#00ff41" stroke-width="1"/>
<text class="dim" x="70" y="328">Offset 0x00 | 4 bytes</text>
<text class="cyn" x="70" y="358">i2c_hw_t *hw</text>
<text class="amb" x="310" y="358">= 0x40098000</text>
<!-- Arrow to HW -->
<text class="txt" x="605" y="345">--></text>
<!-- HW register block -->
<rect x="650" y="300" width="490" height="70" rx="6" fill="#0a0a0f" stroke="#ff0040" stroke-width="1"/>
<text class="red" x="670" y="328">I2C1 HW Registers</text>
<text class="dim" x="670" y="358">Base: 0x40098000 (MMIO)</text>
<!-- Member 2: restart_on_next -->
<rect x="50" y="400" width="540" height="70" rx="6" fill="#0a0a0f" stroke="#00d4ff" stroke-width="1"/>
<text class="dim" x="70" y="425">Offset 0x04 | 1 byte</text>
<text class="cyn" x="70" y="455">bool restart_on_next</text>
<text class="amb" x="410" y="455">= false</text>
<text class="dim" x="650" y="430">I2C0 base = 0x40090000</text>
<text class="dim" x="650" y="460">I2C1 base = 0x40098000</text>
<!-- String Literals -->
<rect class="pnl" x="30" y="540" width="1140" height="170" rx="8"/>
<text class="sub" x="50" y="575">String Literals in Flash (.rodata)</text>
<rect x="50" y="590" width="535" height="55" rx="6" fill="#0a0a0f" stroke="#1a1a2e"/>
<text class="grn" x="70" y="622">x/s 0x10003ee8:</text>
<text class="txt" x="340" y="622">"Reverse"</text>
<rect x="615" y="590" width="535" height="55" rx="6" fill="#0a0a0f" stroke="#1a1a2e"/>
<text class="grn" x="635" y="622">x/s 0x10003ef0:</text>
<text class="txt" x="900" y="622">"Engineering"</text>
<text class="dim" x="50" y="665">Stored consecutively in .rodata (flash)</text>
<text class="dim" x="50" y="685">These addresses are targets for patching</text>
</svg>