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?