Update cmsis-os driver to support kernel aware debuggers
@@ -64,10 +64,10 @@ lwesp_sys_unprotect(void) {
uint8_t
lwesp_sys_mutex_create(lwesp_sys_mutex_t* p) {
const osMutexAttr_t attr = {
- .attr_bits = osMutexRecursive
+ .attr_bits = osMutexRecursive,
+ .name = "lwesp_mutex",
};
- *p = osMutexNew(&attr);
- return *p != NULL;
+ return (*p = osMutexNew(&attr)) != NULL;
}
uint8_t
@@ -98,7 +98,10 @@ lwesp_sys_mutex_invalid(lwesp_sys_mutex_t* p) {
uint8_t
lwesp_sys_sem_create(lwesp_sys_sem_t* p, uint8_t cnt) {
- return (*p = osSemaphoreNew(1, cnt > 0 ? 1 : 0, NULL)) != NULL;
+ const osSemaphoreAttr_t attr = {
+ .name = "lwesp_sem",
+ };
+ return (*p = osSemaphoreNew(1, cnt > 0 ? 1 : 0, &attr)) != NULL;
}
uint8_t
@@ -130,7 +133,10 @@ lwesp_sys_sem_invalid(lwesp_sys_sem_t* p) {
uint8_t
lwesp_sys_mbox_create(lwesp_sys_mbox_t* b, size_t size) {
- return (*b = osMessageQueueNew(size, sizeof(void*), NULL)) != NULL;
+ const osMessageQueueAttr_t attr = {
+ .name = "lwesp_mbox",
+ };
+ return (*b = osMessageQueueNew(size, sizeof(void*), &attr)) != NULL;
}
uint8_t
