mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-08 02:28:25 -05:00
[PR #1628] fix(labs): use ESP32 SRAM capacity field in lab 07 #9234
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1628
Author: @Shashank-Tripathi-07
Created: 5/3/2026
Status: 🔄 Open
Base:
dev← Head:fix/lab07-esp32-sram-field📝 Commits (1)
edfd8b8fix(labs): use ESP32 SRAM capacity in lab 07📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
labs/vol1/lab_07_ml_frameworks.py(+1 -1)📄 Description
Summary
ESP32.memory.capacityreturns 8 MB flash storage (7812 KiB), not SRAM. The correct field ismemory.sram_capacity(512 KiB).In lab 07,
ESP32_RAM_KBis used dynamically in:ESP32 ({ESP32_RAM_KB:.0f} KB)-- showed7812 KBinstead of512 KBESP32 memory: {ESP32_RAM_KB:.0f} KB = {ESP32_RAM_KB/1024:.2f} MBandRatio: 1800 / {ESP32_RAM_KB/1024:.2f} = {ratio:,.0f}x-- showed7.63 MBand~236xinstead of0.50 MBand~3,600xThe hardcoded explanation text throughout the lab correctly states "3,600x" and "512 KB", so the wrong variable caused a visible contradiction.
Change
Same root cause as PRs #1625 (lab 01), #1626 (lab 02), #1627 (lab 03).
Test plan
ESP32 (512 KB)0.50 MBand~3,600x🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.