This is a theoretic problem more than a practical one. Your problem is O(N) time and O(1) space constraint.
O(1) space constraint means no dynamic allocation (even how small you want it to be).
This means we cannot have a buffer for the to be rotated chars and we cannot copy the string input either. We could have a buffer for 1 char for example (constant allocation) and then rotate one step M times - but rotating just one time is already O(N). While we may iterate/rotate as many times we like, it must be a constant number of times and not depending on the input or otherwise it ends up being O(N*M).
So what if we rotate single chars more than one step at a time (eg. say we need to rotate 3 places) ? - this could lead to a something that might satisfy the requirement. But then how to track what has been rotated (remember we cannot make a buffer the size of the number of steps to rotate - only constant size).
Maybe this conundrum can be solved, but it needs some clever trick to pull off the way I understand it, mathematical or otherwise.