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

[BUG] Compiles fine without Input shaping enables with only 12.2% of RAM used, but fails due to lack of memory when Input Shaping is enabled. #26183

Closed
1 task done
andy-spoo opened this issue Aug 17, 2023 · 4 comments

Comments

@andy-spoo
Copy link

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

I have a working Marlin 2.1.2.1 which compiles just fine which has input shaping disabled.
Compiled using Visual Studio, Platformio and Auto Build Marlin.
Board is a Bigtreetech Mini E3 V3.0
This good build reports =

RAM: [= ] 12.2% (used 18036 bytes from 147456 bytes)
Flash: [===== ] 50.0% (used 262084 bytes from 524288 bytes)
Building .pio/build/STM32G0B1RE_btt/firmware.bin
============================================================================================== [SUCCESS] Took 111.74 seconds ==============================================================================================

Environment Status Duration


STM32G0B1RE_btt SUCCESS 00:01:51.736

When I enable Input Shaping =

#define INPUT_SHAPING_X
#define INPUT_SHAPING_Y

and compile, it get this error =

Linking .pio/build/STM32G0B1RE_btt/firmware.elf
/home/andy/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: .pio/build/STM32G0B1RE_btt/firmware.elf section .bss' will not fit in region RAM'
/home/andy/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: region `RAM' overflowed by 192248 bytes
collect2: error: ld returned 1 exit status
*** [.pio/build/STM32G0B1RE_btt/firmware.elf] Error 1
=============================================================================================== [FAILED] Took 14.21 seconds ===============================================================================================

Environment Status Duration


STM32G0B1RE_btt FAILED 00:00:14.205

Surely there must be way more RAM available than required?? Going from 12.2% to fail for lack of memory seems excessive.
I've ran 'CLEAN' and 'FULL CLEAN' a few times and restarted Visual Studio code / Platformio a few times and still get this error.

Any ideas?

Bug Timeline

New. Started on enabling input shaper

Expected behavior

To compile correctly as it should have bags of memory available.

Actual behavior

Fails with = firmware.elf section .bss' will not fit in region RAM'

Steps to Reproduce

  1. Uncomment #define INPUT_SHAPING_X and #define INPUT_SHAPING_Y
  2. Compile.

Version of Marlin Firmware

2.1.2.1

Printer model

Creality ender 5 Plus

Electronics

Bigtreetech Mini E3 V3.0

Add-ons

TFT35 V3

Bed Leveling

UBL Bilinear mesh

Your Slicer

Prusa Slicer

Host Software

None

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

Ender 5 Plus.zip

@andy-spoo andy-spoo changed the title [BUG] Compiles fine without Input shaping enables with only 12.2% or RAM used, but fails due to lack of memory when Input Shaping is enabled. [BUG] Compiles fine without Input shaping enables with only 12.2% of RAM used, but fails due to lack of memory when Input Shaping is enabled. Aug 17, 2023
@ellensp
Copy link
Contributor

ellensp commented Aug 17, 2023

This Issue Queue is for Marlin bug reports and development-related issues, and we prefer not to handle user-support questions here. (As noted on this page.) For best results getting help with configuration and troubleshooting, please use the following resources:

After seeking help from the community, if the consensus points to a bug in Marlin, then you should post a bug report.

@ellensp ellensp closed this as completed Aug 17, 2023
@ellensp
Copy link
Contributor

ellensp commented Aug 17, 2023

The line #define DEFAULT_MAX_FEEDRATE { 8000, 8000, 15, 15000 }
also sets the size of the memory buffers used. lower these vales to fit in the hardware limitations of your controller

@andy-spoo
Copy link
Author

OK. Thanks for your help. Greatly appreciated.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants