-
|
Hi Everyone Just would like to see if anybody has similar issues or knows how I could check further ? My project has one user thread that wants to access a mutex but I got error like the following: Zephyr RTOS->|syscall z_vrfy_k_mutex_lock failed check: access denied some background info:
My definition for the mutex in uart.c file: and the user_thread.c has the following code to create a user thread, grant access to my mutex for the user thread: extern struct k_mutex rs_rtos_debug_uart_mutex; What I found so far ? 20010ca8 is not a valid According to my map file, my mutex is placed at address 0x20010ca8 _.k_mutex.static.my_mutex As far as I can tell, the z_object_find(&my_mutex) is returnning NULL which caused the error. My vscode debugger tells me that the address of my_mutex passed into z_object_find() is 0x20010ca8, the same in the map file. Then z_object_find() could not find it because the hash table generated by gen_kobject_list.py only has 0x20010cd4 for my mutex. It seems weird to me the gen_kobject_list.py found the symbol of my_mutex from elf file , but it is not the same address as in the final map file. Any body could help me here ? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
I think you need to use |
Beta Was this translation helpful? Give feedback.
I think you need to use
sys_mutex*API from userspace.