在要生成Hex文件的工程名上右键,选择Properties,找到Build,选择Steps选项卡,
直接在Post-build steps
中输入:"\${CG_TOOL_HEX}" -i "\${BuildArtifactFileName}" -o "\${BuildArtifactFileBaseName}.hex" -order MS -romwidth 16
在Post-build steps
下面的Description
中输入Create flash image: Intel-HEX
即可。