This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 4bba3b752 tinusb: Fix usbd_stack memory alignment
4bba3b752 is described below

commit 4bba3b752b85e095a1e6bd12e1152e23458eaeb5
Author: Jerzy Kasenberg <jerzy.kasenb...@codecoup.pl>
AuthorDate: Sat Mar 16 12:03:34 2024 +0100

    tinusb: Fix usbd_stack memory alignment
    
    usbd_stack could be placed at memory with wrong alignment.
    For pic32 with FPU enabled that results in exceptions
    when code tries to store/restore FPU registers.
    
    Now OS_TASK_STACK_DEFINE is used that forces correct alignment.
---
 hw/usb/tinyusb/src/tinyusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/tinyusb/src/tinyusb.c b/hw/usb/tinyusb/src/tinyusb.c
index 48bc1ab47..8efc2d4f6 100755
--- a/hw/usb/tinyusb/src/tinyusb.c
+++ b/hw/usb/tinyusb/src/tinyusb.c
@@ -31,7 +31,7 @@
 
 #if MYNEWT_VAL(OS_SCHEDULING)
 static struct os_task usbd_task;
-static os_stack_t usbd_stack[OS_STACK_ALIGN(USBD_STACK_SIZE)];
+OS_TASK_STACK_DEFINE(usbd_stack, USBD_STACK_SIZE);
 #endif
 
 /**

Reply via email to