esp_expression_with_stack: fix wrong top of stack calculation plus documentation update

This commit is contained in:
Felipe Neves
2019-12-20 13:23:47 -03:00
parent e4fb50e6f3
commit f0e82311a5
3 changed files with 5 additions and 5 deletions

View File

@@ -6,8 +6,7 @@ StackType_t * esp_switch_stack_setup(StackType_t *stack, size_t stack_size)
{
int watchpoint_place = (((int)stack + 31) & ~31);
StackType_t *top_of_stack = (StackType_t *)&stack[0] +
(sizeof(stack_size * sizeof(StackType_t)) /
sizeof(StackType_t));
((stack_size * sizeof(StackType_t)) / sizeof(StackType_t));
//Align stack to a 16byte boundary, as required by CPU specific:
top_of_stack = (StackType_t *)(((UBaseType_t)(top_of_stack - 31) -