Use a single stack

Hello,

I’m currently working on an ARM Cortex M4 where RIOT uses both MSP and PSP stacks, I’m looking to run RIOT using only one stack (MSP or PSP), is there a setting for this?

Thanks to you

Nope, RIOT’s use of the two different stack pointers on Cortex-M is hard-coded in several places and not trivial to change. The scheduling code depends on it.

It might be possible to allow using only one of the stack pointers, but I think it would basically require duplicating the scheduling code. And the one-stack-pointer version would probably get a bit messy. There’s a reason for dual SPs, some things are convenient to implement.

What’s the use case? Running RIOT from non-privileged mode?

Thank you for your answer Kasper, you got it right, it’s for running RIOT in non-privileged mode, is there any other project working on that ?

Thank you