IMGJulian commented on a change in pull request #474: PIC32: Fix stack align URL: https://github.com/apache/mynewt-core/pull/474#discussion_r131606248
########## File path: kernel/os/include/os/arch/pic32/os/os_arch.h ########## @@ -38,7 +38,8 @@ typedef uint32_t os_sr_t; /* Stack type, aligned to a 32-bit word. */ #define OS_STACK_PATTERN (0xdeadbeef) -typedef uint32_t os_stack_t; +/* uint64_t in an attempt to get the stack 8 aligned */ +typedef uint64_t os_stack_t; Review comment: My first attempt at a fix for this did something similar (modifying the stack pointer in `os_arch_task_stack_init()`) but I didn't like that the user may end up with a slightly smaller stack than they specified. Let me know If you would rather I did this to fit in with the x86 sim port. `typedef uint32_t __attribute__((aligned(8))) os_stack_t;` I couldn't get this to work, looks like it aligns the elements and not the array? `repos/apache-mynewt-core/kernel/os/src/os.c:48:1: error: alignment of array elements is greater than element size` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services