Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open 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

No warning on >100% ram usage #4791

Closed
non-bin opened this issue Nov 21, 2023 · 1 comment
Closed

No warning on >100% ram usage #4791

non-bin opened this issue Nov 21, 2023 · 1 comment

Comments

@non-bin
Copy link

non-bin commented Nov 21, 2023

In Marlin, I couldn't figure out why compiling with FT_MOTION caused the board to freeze during boot, until I noticed it reporting negative free memory.

Is it possible to add at least a warning for high memory usage?
I'm not very familiar with where gcc, pio, and the marlin build config start and end, so this may need to be a gcc feature

Build log
Executing task: C:\Users\jacka\.platformio\penv\Scripts\platformio.exe run --target upload 

Processing mega2560 (board: megaatmega2560; platform: atmelavr@~4.0.1; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/megaatmega2560.html
PLATFORM: Atmel AVR (4.0.1) > Arduino Mega or Mega 2560 ATmega2560 (Mega 2560)
HARDWARE: ATMEGA2560 16MHz, 8KB RAM, 248KB Flash
DEBUG: Current (avr-stub) External (avr-stub, simavr)
PACKAGES:
 - framework-arduino-avr @ 5.1.0
 - tool-avrdude @ 1.60300.200527 (6.3.0)
 - toolchain-atmelavr @ 1.70300.191015 (7.3.0)
Converting Marlin.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 5 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Wire @ 1.0
|-- SPI @ 1.0
Building in release mode
Compiling .pio\build\mega2560\src\src\HAL\AVR\HAL.cpp.o

...

Compiling .pio\build\mega2560\src\src\sd\cardreader.cpp.o
Linking .pio\build\mega2560\firmware.elf
Checking size .pio\build\mega2560\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==========]  193.5% (used 15849 bytes from 8192 bytes)
Flash: [========  ]  77.5% (used 196936 bytes from 253952 bytes)
Building .pio\build\mega2560\firmware.hex
Configuring upload protocol...
AVAILABLE: wiring
CURRENT: upload_protocol = wiring
Looking for upload port...
Auto-detected: COM4
Uploading .pio\build\mega2560\firmware.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: reading input file ".pio\build\mega2560\firmware.hex"
avrdude: writing flash (196936 bytes):

Writing | ################################################## | 100% 49.25s

avrdude: 196936 bytes of flash written
avrdude: verifying flash memory against .pio\build\mega2560\firmware.hex:
avrdude: load data flash data from input file .pio\build\mega2560\firmware.hex:
avrdude: input file .pio\build\mega2560\firmware.hex contains 196936 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 42.33s

avrdude: verifying ...
avrdude: 196936 bytes of flash verified

avrdude: safemode: Fuses OK (E:FD, H:D8, L:FF)

avrdude done.  Thank you.

================================================================================== [SUCCESS] Took 309.48 seconds ==================================================================================
Environment    Status    Duration
-------------  --------  ------------
mega2560       SUCCESS   00:05:09.482
=================================================================================== 1 succeeded in 00:05:09.482 =================================================================================== *  Terminal will be reused by tasks, press any key to close it. 

MarlinFirmware/Marlin#26451

@ivankravets
Copy link
Member

Thanks for the report! Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants