Page 1 of 1

include problem

Posted: Fri Jul 25, 2014 10:47 am
by Pask
i want include usb functionality from "ARMCM4-STM32F407-DISCOVERY-MEMS" project to "chibios\testhal\STM32F4xx\ADC" project but i have

usbcfg.c:229:3: error: 'sduDataTransmitted' undeclared here (not in a function)
usbcfg.c:230:3: error: 'sduDataReceived' undeclared here (not in a function)
usbcfg.c:250:3: error: 'sduInterruptTransmitted' undeclared here (not in a function)
usbcfg.c: In function 'usb_event':
usbcfg.c:264:3: error: unknown type name 'SerialUSBDriver'
usbcfg.c:281:5: warning: implicit declaration of function 'sduConfigureHookI' [-Wimplicit-function-declaration]
usbcfg.c: At top level:
usbcfg.c:301:3: error: 'sduRequestsHook' undeclared here (not in a function)
usbcfg.c:308:1: error: unknown type name 'SerialUSBConfig'
usbcfg.c:309:3: warning: initialization makes integer from pointer without a cast [enabled by default]
usbcfg.c:309:3: warning: (near initialization for 'serusbcfg') [enabled by default]
usbcfg.c:310:3: warning: excess elements in scalar initializer [enabled by default]
usbcfg.c:310:3: warning: (near initialization for 'serusbcfg') [enabled by default]
usbcfg.c:311:3: warning: excess elements in scalar initializer [enabled by default]
usbcfg.c:311:3: warning: (near initialization for 'serusbcfg') [enabled by default]
usbcfg.c:313:1: warning: excess elements in scalar initializer [enabled by default]
usbcfg.c:313:1: warning: (near initialization for 'serusbcfg') [enabled by default]
make: *** [build/obj/usbcfg.o] Error 1
make: *** Waiting for unfinished jobs....

I copied the files usbcfg.cand  .h in my project, I updated the makefile according to "ARMCM4-STM32F407-DISCOVERY-MEMS" project makefile and I enabled usb in halconf.h and mcuconf.h

i am going crazy...

Re: include problem

Posted: Fri Jul 25, 2014 10:55 am
by Giovanni
In order to stop going crazy, enable HAL_USE_SERIAL_USB in halconf.h.

Giovanni

Re: include problem

Posted: Fri Jul 25, 2014 11:02 am
by Pask
thank you very much Giovanni ;-)