Content originally posted in LPCWare by RA1981 on Fri Jul 29 11:24:15 MST 2011
Hi,
I saw that the LPC13xx/17xx chips don't have a revision identifier. I don't know if it's because they are all currently at the first revision or if it's a break in the line => LPC11xx/13xx have a device ID register, LPC17xx don't have it (bootloader API must be used).
However, TARGETCHIP now result in different symbols (with and without revision, depending on the used chip).
So, I ask again to CodeRed (didn't get a answer last time, even a 'no' is okay):
Is it possible that you implement two additional symbols which reflect the used target and revision separately? Something like TARGETREV and TARGETMCU?
For all of you which like the idea to have it separated I attached a device header file which does it (rename it to device.h). It covers LPC11xx/13xx/17xx devices and defines TARGETFAM, TARGETMCU and TARGETREV, e.g. LPC13XX, LPC1343 and 302. For devices which don't have a revision number TARGETREV will expand to 000.
The corresponding device header file is also included.
Note: I couldn't fully test it, so please report any bugs found.
Anyone knows a way to customize the project and file templates so that the symbols mentioned in the answers above are created automatically? (previous question also not answered by CodeRed ;))
Customizing the C template file would be also good to include the "device.h" instead of the corresponding chip header file.
Regards,
Ralf