Content originally posted in LPCWare by rjallen on Fri Feb 24 07:54:01 MST 2012
Hi,
I'm new to the LPCXpresso and code_red IDE. I have an LPC XPresso 1769 board and the "definitive guide to the arm cortex-m3" book by Joseph Yiu. I've written a few basic programs in C with the board and I wanted to try one in assembly.
Im trying to write a very basic program to write into the SRAM and read the value back out, i.e.
asm("mov r4, #0x20000000");
asm("str r3, [R4]");
asm("ldr r2, [R4]");
When I run this program it stores the value correctly but I get a hardfault handler error when I try to read it back out.
If anyone has any ideas what I'm doing wrong that would be great.