3.6.1.17 Tiny-stack Option

The -mtiny-stack option controls the width of the stack pointer.

On some devices that have a small amount of data RAM, the stack pointer is only 8-bits wide. For other devices, it is 16-bits wide and occasionally each byte might need to be accessed separately to change where the stack pointer points.

If your devices uses a 16-bit stack pointer and the stack is located in the lower half of memory and does not exceed 256 bytes in size, this option will force the stack pointer to use only a single byte, thus reducing the amount of code necessary to adjust the stack pointer.

The option is automatically applied if the device implements RAM whose size is 256 bytes or less. It can be disabled by using the -mno-tiny-stack form of this option.