Mysterious RS485 problem

All your variables, including arrays, take space in SRAM. So do all constants, like menu text. There is nothing you can do to free any of the space these things use. At best, you can be careful to never overwrite any arrays you have.

In spite of doing that, you can still run out of memory, if you have lots of text or arrays (especially large ones).

But, since your code is so secret, I guess we won't be able to help you. Sorry.