Content originally posted in LPCWare by Pacman on Thu Aug 28 13:28:14 MST 2014
Uhm... It looks like you're loading r0 with the value #0, not the contents of address 0x00000000.
Eg.
ldr r0,=0 /* zero register r0 */
ldr r0,0 /* read the contents of address 0 into r0 */
You may need to do this, though:
movs r0,#0 /* zero r0 */
ldr r0,[r0] /* read the initial stack pointer address */
Another thing...
As you're using the LPC1776, which has 64kB on-chip main SRAM, you have the address range 0x10000000 to 0x1000ffff.
Normally, you would place the stack at the end of SRAM, which would be 0x10010000 (no, you can't read from that address, but as the address is pre-decremented, the first word that is stored, is stored in address 0x1000fffc, not 0x10010000).
If you want to support all devices with at least 16kB SRAM, the stack address could be 0x10004000.