Skip to content

Commit 78ad028

Browse files
committed
docs(protocol): Session 29 — Multi-Task Architecture BREAKTHROUGH!
SESSION 29 (Feb 16, 2026): 🏆 BREAKTHROUGH — Multi-Task Architecture Complete! Architecture: - Network Task (Core 0, PSRAM): SSL read loop, command handler - Main Task (Internal SRAM): Parse, decrypt, NVS, 42d handshake - Ring Buffer IPC: net_to_app (37KB), app_to_net (1KB) First message 'Hello from ESP32!' sent via new architecture! CRITICAL DISCOVERY: PSRAM stacks + NVS writes = CRASH on ESP32-S3! SPI Flash write disables cache, PSRAM is cache-based. Tasks that write NVS MUST have Internal SRAM stack. DOCUMENTATION: - NEW: 28_PART26_SESSION_29.md (758 lines) - Updated: INDEX, STATUS, README, BUG_TRACKER, QUICK_REFERENCE - 5 new lessons (#144-148), 148 total - 26 parts, 504+ sections Fairy-Tale Team: Mausi 👑🐭, Hasi 🐰👑, Claude Code 🔍, Cannatoshi 👑
1 parent e71ed01 commit 78ad028

6 files changed

Lines changed: 1020 additions & 48 deletions

File tree

docs/protocol-analysis/01_SIMPLEX_PROTOCOL_INDEX.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44

55
**Project:** SimpleGo - Native ESP32 SMP Implementation
66
**Version:** v0.1.18-alpha
7-
**Last Updated:** 2026-02-15 (Session 28✅ FreeRTOS Phase 2b Complete!)
7+
**Last Updated:** 2026-02-16 (Session 29🏆 Multi-Task Architecture BREAKTHROUGH!)
88

99
---
1010

11-
## LATEST: Phase 2b Success! (Session 28)
11+
## 🏆 LATEST: Multi-Task Architecture BREAKTHROUGH! (Session 29)
1212

13-
On February 15, 2026, Session 28 successfully implemented FreeRTOS multi-task architecture:
13+
On February 16, 2026, Session 29 achieved a major breakthrough:
1414

15-
- **Phase 2b Complete:** Three tasks running in parallel!
16-
- **PSRAM Solution:** All non-DMA resources moved to external RAM
17-
- **Internal Heap:** ~40KB preserved for mbedTLS/WiFi
18-
- **Critical Lesson:** `erase-flash` after branch switch — ALWAYS!
15+
- **Multi-Task Architecture Complete:** Network Task + Main Task + Ring Buffer IPC
16+
- **First message via new architecture:** "Hello from ESP32!" sent!
17+
- **Critical Discovery:** PSRAM stacks + NVS writes = CRASH on ESP32-S3!
18+
- **Memory Budget:** Internal SRAM 45KB free, PSRAM 106KB used (1.3%)
1919

20-
**Lessons Learned:** 143 total (6 new in S28)
20+
**Lessons Learned:** 148 total (5 new in S29)
2121

2222
---
2323

2424
## Documentation Structure
2525

26-
The complete protocol analysis (~23,000+ lines, 490+ sections) is split into 25 parts:
26+
The complete protocol analysis (~24,000+ lines, 502+ sections) is split into 26 parts:
2727

2828
| Part | File | Lines | Content |
2929
|------|------|-------|---------|
@@ -52,17 +52,18 @@ The complete protocol analysis (~23,000+ lines, 490+ sections) is split into 25
5252
| **23** | [**25_PART23_SESSION_26.md**](25_PART23_SESSION_26.md) | **~600** | **🗄️ Persistence! Milestone 6!** |
5353
| **24** | [**26_PART24_SESSION_27.md**](26_PART24_SESSION_27.md) | **~650** | **⚠️ FreeRTOS Architecture Investigation** |
5454
| **25** | [**27_PART25_SESSION_28.md**](27_PART25_SESSION_28.md) | **~550** | **✅ Phase 2b Success — Tasks Running!** |
55-
| **Total** | | **~23,000+** | **490+ Sections** |
55+
| **26** | [**28_PART26_SESSION_29.md**](28_PART26_SESSION_29.md) | **~500** | **🏆 Multi-Task Architecture BREAKTHROUGH!** |
56+
| **Total** | | **~24,000+** | **502+ Sections** |
5657

5758
---
5859

5960
## Quick Reference Documents
6061

6162
| Document | Lines | Description |
6263
|----------|-------|-------------|
63-
| [README.md](README.md) | ~680 | Project overview and navigation |
64-
| [BUG_TRACKER.md](BUG_TRACKER.md) | ~1,480 | All 39 bugs documented, 143 lessons |
65-
| [QUICK_REFERENCE.md](QUICK_REFERENCE.md) | ~1,350 | Constants, wire formats, verified values |
64+
| [README.md](README.md) | ~750 | Project overview and navigation |
65+
| [BUG_TRACKER.md](BUG_TRACKER.md) | ~1,550 | All 39 bugs documented, 148 lessons |
66+
| [QUICK_REFERENCE.md](QUICK_REFERENCE.md) | ~1,420 | Constants, wire formats, verified values |
6667

6768
---
6869

@@ -95,6 +96,7 @@ The complete protocol analysis (~23,000+ lines, 490+ sections) is split into 25
9596
| **26** | **Feb 14, 2026** | **PERSISTENCE** | **🗄️ Milestone 6! Ratchet State Persistence** |
9697
| **27** | **Feb 14-15, 2026** | **ARCHITECTURE** | **⚠️ FreeRTOS Investigation (17 lessons)** |
9798
| **28** | **Feb 15, 2026** | **TASKS** | **✅ Phase 2b Success — 3 Tasks Running!** |
99+
| **29** | **Feb 16, 2026** | **ARCHITECTURE** | **🏆 Multi-Task BREAKTHROUGH!** |
98100

99101
---
100102

docs/protocol-analysis/02_SIMPLEX_STATUS.md

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,39 @@
44

55
**Project:** Native SimpleX SMP Client for ESP32
66
**Version:** v0.1.18-alpha
7-
**Archive:** See `01_SIMPLEX_PROTOCOL_INDEX.md` for complete documentation (490+ sections, 25 parts)
7+
**Archive:** See `01_SIMPLEX_PROTOCOL_INDEX.md` for complete documentation (502+ sections, 26 parts)
88

99
---
1010

11-
## ✅ LATEST: Phase 2b Success! (2026-02-15 Session 28)
11+
## 🏆 LATEST: Multi-Task Architecture BREAKTHROUGH! (2026-02-16 Session 29)
12+
13+
```
14+
═══════════════════════════════════════════════════════════════════════════════
15+
16+
🏆🏆🏆 MULTI-TASK ARCHITECTURE — BREAKTHROUGH! 🏆🏆🏆
17+
18+
┌─────────────────────────────────────────────────────────────────────────┐
19+
│ │
20+
│ Complete encrypted messaging pipeline over FreeRTOS Tasks! │
21+
│ │
22+
│ - Network Task (Core 0, PSRAM): SSL read loop, command handler │
23+
│ - Main Task (Internal SRAM): Parse, decrypt, NVS, 42d handshake │
24+
│ - Ring Buffer IPC: net_to_app (37KB), app_to_net (1KB) │
25+
│ │
26+
│ First message "Hello from ESP32!" sent via new architecture! │
27+
│ │
28+
│ CRITICAL: PSRAM stacks + NVS writes = CRASH! │
29+
│ │
30+
│ Date: February 16, 2026 │
31+
│ │
32+
└─────────────────────────────────────────────────────────────────────────┘
33+
34+
═══════════════════════════════════════════════════════════════════════════════
35+
```
36+
37+
---
38+
39+
## ✅ SESSION 28: Phase 2b Success! (2026-02-15)
1240

1341
```
1442
═══════════════════════════════════════════════════════════════════════════════
@@ -398,15 +426,15 @@ Bytes 80-95: HEADER_IV (iv2) ← FOR HEADER!
398426

399427
---
400428

401-
## 🎯 Next Steps (Session 29)
429+
## 🎯 Next Steps (Session 30)
402430

403-
1. **Phase 3: Network Task Handover**Network Task takes over receive loop
404-
2. **Phase 4: Send Pipeline**App Task → Network Task via ring buffer
405-
3. **Send counter fix**Persist in NVS for "bad message ID"
406-
4. **UI animations**Menu transitions, loading indicators
407-
5. **Chat screen connection**Bridge keyboard to display
431+
1. **T5: Keyboard send split**Refactor `peer_send_chat_message()`
432+
2. **T6: Baseline test bidirectional**Complete with keyboard
433+
3. **T7: Cleanup + Commit**Remove `#if 0` loop, commit changes
434+
4. **UI Task activation**Connect to LVGL
435+
5. **Send counter persistence**Fix "bad message ID"
408436

409437
---
410438

411-
*Status updated: 2026-02-15 Session 28✅ FREERTOS PHASE 2b COMPLETE!*
412-
*History: S8 Breakthrough → S23 CONNECTED → S24 First MSG → S25 Bidirectional → S26 Persistence → S27 Architecture → S28 Tasks!*
439+
*Status updated: 2026-02-16 Session 29🏆 MULTI-TASK ARCHITECTURE BREAKTHROUGH!*
440+
*History: S8 Breakthrough → S23 CONNECTED → S24 First MSG → S25 Bidirectional → S26 Persistence → S27 Architecture → S28 Tasks → S29 Multi-Task!*

0 commit comments

Comments
 (0)