Pls help me to compile avrusb using IAR cc
Posted: 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
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