Спасибо.
при включенной оптимизации (скорее всего interprocedural или как там она называется) не сохраняет аргументы в стек
но хочется и подебажить

судя по примерам, включена еще "элиминация" в смысле выбрасывание неиспользуемых меток - в скрипте линкера если не объявлять и элиминация выключена - требует эти метки для линковки libc
ldf_heap_length
ldf_heap_space
даже при условии, что кучей не пользоваться...
==========
пропажа v2 - пропали мои исходники - у Вас все в порядке

но если переписывать, то лучше на v3
в работе RTOS никаких непонятностей не заметил.
------------------
а с использованием Scratch памяти в качестве стека задач, какие-нибудь проблемы возможны?
по DMA доступ не нужен, байтовый доступ ... можно сделать чтобы не было
а я почему-то не встречал использования Scratch
ни в каких примерах ldf, а тут проект без внешней памяти - каждый килобайт на счету ...
вот описание аномалии:
Reads from the scratchpad memory may return incorrect data under some conditions. The problem occurs when reads of scratchpad
memory are immediately followed by another read (of any location, including non-scratchpad locations), where the addresses being
accessed do not have the same least significant address bit. This means that one of the transfers has to be a byte access. The other access
has to be either a byte, 16-bit or 32-bit access on a different byte boundary than the first access. In addition, the instruction immediately
before the Scratchpad memory read has to generate a memory stall due to either a dual DAG bank collision, a non-L1 memory data fetch,
or a cache-line fill.
If an instruction does not perform a read immediately after the scratchpad read, no problems occur. Also, back to back non-byte reads
function properly.
WORKAROUND:
The simplest workaround for assembly programmers is to place any non-read instruction after each scratchpad read. For C programmers,
one solution is not to map any data to the scratchpad.
Alternatively the VisualDSP++ Blackfin compiler includes a workaround for this hardware anomaly. The compiler will automatically enable
the workaround for the appropriate silicon revisions and part numbers, or the workaround can be enabled manually by specifying the
compiler flag -workaround scratchpad-read' With the workaround enabled, when a sequence of three load instructions occurs (or occur
as parts of a multi-issue instruction), where at least one of (2) and (3) is a byte load, a nop will be inserted between (1) and (2) or (2) and (3):
A load instruction (1);
A load instruction (2);
A load instruction (3);