I'm running Parasoft C/C++ check on my code and getting a lot of signed/unsigned mismatch complaints. The mismatch is that the SFRs are unsigned, but the constants don't all have the U suffix to make them unsigned.
#define SFR_8BIT(address) extern volatile unsigned char address #define SFR_16BIT(address) extern volatile unsigned int address //#define SFR_20BIT(address) extern volatile unsigned int address typedef void (* __SFR_FARPTR)(); #define SFR_20BIT(address) extern __SFR_FARPTR address #define SFR_32BIT(address) extern volatile unsigned long address // snip... #define DMADSTINCR1 (0x0800) /* DMA destination increment bit 1 */ #define DMADT0 (0x1000) /* DMA transfer mode bit 0 */ #define DMADT1 (0x2000) /* DMA transfer mode bit 1 */ #define DMADT2 (0x4000) /* DMA transfer mode bit 2 */ #define DMASWDW (0*0x0040u) /* DMA transfer: source word to destination word */ #define DMASBDW (1*0x0040u) /* DMA transfer: source byte to destination word */ #define DMASWDB (2*0x0040u) /* DMA transfer: source word to destination byte */ #define DMASBDB (3*0x0040u) /* DMA transfer: source byte to destination byte */
It seems only the defines that involve a multiplier are unsigned, (as to avoid multiplier overflow into the signed msb?).
As a quick fix I can add edit and add the unsigned suffix myself, but will need to redo it for every compiler update. Would TI consider fixing this?