Map 1
Make_000.gmk
  Make_003_ReleaseSettings.gmk
  Make_005_UserSettings.gmk
  Make_010_Paths.gmk
    Hal_010_Paths.gmk
    Cust_010_Paths
  Make_020_Tools.gmk
    Hal_020_Tools.gmk
      ToolChain_020_Tools(编译器相关)
      Cust_020_Tools(客户相关,但是目前空白)
  Make_030_Flags.gmk
    Gen_030_Flags.gmk
    Hal_030_Flags
    ToolChain_030_Flags
    Cust_030_Flags
      CustVar_030_Flags
        CustVarBuild_050_Files
  Make_050_Files.gmk
    Gen_050_Files.gmk
    Hal_050_Files.gmk
    Cust_050_Files.gmk
      CustVar_050_Files.gmk
  Make_070_Link.gmk
    感觉没啥用
    Hal_070_Link.gmk
      Cust_070_Link.gmk
        CustVar_070_Link.gmk
  Make_100_HexManip.gmk
    Hal_100_HexManip.gmk
      Cust_100_HexManip.gmk
        CustVar_100_HexManip.gmk
          拼接HEX 文件
  Make_110_PCLint.gmk
    Hal_110_PCLint.gmk
空白
  Make_120_Misra.gmk
    ToolChain_120_Misra.gmk
  Make_130_Cover.gmk
    ToolChain_130_Cover
  Make_150_Sizes.gmk
    Hal_150_Sizes
      Cust_150_Sizes.gmk
        CustVar_150_Sizes.gmk
          内存占用报告
  Make_180_PreBuild.gmk
    Hal_180_PreBuild
      Cust_180_PreBuild
        CustVar_180_PreBuild.gmk
          空的
          啥也没干
  Make_200_PostBuild.gmk
    Hal_200_PostBuild.gmk
      Cust_200_PostBuild.gmk
        CustVar_200_PostBuild.gmk
          啥也没干
  Make_500_Rules.gmk
    不知道干嘛的看不懂
    Hal_500_Rules.gmk
      ToolChain_500_Rules.gmk
        和工具链有关系
  .PHONY
    SingleCore_Clean
      CleanTmpDirectory
    SingleCore_Prepare
      MakeTmpDirectories
      CreateAndCleanBinDirectory
      PrintRebuildType
      PrintCompilerVersion
      PrintIncludePaths
      PrintCompilerFlags
      PrintDebugInfo
      DoMisraPrepare
      PreBuild
    MultiCore_Build_C
      LinkObjectFiles
    SingleCore_Finalize
      HexManip
      ALSize
      PostBuild3
      DoMisraFinalize
CURR_RELEASE_FOLDER := 1.0
CURR_RELEASE := 1
输出版本号
好像没啥用
MISRA 工具选择
AXIVION QAC
路径定义
包含了新的路径模块(关键点)
include $(ENV_MAKE_HAL)/Hal_010_Paths.gmk
include $(ENV_MAKE_CUST)/Cust_010_Paths.gmk
HAL ,硬件抽象层
CUST 客户定义层
ENV_MAKE_HAL = $(ENV_MAKE)/Hal/$(TYP_ECU)
ENV_MAKE_CUST =$ (ENV_MAKE)/Cust/$(TYP_OEM)/$(TYP_PRJ)
include $(ENV_MAKE_TOOL_CHAIN_BASE)/CC/$(TYP_CC)/ToolChain_010_Paths.gmk
不同编译器,文件路径不一样
编译器工具路径
暂时空白
工具包, make调用的第三方工具
ENV_MAKE_HAL = $(ENV_MAKE)/Hal/$(TYP_ECU)
include $(ENV_MAKE_HAL)/Hal_020_Tools.gmk
include $(ENV_MAKE_TOOL_CHAIN_BASE)/CC/$(TYP_CC)/ToolChain_020_Tools.gmk(编译器工具链)
include $(ENV_MAKE_CUST)/Cust_020_Tools.gmk
ENV_MAKE_TOOL_CHAIN_BASE = $(ENV_MAKE)/Toolchain
ENV_MAKE_CUST =$(ENV_MAKE)/Cust/$(TYP_OEM)/$(TYP_PRJ)
宏定义
头文件
源文件
# Note: Flags for Mcal will be included in the specific MCAL make files, usually included at customer level
# Note: Flags for CDDs will be included in the specific CDD make files, usually included at customer level
C_INCLUDES := $(PATH_SRC_AL_COMPONENT)/ALUnit/AL_Helper
$(PATH_SRC_AL_COMPONENT)/ALUnit/CfgId $(PATH_SRC_AL_COMPONENT)/ALUnit/Util/McalSupport/Reg
$(PATH_SRC_AL_COMPONENT)/ALUnit/Util/Time
$(C_INCLUDES)
上面是些啥??
C_INCLUDES := $(PATH_SRC_HAL)
$(PATH_SRC_HAL)/Sys/Start
$(C_INCLUDES)
下面的定义是干嘛的?
C_INCLUDES_TOOL_INTERNAL := $(C_INCLUDES_TOOL_INTERNAL)
$(PATH_TOOLS_COMPILER_INC)
C_DEFINES := $(C_DEFINES)
NOTHROW=
PATH_SRC_HAL = ($PATH_SRC_BASE)/Src_AL/Hal/$(TYP_ECU)
和工具链相关的宏定义 C_DEFINES
内部宏定义
C_DEFINES_TOOL_INTERNAL :=
$(C_DEFINES_TOOL_INTERNAL)
__ghs__
__PRIMASK
__attribute__()=
基础编译开关
CFLAGS_BASE
CFLAGS_OPT_SPACE 空间优化
CFLAGS_OPT_SPEED 速度优化
CFLAGS_OPT_DEBUG 调试信息
CFLAGS_WARN_ALL
TYP_CORE 核心
CFLAGS
AFLAGS
CPPFLAGS
LDFLAGS 入口函数
include $(ENV_MAKE_CUST_VAR)/CustVar_030_Flags.gmk
ENV_MAKE_CUST_VAR = $(ENV_MAKE_CUST)/$(TYP_VAR)
根据最终目标确认是测试框架还是APP如果是app需要带上MCAL 框架
FILES_SRC_GEN =
FILES_SRC_HAL =
FILES_SRC_CDD =
FILES_SRC_SWC =
FILES_SRC_MCAL =
FILES_SRC_CUST =
include $(ENV_MAKE_GEN)/Gen_050_Files.gmk
include $(ENV_MAKE_HAL)/Hal_050_Files.gmk
include $(ENV_MAKE_CUST)/Cust_050_Files.gmk
AL_Helper.c 是什么鬼东西
和工具链有关
ALElfToRdm
include $(ENV_MAKE_TOOL_CHAIN_BASE)/MISRA/$(TYP_MISRA)/ToolChain_120_Misra.gmk
覆盖率测试