ST意法半导体
直播中

独当一面

9年用户 716经验值
擅长:可编程逻辑
私信 关注
[问答]

请问cubemx生成的makeifle中这些参数是什么意思?

我正在学习 cubeMX 生成的 makefile,但有些参数我无法理解。
在称为“构建应用程序”的部分中,我看到:
  • $(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
  •         $(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@
我不知道参数 `-Wa` 、 `-a` 、 `-ad` 和 `-alms` 是什么意思。查了GCC手册,只找到 -Wa的描述
-Wa,选项
将选项作为选项传递给汇编程序。如果选项包含逗号,它将在逗号处拆分为多个选项。
这些不能帮助我的问题。
我真的很想知道这四个参数是什么意思。







回帖(1)

李淑珍

2022-12-13 13:47:47
-Wa 将下一个参数传递给汇编编译器。
该编译器的文档将显示这些标志的作用:


  • -a[cdghlmns]
  •            Turn on listings, in any of a variety of ways:
  •            -ac omit false conditionals
  •            -ad omit debugging directives
  •            -ag include general information, like as version and options passed
  •            -ah include high-level source
  •            -al include assembly
  •            -am include macro expansions
  •            -an omit forms processing
  •            -as include symbols
  •            =file
  •                set the name of the listing file
  •            You may combine these options; for example, use -aln for assembly listing without forms processing.  The
  •            =file option, if used, must be the last one.  By itself, -a defaults to -ahls.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分