Possible bug (non-critical) with CLI builder

I am writing code for an ESP32S3 board (adafruit_feather_esp32s3). This board has 8meg of program flash and my problem is going to be fairly big. It will use a little bit of that for SPIFS, but it won't need much. I am using a custom partitions file:

# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  ota_0,   0x10000, 0x3c0000,
spiffs,   data, spiffs,  0x3D0000,0x20000,
coredump, data, coredump,0x3F0000,0x10000,

Everything actually compiles and builds just fine. But at the end, the wrong sizes are reported:

Sketch uses 840673 bytes (64%) of program storage space. Maximum is 1310720 bytes.
Global variables use 58796 bytes (17%) of dynamic memory, leaving 268884 bytes for local variables. Maximum is 327680 bytes.

(The GUI seems to report the correct values.)

Using --preserve-temp-files I was able to check the created partition file binary and it was correct, just the reporting is wrong.

I am using the ide from the Debian 12 (bookworm) repo:

marchhare% dpkg-query -l arduino
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version          Architecture Description
+++-==============-================-============-==============================>
ii  arduino        2:1.8.19+dfsg1-1 arm64        AVR development board IDE from>

on a Raspberry Pi5.

Hi @robertpheller. The memory usage data is determined according to the configuration provided in by the "esp32" boards platform's platform.txt configuration file:

Reference:

https://arduino.github.io/arduino-cli/latest/platform-specification/#recipes-to-compute-binary-sketch-size

Do you see the expected output if you run the following command?:

~/.arduino15/packages/esp32/tools/esp-xs3/2302/bin/xtensa-esp32s3-elf-size -A <path to ELF>

(where <path to ELF> is the path to a .elf file produced by compiling a sketch)

This may also help explain it but it affects only statistics, the code is OK:

1 Like

@robertpheller please provide a detailed description of exactly which part of the size data is incorrect:

  • Is it the "840673 bytes (64%) of program storage space"?
  • Is it the "Maximum is 1310720 bytes."?
  • Is it the "58796 bytes (17%) of dynamic memory"?
  • Is it the "Maximum is 327680 bytes."?

The max size is wrong. The "cure" for the command line interface is to manually include the correct max size on the command line.

I fixed my Makefile to do that. See SmartCatFeeder/SmartCatFeederFirmware at master · RobertPHeller/SmartCatFeeder · GitHub

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.