Pls help me to compile avrusb using IAR cc

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
sonicss
Posts: 5
Joined: Tue Jun 10, 2008 5:15 pm

Pls help me to compile avrusb using IAR cc

Post by sonicss » Tue Jun 10, 2008 5:31 pm

1. create a new project
2. add oddebug.c, usbdrv.c, usbdrvasm.asm
3. create main.c and write main() function
4. comment
// #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

5. comment
/* #warning "You should define USB_CFG_VENDOR_ID and USB_CFG_DEVICE_ID in usbconfig.h" */
6. compile

I can't find out why there is a error tip: missing #endif. Who can help me.

Building configuration: ttt - Debug
Updating build tree...

7 file(s) deleted.
Updating build tree...
main.c
oddebug.c
Warning[Pa050]: non-native end of line sequence detected (this diagnostic is only issued once) E:\ttt\usbdrv\oddebug.c 1
usbdrv.c
Warning[Pa050]: non-native end of line sequence detected (this diagnostic is only issued once) E:\ttt\usbdrv\usbdrv.c 1
Warning[Pe068]: integer conversion resulted in a change of sign E:\ttt\usbdrv\usbdrv.c 326
Warning[Pe068]: integer conversion resulted in a change of sign E:\ttt\usbdrv\usbdrv.c 337
Warning[Pe068]: integer conversion resulted in a change of sign E:\ttt\usbdrv\usbdrv.c 339
Warning[Pe068]: integer conversion resulted in a change of sign E:\ttt\usbdrv\usbdrv.c 341
usbdrvasm.asm
Error[14]: Missing #endif E:\ttt\usbdrv\usbdrvasm.asm 21

Total number of errors: 1
Total number of warnings: 6

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Tue Jun 10, 2008 8:33 pm

I remember to have seen this type of error, but I can't remember what caused it. Try to remove the code in step (4) instead of commenting it out.

sonicss
Posts: 5
Joined: Tue Jun 10, 2008 5:15 pm

Post by sonicss » Wed Jun 11, 2008 3:30 am

Thank you, but..

I have remove the code which I recommented before. but the result is the same.

Missing #endif

:(

Post Reply