Initialize ARM registers to specific value via Inline assembly
The IDE you're using, like most IDEs, automates initialization CPU to the lowest level. It is responsible for generating, for example, the content of the vector table. 

Using a language of higher level than assembler, everything related to manipulation of registers and initialization is quite hidden, especially if enabled compiler optimizations.

I think you should write the critical code in assembler, to ensure the performance of the CPU.
Perhaps the rest of your application can be developed at the highest level, having the low-level code as a library.