Sure! Go ahead and fix it the way you see best, thanks! -Jukka
Schock, Johannes - NIVUS GmbH kirjoitti perjantai 25. syyskuuta 2020: > > 1. Set the stack size as aligned already in > > arch/arm/src/common/arm_createstack.c: > > > > - tcb->adj_stack_size = stack_size; > > + tcb->adj_stack_size = STACK_ALIGN_DOWN(stack_size); > > > > 2. fix the do_stackcheck in a way that it doesn't start at (unaligned) > > top, but at the first aligned stack address? > > > > 3. just leave nuttx as is, and go fix all the stack sizes in px4? > > > > > > Initally I did the (1.) which seems to fix my problem. > > I had a look, and you're right. I've missed that arm_stack_color and do_check > are now working differently concerning calculation of top (stackbase) address. > If you don't mind (and since it is my mistake) I will provide a fix that > weekend. > Perhaps 32bit downalign instead of 32bit upalign the arm_stack_color > stackbase would also be a solution as well, since TLS size is also 32bit > aligned. This would keep the requested size in tcb->adj_stack_size. > But I have to verify with arm_usestack.c > > Johannes > --