使用info/warning/error增加调试信息
info
$(info “here add the debug info”)
注,info信息,不打印信息所在行号
warning
$(warning “here add the debug info”)
error
$(error “error: this will stop the compile”)
这个可以停止当前makefile的编译
打印变量的值
$(info $(TARGET_DEVICE) )
使用echo增加调试信息
注:echo只能在target:后面的语句中使用,且前面是个TAB,
形式如下:
@echo “start the compilexxxxxxxxxxxxxxxxxxxxxxx”
@echo $(files)
参考并修正:Makefile中的几个调试方法
本文介绍了在Makefile中使用info、warning和error指令增加调试信息的方法,以及如何利用echo命令进行调试。通过这些技巧,开发者可以更高效地定位问题并解决编译过程中的错误。
443

被折叠的 条评论
为什么被折叠?



