USB-CDC link problem
Posted: Fri Nov 29, 2013 9:05 am
Hello. I am trying to get serial usb working. I start with opening ARMCM4-STM32F407-DISCOVERY demo Keil project (chibios version 2.6.1). It compiles with no problem.
Then in halconf.h
and in mcuconf.h
Now the compiler can't find usb_lld.h, so I add the path to it in C/C++ tab: "..\..\..\os\hal\platforms\STM32\OTGv1"
After this it compiles, but linker throws some errors:
Tried some more ways to overcome it, with no success. Lot of people write that serial usb is working for them right out of box with no trouble. So what could I do wrong and what should I do to fix it?
Then in halconf.h
Code: Select all
#define HAL_USE_SERIAL_USB TRUE
#define HAL_USE_USB TRUEand in mcuconf.h
Code: Select all
#define STM32_USB_USE_OTG1 TRUENow the compiler can't find usb_lld.h, so I add the path to it in C/C++ tab: "..\..\..\os\hal\platforms\STM32\OTGv1"
After this it compiles, but linker throws some errors:
Code: Select all
linking...
.\obj\ch.axf: Error: L6218E: Undefined symbol sduInit (referred from hal.o).
.\obj\ch.axf: Error: L6218E: Undefined symbol usbInit (referred from hal.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 2 error messages.
".\obj\ch.axf" - 2 Error(s), 0 Warning(s).
Target not created
Tried some more ways to overcome it, with no success. Lot of people write that serial usb is working for them right out of box with no trouble. So what could I do wrong and what should I do to fix it?