You can do this by utilizing target feature of the CodeWarrior. You can create multiple targets (one for each chip) and have different settings for each of the target. As you change target via pull-down menu, CodeWarrior will automatically change settings. As part of the settings, you can have predefined macros (in the Prefix Text of the Preprocessor settings). Using this target mechanism, you can also switch between different linker.cmd files, which you will have to do if you want to go from 56F805 to 56F807.
Before you start on this road however, I would like to point out that the latest CodeWarrior 6.0 and Processor Expert probably already has the software you are trying to create... you should check it out.
Leonard
-----Original
Message-----
Hi,
Does anybody know if there is a predefined macro that would allow me to know which target board is being used in the project? I'm trying to write my own on-chip portable code for both DSP56F805 and DSP56F807 something like as belows :
#if (TARGET = DSP56F805) #define TIMER_A_0_BASE 0x0D00 #endif #if (TARGET = DSP56F807) #define TIMER_A_0_BASE 0x1100 #endif
Best Regards Kris
------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cidU11 http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/PNArlB/TM ---------------------------------~->
_____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group.
_____________________________________ About this discussion group:
To Join: m...@yahoogroups.com
To Post: m...@yahoogroups.com
To Leave: m...@yahoogroups.com
Archives: http://www.yahoogroups.com/group/motoroladsp
More Groups: http://www.dsprelated.com/groups.php3
|