We got our ASIC a few weeks ago. Up to then had used an FPGA to simulate the chip.
I would like to keep the software running seamlessly on both FPGA and ASIC. At the moment the one difference is that they need different clock sources on initilisation.
Easiest would be a #define stating if on ASIC or on FPGA.
Problem is I want one project file were the developer can easily switch from fpga to ASIC defines are per project, or per target and Keil just copies the entire project defintion.
So then if you want to add or change a module name, you have to do so in both projects.
The easiest way I see now is the have a #define in a h file, and edit it to choose target.
There must be a better way?
Under the options tab for C/C++ you can provide command line defines for compiler. You can also create multiple targets under the same project, and each can have it's own set of options.
http://www.keil.com/support/man/docs/uv4/uv4_dg_adscc.htm
http://www.keil.com/support/man/docs/uv4/uv4_ca_projtargfilegr.htm
Yes, but we're still stuck with the fact that there is no way to maintain a set of common options, inherited by all Targets, plus a set of options specific to each Target.
The only IDE I've seen which does this is Segger Embedded Studio (which, I believe, is a re-badged Rowley Crossworks).
Correct but it's not so much the common options that worry me as the file list.
I want two targets sharing the same file list and options, with only one define differentiating them.
As soon as I go the Keil way, I have cloned the project, and now have to maintain two projects differentiated by one define.
And this is double the work when files are added or renamed. Or even deleted.
Is there truly no good way of doing it?