Re: k_thread_user_mode_enter() usage

Boie, Andrew P

It looks like you are getting two exceptions in a row.
Were you able to determine the source of the bus fault? That seems like the real issue.
What platform is this on?


-----Original Message-----
From: [] On Behalf Of Vakul Garg
Sent: Tuesday, March 20, 2018 3:57 AM
Subject: [Zephyr-users] k_thread_user_mode_enter() usage


I want my application auto-launched at zephyr startup to drop its privileges to become user mode app.
So I moved my applications entry point to app_main() and invoked it from k_thread_user_mode_enter(app_main, NULL, NULL, NULL) from function void main().

Now, before app_main() could get called, I get following error:

***** BUS FAULT *****
Executing thread ID (thread): 0x20002eec
Faulting instruction address: 0x12da
Precise data bus error
Address: 0x20011208
Fatal fault in thread 0x20002eec! Aborting.
***** Stack Check Fail! *****
Current thread ID = 0x20002eec
Faulting instruction address = 0x2a290

I checked that the stack sentinel check is failing in function _check_stack_sentinel().

Can someone advise what I am doing wrong?



Zephyr-users mailing list

Join to automatically receive all group messages.