For the attached example, sdcc makes the second argument 16-bits wide, even though it should be 32 bits.
We thus put less arguments on the stack before the call than we take from the stack after the call.
For some ports, such as. the z80-related ones this results in an assertion failure during compilation.
For other ports, such as the hc08-related ones it results in wrong code being generated silently:
;test.c:12: printf("", (1000L * latency) / RTIMER_ARCH_SECOND);
The attached source code has been created by reducing some code from the Contiki OS.
Log in to post a comment.