USB Library __ICCARM__ definition

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB Library __ICCARM__ definition

1,124 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yilmazkircicek on Thu Feb 14 08:02:26 MST 2013
__ICCARM__ definition is related with IAR and referenced in USB library. (Common.h)
And causes 3 warning for Descriptors.h due to PROGMEM.
Descriptors.c(43): warning:  #83-D: type qualifier specified more than once
(for dublicate const, const & PROGMEM=const)
I am using Keil, do I need to define __ICCARM__ to remove warnings ?

Best regards.

const USB_Descriptor_HIDReport_Datatype_t PROGMEM GenericReport[] = ..
const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =...
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = ...

#elif (ARCH == ARCH_LPC)
typedef uint32_t uint_reg_t;
#define ARCH_LITTLE_ENDIAN
#if !defined(__ICCARM__)
#define PROGMEM                  const
#else
#define PROGMEM
#endif                       
#define pgm_read_byte(x)         (*x)
#define memcmp_P(...)            memcmp(__VA_ARGS__)
#define memcpy_P(...)            memcpy(__VA_ARGS__)
#include "Endianness.h"
Labels (1)
0 Kudos
1 Reply

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tuong on Mon Mar 11 01:09:37 MST 2013
Hi,

I think you can add a __ICCARM__ to remove those warnings or just simply delete the PROGMEM!

With best regards,
0 Kudos