Skip to content

Commit

Permalink
stackusage test case: fix problem caused by compiler inlining
Browse files Browse the repository at this point in the history
  • Loading branch information
PetteriAimonen committed Jun 23, 2020
1 parent a36d904 commit e766f7d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/stackusage/stackusage.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ static volatile uint32_t *g_stackptr;
void start_stack_measuring()
{
uint32_t i = 0;
uint32_t stackfill[MAX_STACK_ENTRIES];
g_stackptr = stackfill;
g_stackptr = (volatile uint32_t*)((uintptr_t)&i - MAX_STACK_ENTRIES * sizeof(uint32_t));
for (i = 0; i < MAX_STACK_ENTRIES; i++)
{
g_stackbuf[i] = g_stackptr[i];
Expand Down

0 comments on commit e766f7d

Please sign in to comment.