Reduce RAM usage for Lua Code

I’m trying to use rover-quicktune.lua on my Cube Black for Rover, but it lacks enough RAM. I’ve followed the guidance from the “Firmware Limitations on AutoPilot Hardware” section in the ArduPilot documentation, but it’s still not enough. Is there a way to push optimization further, like reducing unused functions in the hardware or firmware? Where should I start?

Thank you in advance!

Fixed by using this Custom Firmware Build: ArduPilot Custom Firmware Builder. Now the RAM is freed alot