2014.01.02
1、makefile中警告命令:用-Wall,而不能都是大写或小写。如果是都小写则出现如下错误提示:
arm-none-linux-gnueabi-gcc: unrecognized option '-wall'
2、c文件中main函数必须是int型,不能是void型,不然会:
warning: return type of 'main' is not 'int'
3、汇编语句中关于地址的需要用=号:
ldr r0,=0x56000000 //没有等号就会出现这样的错误
crt0.s: Assembler messages:crt0.s:8: Error: bad immediate value for offset (1442840568) //crt0.s是我的汇编文件名
4、汇编中用到立即数时,立即数前要加#号:mov r1,#0x0 不然会出现这样的错误:
crt0.s:8: Error: internal_relocation (type: OFFSET_IMM) not fixed up
.equ mem_ctl_base, 0x48000000
mov r1,#mem_ctl_base 等价于ldr r1,=mem_ctl_base
5、mini2440的led和key键所对应的寄存器和接线图如下: