Skip to content

Core 3.1.x: static and flash memory usage messages from compiler seem corrupted #8896

Open
@bxparks

Description

@bxparks

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • [how do I do this?] I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: [ESP-12]
  • Core Version: [3.1.2]
  • Development Env: [Arduino IDE 1.8.19]
  • Operating System: [Ubuntu]

Settings in IDE 1.8.19

--board esp8266:esp8266:nodemcuv2:xtal=80,vt=flash,exception=disabled,ssl=all,eesz=4M2M,led=2,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=921600

  • Module: [Nodemcu]
  • Flash Mode: [???]
  • Flash Size: [4MB/2MB]
  • lwip Variant: [v2 Lower Memory]
  • Reset Method: [???]
  • Flash Frequency: [???]
  • CPU Frequency: [80Mhz]
  • Upload Using: [SERIAL]
  • Upload Speed: [115200]

Problem Description

Prior to 3.1.x (e.g. 3.0.2), the compiler printed a summary of the static and flash memory usage that was formatted like this:

Executable segment sizes:
ICACHE : 32768       	- flash instruction cache
IROM   : 231500      	- code in flash     	(default or ICACHE_FLASH_ATTR)
IRAM   : 26217   / 32768 - code in IRAM      	(IRAM_ATTR, ISRs...)
DATA   : 1496  )     	- initialized variables (global, static) in RAM/HEAP
RODATA : 876   ) / 81920 - constants         	(global, static) in RAM/HEAP
BSS	: 25520 )     	- zeroed variables  	(global, static) in RAM/HEAP

Sketch uses 260089 bytes (24%) of program storage space. Maximum is 1044464 bytes.
Global variables use 27892 bytes (34%) of dynamic memory, leaving 54028 bytes for local variables. Maximum is 81920 bytes.

In 3.1.0, (and verified to be the same in 3.1.2), that changed to something like this, with a bunch of ? question marks, with no final summary lines:

. Variables and constants in RAM (global, static), used 28008 / 80192 bytes (34%)
???   SEGMENT  BYTES	DESCRIPTION
????????? DATA 	1496 	initialized variables
????????? RODATA   920  	constants  	 
????????? BSS  	25592	zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 59143 / 65536 bytes (90%)
???   SEGMENT  BYTES	DESCRIPTION
????????? ICACHE   32768	reserved space for flash instruction cache
????????? IRAM 	26375	code in IRAM    
. Code in flash (default, ICACHE_FLASH_ATTR), used 231636 / 1048576 bytes (22%)
???   SEGMENT  BYTES	DESCRIPTION
????????? IROM 	231636   code in flash

Expected Result

  1. Those ????????? seem to indicate corrupted strings.

  2. Print the 2 summary lines in the format of:

Sketch uses 260089 bytes (24%) of program storage space. Maximum is 1044464 bytes.
Global variables use 27892 bytes (34%) of dynamic memory, leaving 54028 bytes for local variables. Maximum is 81920 bytes.

for readability and compatibility with other cores.

MCVE Sketch

A blank sketch is sufficient to see this.

#include <Arduino.h>
void setup() {}
void loop() {}

Debug Messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions