I am developing a project based on the Simple Peripheral OAD Off-Chip TI RTOS7 example from SDK v6.40.00.13 for the CC1352R. I have run into a problem using snprintf
to print an 8-byte integer from the context of the ICall task. I believe this is due to improper alignment of the ICall task stack.
I am able to observe the improper alignment by running the Simple Peripheral example project in the debugger and stepping through Task_create()
within ICall_createRemoteTasksAtRuntime()
. The screenshot below shows that Task_create()
is attempting to allocate the ICall stack with 8-byte alignment:
Stepping into Memory_alloc()
reveals that the memory allocation is handled by HEAPMGR_MALLOC
from rtos_heaposal.h, which blindly uses 4-byte alignment, ignoring Task_create()
's request for 8-byte alignment:
Continuing on, we can see that HEAPMGR_MALLOC
returns a memory address of 0x2000494C
, which is clearly not 8-byte aligned:
Is this a known issue? If so, could you provide a link to the associated Jira issue?
What does TI recommend as a workaround to ensure that requests for 8-byte alignment are fulfilled properly?
Thank you,
Peter