相关文章:
http://blog.csdn.net/zhangxuechao_/article/details/77990854
举例
start.S
.globl _start
_start:
/* 关看门狗 */
/* 往WTCON(0x53000000)写0 */
ldr r0, =0x53000000
mov r1, #0
str r1, [r0] @ str, store,
/* 设置栈大小,不能大于4k,因为片内SRAM只有4k */
ldr sp, =1024*4
bl main
halt:
b halt
main.c
#define GPFCON (*(volatile unsigned int*)0x56000050)
#define GPFDAT (*(volatile unsigned int*)0x56000054)
int main()
{
GPFCON |= (1 << 8);
GPFDAT &= (0 << 4);
return 0;
}