8000 Add build_memory_info for esp32s2 by jepler · Pull Request #4763 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Add build_memory_info for esp32s2 #4763

New issue

Have a question about this project? Sign up for a free GitHub account to op 8000 en an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 25, 2021

Conversation

jepler
Copy link
@jepler jepler commented May 14, 2021

This detects an overflowed flash partition, such as

1452105 bytes used, -10313 bytes free in flash firmware space out of 1441792 bytes (1408.0kB).
444428 bytes used, 1652724 bytes free in ram for stack and heap out of 2097152 bytes (2048.0kB).

on a metro esp32-s2 built with debugging.

Fixes #3970.

This detects an overflowed flash partition, such as
```
1452105 bytes used, -10313 bytes free in flash firmware space out of 1441792 bytes (1408.0kB).
444428 bytes used, 1652724 bytes free in ram for stack and heap out of 2097152 bytes (2048.0kB).
```
on a metro esp32-s2 built with debugging.
@jepler jepler requested a review from dhalbert May 14, 2021 15:39
dhalbert
dhalbert previously approved these changes May 14, 2021
Copy link
Collaborator
@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

@jepler
Copy link
Author
jepler commented May 14, 2021

Looks like this is wrong for non-PSRAM builds, at least that's my first guess. I'll take a look locally, soon

@tannewt tannewt added espressif applies to multiple Espressif chips tooling labels May 14, 2021
This is more or less a complete re-organization of the code.

 * Use the actual byte size of the .bin file as the flash size,
   as the algorithm for packing sections into the flash is complicated
 * Match each section to a data region & find the high water mark in the
   region
 * Report on all the RAM regions, separately

Note that elftools is a requirement of esp-idf and so does not need to
be listed in our requirements.txt.
@jepler
Copy link
Author
jepler commented May 25, 2021

This has been heavily revamped and now says things like

1305392 bytes used,  136400 bytes free in flash firmware space out of 1441792 bytes (1408.0kB).
     27 bytes used,    8165 bytes free in 'RTC Fast Memory' out of 8192 bytes (8.0kB).
   4096 bytes used,    4096 bytes free in 'RTC Slow Memory' out of 8192 bytes (8.0kB).
      0 bytes used,   32768 bytes free in 'Internal SRAM 0' out of 32768 bytes (32.0kB).
  87772 bytes used,  207140 bytes free in 'Internal SRAM 1' out of 294912 bytes (288.0kB).

@jepler jepler requested a review from dhalbert May 25, 2021 17:23
Copy link
Collaborator
@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dhalbert dhalbert merged commit d79d687 into adafruit:main May 25, 2021
@jepler jepler deleted the esp32s2-build-memory-info branch May 25, 2021 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
espressif applies to multiple Espressif chips tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overflow of flash partition not detected
3 participants
0