In xC if a function argument is restricted pointer and the function
accesses a global then you cannot pass a non-local alias pointer
(e.g. an alias pointer to a global). This is because the pointer then
may alias the global accessed in the function (which it shouldn't since
it is a restricted pointer.
This is happening in the code where a pointer to a global is taken:
and then this is passed into a function that accesses a global:
acmp_send_command(... &inflight->command ...);
This commit fixes this by explictly marking the parameter to
acmp_send_command as aliased. The 13.0.0 compiler has a bug which means
it does not spot this error yet but this fix is to safeguard the code when
the compiler is fixed.
In xC if a function argument is restricted pointer and the function accesses a global then you cannot pass a non-local alias pointer (e.g. an alias pointer to a global). This is because the pointer then may alias the global accessed in the function (which it shouldn't since it is a restricted pointer.
This is happening in the code where a pointer to a global is taken:
and then this is passed into a function that accesses a global:
This commit fixes this by explictly marking the parameter to acmp_send_command as aliased. The 13.0.0 compiler has a bug which means it does not spot this error yet but this fix is to safeguard the code when the compiler is fixed.