2017-09-15 04:34 AM
If I setup custom string USB string descriptors in the CDC Middleware configuration...
..these strings will be generated to the usbd_desc.c file in the following format:
/** @defgroup USBD_DESC_Private_Defines
* @{
*/
#define USBD_VID 1155
#define USBD_LANGID_STRING 1033
#define USBD_MANUFACTURER_STRING ''Digitroll Ltd.''
#define USBD_PID_FS 22336
#define USBD_PRODUCT_STRING_FS ''XLiNE-USB Converter''
#define USBD_SERIALNUMBER_STRING_FS ''00000000001A''
#define USBD_CONFIGURATION_STRING_FS ''CDC Config''
#define USBD_INTERFACE_STRING_FS ''CDC Interface''�?�?�?�?�?�?�?�?�?�?�?
When compiling this code with gcc I got the following warnings:
pointer targets in passing argument 1 of 'USBD_GetString' differ in signedness [-Wpointer-sign] usbd_desc.c /xlineusb/Src line 76 C/C++ Problem�?
It is because the the USBD_getString expects unsigned pointer:
void USBD_GetString (uint8_t *desc, uint8_t *unicode, uint16_t *len);�?
I would recommend to generate the USB descriptor strings in the following format to prevent these warnings:
/** @defgroup USBD_DESC_Private_Defines
* @{
*/
#define USBD_VID 1155
#define USBD_LANGID_STRING 1033
#define USBD_MANUFACTURER_STRING (uint8_t*)(''Digitroll Ltd.'')
#define USBD_PID_FS 22336
#define USBD_PRODUCT_STRING_FS (uint8_t*)(''XLiNE-USB Converter'')
#define USBD_SERIALNUMBER_STRING_FS (uint8_t*)(''00000000001A'')
#define USBD_CONFIGURATION_STRING_FS (uint8_t*)(''CDC Config'')
#define USBD_INTERFACE_STRING_FS (uint8_t*)(''CDC Interface'')�?�?�?�?�?�?�?�?�?�?�?
Thanks in advance an let me know if you need any further details!
#cubemx-4.222018-06-07 01:59 AM
Hi ST guys/girls,
Any feedback, concerns regarding to this one?
2018-06-07 02:18 AM
Hi
Marton.Miklos
,This is also reported internally for further check.
We really appreciate your contribution to the enhancement of our STM32
resources.
Khouloud.
2018-06-27 08:29 AM
Hi Maton,
I'm not able for the moment to reproduce your issue with TrueStudio and SW4STM32, could you please share your ioc it will be helpful for debug.