TQ2440_test测试程序(其实就是裸机程序),在windows上可能用ADS1.2编译通过。
我用的是linux系统,所以想问一下如何用arm-linux-gcc来编译,
能不能给个Makefile(通用些的)。
我的[Makefile]文件
CFLAGS := -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding
## Include Directories
INCLUDES = -I"../inc/"
PROJECT=Main
PROJECTBIN = $(PROJECT).bin
CC=arm-linux-gcc $(INCLUDES)
COMPILE.C = $(CC) $(CFLAGS) -c
COMPILE.S = $(CC) -S -Wall -O2 -c
OBJ = 2440init.o 2440slib.o $(PROJECT).o camif.o IrDA.o memtest.o RTC.o UDA1341.o 2440lib.o camproset.o keyscan.o mmu.o SD_MMC.o dma.o LCD_TFT.o nand.o Test_OV9650.o Adc.o eeprom.o Main.o Pic.o Touchpanel.o AudioDrv.o IIC.o profile.o TQ_LOGO.o
all: $(PROJECT)
$(PROJECT) : $(OBJ)
arm-linux-ld -T$(PROJECT).lds $(OBJ) -o $(PROJECT)_elf
arm-linux-objcopy -O binary -S $(PROJECT)_elf $(PROJECT).bin
arm-linux-objdump -D -m arm $(PROJECT)_elf > $(PROJECT).dis
%.o: %.s
$(COMPILE.S) $< -o $@
%.o: %.c
$(COMPILE.C) $< -o $@
clean:
rm -f $(PROJECT).dis $(PROJECT).bin $(PROJECT)_elf *.o
我在Makefile在src目录里
newman0708@debian:/work/eclipse_projects/TQ2440_Test/src$ ls
2440init.s camproset.c LCD_TFT.c mmu.o RTC.o TQ_LOGO.o
2440lib.c dma.c Main.c nand.c SD_MMC.c UDA1341.c
2440slib.s dma.o Makefile nand.o SD_MMC.o UDA1341.o
Adc.c eeprom.c Makefile.tgz Pic.c Test_OV9650.c
Adc.o IIC.c memtest.c Pic.o Test_OV9650.o
AudioDrv.c IrDA.c memtest.o profile.c Touchpanel.c
camif.c keyscan.c mmu.c RTC.c TQ_LOGO.c
newman0708@debian:/work/eclipse_projects/TQ2440_Test/src$ make
arm-linux-gcc -I"../inc/" -S -Wall -O2 -c 2440init.s -o 2440init.o
arm-linux-gcc -I"../inc/" -S -Wall -O2 -c 2440slib.s -o 2440slib.o
arm-linux-gcc -I"../inc/" -S -Wall -O2 -c Main.c -o Main.o
In file included from Main.c:11:
../inc/2440addr.h: In function `ClearPending':
../inc/2440addr.h:677: warning: type defaults to `int' in declaration of `i'