S3C2440 gpio
WATCHDOG TIMER
原理图
手册
举例
start.S
.globl _start
_start:
/* 关看门狗 */
/* 往WTCON(0x53000000)写0 */
ldr r0, =0x53000000
mov r1, #0
str r1, [r0] @ str, store,
/* 设置GPFCON让GPF5作为输出引脚 */
ldr r1, =0x56000050
mov r0, #(1<<10)
str r0, [r1]
/* 设置GPFDAT让GPF5输出0 */
ldr r1, =0x56000054
mov r0, #0
str r0, [r1]
/* 无限循环 */
halt:
b halt
Makefile
led.bin: start.o
arm-linux-gnueabihf-ld -Ttext 0 -o led.elf start.o
arm-linux-gnueabihf-objcopy -O binary led.elf led.bin
arm-linux-gnueabihf-objdump -D led.elf > led.dis
start.o : start.S
arm-linux-gnueabihf-gcc -o start.o start.S -c
clean:
rm *.o led.elf led.bin led.dis