2014年5月19日 星期一

u-boot下 /lib_arm/board.c 修改


#define GPD0DAT                           0xE02000A4 <==不能這樣寫,他讀到的是值,非位址

出現以下錯誤
board.c: In function 'buzzer_on':
board.c:225: error: lvalue required as left operand of assignment
board.c: In function 'buzzer_off':
board.c:234: error: lvalue required as left operand of assignment
board.c: At top level:
board.c:242: warning: function declaration isn't a prototype
make[1]: *** [board.o] Error 1
make[1]: Leaving directory `/home/cadtc/20140513/uboot_TQ210_1.3.4/lib_arm'
make: *** [lib_arm/libarm.a] Error 2
make: *** Waiting for unfinished jobs....
make[1]: Entering directory `/home/cadtc/20140513/uboot_TQ210_1.3.4/drivers/mtd/nand_legacy'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/cadtc/20140513/uboot_TQ210_1.3.4/drivers/mtd/nand_legacy'
make[1]: Entering directory `/home/cadtc/20140513/uboot_TQ210_1.3.4/drivers/mtd/onenand'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/cadtc/20140513/uboot_TQ210_1.3.4/drivers/mtd/onenand'
make: *** wait: 沒有子程序存在.  Stop.


#define GPD0DAT                            __REG(0xE02000A4)<==改成這樣變成指標指向位址

沒有留言:

張貼留言