Skip to main content
Visitor II
November 3, 2017
Question

Cosmic Compiler - how to run from command line

  • November 3, 2017
  • 1 reply
  • 943 views
Posted on November 03, 2017 at 15:09

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
    This topic has been closed for replies.

    1 reply

    Visitor II
    November 5, 2017
    Posted on November 05, 2017 at 07:29

    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