ST意法半导体
直播中

王倩

8年用户 235经验值
私信 关注
[问答]

Cosmic Compiler如何从命令行运行

HI,
我有一个项目,其中包含12个不同的'目标',由不同的和锐利的定义。现在我需要手动编辑.h文件,取消注释12个定义中的一个,构建它并对所有目标执行相同操作。
通过单击/单个命令触发不同配置的构建项目的最佳方法是什么...
具有根据所选目标命名的输出文件(s19)也是很好的。
先谢谢你
Krzysiek

#cosmic-compiler#stm8

以上来自于谷歌翻译


以下为原文




HI,
I have a project which contains 12 different 'targets' defined by different &sharpdefines. Now i need to edit .h file manually, uncomment one of 12 defines, build it and do the same for all the targets.
What is best approach to trigger building project for different configuration by single click/single command...
It would be also nice to have output files (s19) named according to selected target.
Thank you in advance
Krzysiek

#cosmic-compiler #stm8

回帖(1)

李淳鑫

2019-6-25 08:41:34
对于类似的任务,我使用GNU make。 Makefile使用模式规则,静态模式和特定于模式的变量。我有3个程序,每个程序编译8个目标,每个目标有4组不同的编译器选项。我在GNU / Linux上使用SDCC,但该方法适用于任何编译器。 AFAIR,Cosmic在手册中有一节“编译器命令行选项”。
菲利普

以上来自于谷歌翻译


以下为原文




For a similar task, I use GNU make. The Makefile uses pattern rules, static patterns and pattern-specific variables. I have 3 programs, each compiled for 8 targets each with 4 different sets of compiler options. I use SDCC on GNU/Linux, but the approach should work with any compiler. AFAIR, Cosmic has a section 'Compiler Command Line Options' in the manual.
Philipp
举报

更多回帖

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