Hi,
I'm trying to use 54x DSP Library functions (cbrev, cfft1024, log_10), in pure assembly, on a 542 chip. Even though I am passing -mc to the assembler, it does not seem to be recognizing the SP as a valid MMR, or...something. The code (w/ CPL=1) is, e.g.
.asg (0), DATA
stl a, *sp(DATA)
but after compiling to COFF and loading through an emulator is disassembled as
STL A, IMR
overwriting my IMR (at absolute address 0). Wat. Every other attempted form of this either gives an error, overwrites the IMR, or writes directly to SP itself, and not the stack. Other instances of this (with .asg (N), NAME and references to *sp(NAME) also write to absolute address N).
There is heavy use of this form of SP-relative addressing in the DSPLIB code, and I don't think it's working properly in any of the functions. What's going on? Is this the correct way to do SP-referenced addressing? If not, can someone give me a working example?
Compiling with CCSv5 c5400 tools.