[—stack-loc <Value>] By
default the stack is placed after the data segment for
mcs51. By using this option the stack can be placed anywhere in the
internal memory space of the mcs51. The value entered can be in Hexadecimal
or Decimal format, e.g. —stack-loc 0x20 or —stack-loc 32.
Since the sp register is incremented before a push or call, the initial
sp will be set to one byte prior the provided value. The provided
value should not overlap any other memory areas such as used register
banks or the data segment and with enough space for the current application.
The —pack-iram option
(which is now a default setting) will override this setting, so you
should also specify the —no-pack-iram
option if you need to manually place the stack.
For stm8, by default the stack is placed at the device-specific reset
value. By using this option, the stack can be placed anywhere in the
lower 16-bits of the stm8 memory space. This is particularly useful
for working around the stack roll-over antifeature present in some
stm8 devices.