Hi,
there is no register r32 (r0 to r31).
You can not use the syntax
lds r31, {value}
for a function/sub parameter or local variable. The address of a parameter or local variable is not known at compile time, so no SRAM address can be generated for {value}. Only the addresses of global variables are known at compile time and can be used with this syntax.
You can work with following way:
loadadr value, X
ld r24, X
loadadr can get the address of parameter/locals from the soft-stack, where the addresses of parameters and local variables are stored at runtime
Lesezeichen