Link here

Custom Makefile

This document explains how to use a custom makefile with Mosaic's C compiler

Page Contents

The Control-C cross-compiler was written by Fabius Software Systems and customized by Mosaic Industries to facilitate programming Mosaic embedded controllers in C. To program in C, use the IDE (Integrated Development Environment) based on the TextPad editor to create your source code program files. Clicking in the Terminal window and sending the download file to the 68HC11 microcontroller via the RS-232 serial link completes the process: you can then type main from your terminal to execute your program. This default method uses a pre-coded makefile. To create your own makefile that gives you more latitude in how you name your source code files, follow these instructions.

 

Background

The default linker scheme only links files with names that are related to the original file. For instance if your c file is called

main.c

Then fabius will look to link

main*.c

For example any of these filenames would be linked:

  • main1.c
  • main2.c
  • main_final.c
 

Example

If you're compiling a project file filename.c, Qcc looks for a file named filename.mk in the project directory, and if found, uses its contents to override the defaults from the Qcc.ini file. In this example, the customer is using the *.mk file to specify named compilation files for the multi-page make, instead of being stuck with the default simplistic names.

[common]


[single]
CompilerCmd = 'c11 /Include=%F\Include'

Files:
%B.c
:end

[multi]
CompilerCmd = 'c11 /Include=%F\Include /Model=Medium /OutStyle=Microsoft'

Files:
%B*.c init_func.c  motor_func.c powerio_func.c ad247.c alert_func.c
:end



See also →  Mosaic IDE

 
This page is about: How to Use Custom Makefile, Mosaic's Control C IDE, Customize Names of Your Source Code Files – How to use a custom makefile with Mosaic's Control C IDE to customize the names of your source code files.
 
 
Navigation