Hi Nathan,
I am playing around with my C libraries and C Phoenix code and I am trying to make it work with multiple processors, (Bap28, Bap40 and Arc32). Yesterday I updated my makefile for the library to build so far the Bap28 and Bap40, where the object files are built in their own sub-directories and the like. Now I would like to build the phoenix to run on either the Bap28 or the Bap40. I now have all of my code setup (I think) to configure around the different processors with things like: #ifdef BASICATOMPRO28.
My Hex Programs master header file has in it:
Code:
#ifndef BASICATOMPRO28
#ifndef BASICATOMPRO40
#ifndef BASICATOMARC32
#warning "Which Atom Pro not defined assuming BASICATOMPRO28"
#define BASICATOMPRO28
#endif
#endif
#endif
The question is, how to tell the source code which one I am compiling for. I could try to change the global compiler options (Preferences to define it), but I hate having to change this each time I am building. Likewise I could change my master header file each time...
Another option. You could modify the build depending on what Processor is chosen at the top of the IDE. You already use this to select which link file to use... You could pass this through with the -D BASICATOMPRO28 on the compiler invocation.
Suggestions?
Kurt
P.S - Later I will also include phoenix running on Arc32, but my servo code is not working yet and I need to figure out how to write Servo code for the Arc32...