I have the exmaple code from Atmel for the AT91SAM7X512, When compiled with real-view the startup code executed and jumps to Main via the __main code. However the __main code changes the Stack pointer in the Supervisor and Int Modes to something other than what the startup-code sets it to. I connot find the why __main code would do this.
Does anyone have a clue as to why the stack changes in __main?