I try to build ppm RC to usb interface with the new released usbdrv 2007-12-01 and get following errors:
Building configuration: rcu - Release 
Updating build tree... 
 
36  file(s) deleted. 
Updating build tree... 
in_adc.c 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceConnect" (declared at line 79 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 274 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceDisconnect" (declared at line 80 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 276 
out_joystick.c 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceConnect" (declared at line 79 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 274 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceDisconnect" (declared at line 80 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 276 
usbdrv.c 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceConnect" (declared at line 79 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 274 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceDisconnect" (declared at line 80 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 276 
Warning[Pe177]: variable "recipient" was declared but never referenced E:\mcu projects\test\source\usbdrv\usbdrv.c 342 
in_ppm.c 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceConnect" (declared at line 79 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 274 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceDisconnect" (declared at line 80 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 276 
in_ppm_adv.c 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceConnect" (declared at line 79 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 274 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceDisconnect" (declared at line 80 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 276 
main.c 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceConnect" (declared at line 79 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 274 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceDisconnect" (declared at line 80 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 276 
out_joystick_btn.c 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceConnect" (declared at line 79 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 274 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceDisconnect" (declared at line 80 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 276 
out_reflex.c 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceConnect" (declared at line 79 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 274 
Warning[Pe047]: incompatible redefinition of macro "usbDeviceDisconnect" (declared at line 80 of "E:\mcu projects\test\source\options.h") E:\mcu projects\test\source\usbdrv\usbdrv.h 276 
usbdrvasm.asm 
Error[18]: No such pre-processor command: 'warning' E:\mcu projects\test\source\usbdrv\usbdrv.h 471 
Warning[16]: Suspicious sfr expression E:\mcu projects\test\source\usbdrv\usbdrvasm.S 87 
Error[41]: Bad label E:\mcu projects\test\source\usbdrv\usbdrvasm12.S 246 
Error[14]: Missing #endif E:\mcu projects\test\source\usbdrv\usbdrvasm.asm 21 
 
Total number of errors: 3 
Total number of warnings: 18
			
			
									
									
						IAR AVR build error with new usbdrv lib 2007-12-01
after removed the redefine macro usbDeviceConnect and usbDeviceDisconnect  in options.h , removed the #warning... in usbdrv.h,
changed .macro to macro .endm to endm and then...
only one error last:
Building configuration: rcu - Release
Updating build tree...
 
33 file(s) deleted.
Updating build tree...
in_adc.c
usbdrv.c
Warning[Pe177]: variable "recipient" was declared but never referenced E:\mcu projects\test\source\usbdrv\usbdrv.c 342
in_ppm_adv.c
out_joystick.c
out_joystick_btn.c
in_ppm.c
main.c
out_reflex.c
usbdrvasm.asm
Warning[16]: Suspicious sfr expression E:\mcu projects\test\source\usbdrv\usbdrvasm.S 87
Error[14]: Missing #endif E:\mcu projects\test\source\usbdrv\usbdrvasm.asm 21
 
Total number of errors: 1
Total number of warnings: 2
			
			
									
									
						changed .macro to macro .endm to endm and then...
only one error last:
Building configuration: rcu - Release
Updating build tree...
33 file(s) deleted.
Updating build tree...
in_adc.c
usbdrv.c
Warning[Pe177]: variable "recipient" was declared but never referenced E:\mcu projects\test\source\usbdrv\usbdrv.c 342
in_ppm_adv.c
out_joystick.c
out_joystick_btn.c
in_ppm.c
main.c
out_reflex.c
usbdrvasm.asm
Warning[16]: Suspicious sfr expression E:\mcu projects\test\source\usbdrv\usbdrvasm.S 87
Error[14]: Missing #endif E:\mcu projects\test\source\usbdrv\usbdrvasm.asm 21
Total number of errors: 1
Total number of warnings: 2
Thanks for your feedback about the current status of IAR compatibility!
I have added your .macro and .endm fix for the next release.
Please define USB_INTR_PENDING to the appropriate register or memory address in usbconfig.h. The default is EIFR or GIFR in usbdrv.h, but these constants may not be defined at the time we check for them, or they may be defined in an unexpected way (not as numeric constant). With this fix, you should get rid of the warning in line 87 of usbdrvasm.S.
But I can't see where an #endif could be missing. Maybe this is a consequence of the line 87 warning. Or it's the #error preprocessor command at the end of usbdrvasm.S. Did you remove it? And did you make sure that you have not changed the #if/#endif structure where you removed #warning or #error commands?
			
			
									
									
						I have added your .macro and .endm fix for the next release.
Please define USB_INTR_PENDING to the appropriate register or memory address in usbconfig.h. The default is EIFR or GIFR in usbdrv.h, but these constants may not be defined at the time we check for them, or they may be defined in an unexpected way (not as numeric constant). With this fix, you should get rid of the warning in line 87 of usbdrvasm.S.
But I can't see where an #endif could be missing. Maybe this is a consequence of the line 87 warning. Or it's the #error preprocessor command at the end of usbdrvasm.S. Did you remove it? And did you make sure that you have not changed the #if/#endif structure where you removed #warning or #error commands?
It is no use , even if i define the USB_INTR_PENDING, the warning also exist.
I use the lazy way to solve this:
// #if USB_INTR_PENDING < 0x40 /* This is an I/O address, use in and out */
# define USB_LOAD_PENDING(reg) in reg, USB_INTR_PENDING
# define USB_STORE_PENDING(reg) out USB_INTR_PENDING, reg
// #else /* It's a memory address, use lds and sts */
// # define USB_LOAD_PENDING(reg) lds reg, USB_INTR_PENDING
// # define USB_STORE_PENDING(reg) sts USB_INTR_PENDING, reg
// #endif
			
			
									
									
						I use the lazy way to solve this:
// #if USB_INTR_PENDING < 0x40 /* This is an I/O address, use in and out */
# define USB_LOAD_PENDING(reg) in reg, USB_INTR_PENDING
# define USB_STORE_PENDING(reg) out USB_INTR_PENDING, reg
// #else /* It's a memory address, use lds and sts */
// # define USB_LOAD_PENDING(reg) lds reg, USB_INTR_PENDING
// # define USB_STORE_PENDING(reg) sts USB_INTR_PENDING, reg
// #endif

