打印
[AVR单片机]

Makefile 问题

[复制链接]
2439|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
lucidmask|  楼主 | 2007-3-5 09:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我用MFile生成了一个makefile ,工程只有一个.c文件,只修改了Makefile中的
TARGET和SRC部分,但编译时出错如下:
Error makefile 379: Command syntax error
Error makefile 380: Command syntax error
Error makefile 381: Command syntax error
Error makefile 382: Command syntax error
Error makefile 385: Command syntax error
Error makefile 386: Command syntax error
Error makefile 388: Command syntax error
Error makefile 389: Command syntax error
Error makefile 391: Command syntax error
Error makefile 393: Command syntax error
Error makefile 394: Command syntax error
Error makefile 448: Colon expected
Error makefile 474: Too many rules for target '%.o'
Error makefile 501: Command syntax error

错误指向如下语句:
ifeq ($(DEBUG_BACKEND),simulavr)
    @echo load  >> $(GDBINIT_FILE)
endif    
    @echo break main >> $(GDBINIT_FILE)
    
debug: gdb-config $(TARGET).elf
ifeq ($(DEBUG_BACKEND), avarice)
    @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.
    @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \
    $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)
    @$(WINSHELL) /c pause
    
else
    @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \
    $(DEBUG_MFREQ) --port $(DEBUG_PORT)
endif
    @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)

刚学习GCC,请多指教,谢谢!

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

47

主题

308

帖子

0

粉丝