x893 / CMSIS-DAP

STM32 port for CMSIS-DAP with additional serial (CDC) support
http://akb77.com/g/stm32/cmsis-dap-adapter/
477 stars 249 forks source link

When compiled HID device is not recognised by the system. #12

Closed diymat closed 6 years ago

diymat commented 6 years ago

Hi. Just a quick question-maybe you know. When I flash the stm32F103 with the .hex file provided - everything is ok, when I compile it myself only CDC device is recognised. Do you have any clues?

x893 commented 6 years ago

You change any settings (optimization or other) ? Can you check with debugger ?

diymat commented 6 years ago

No, I have just cloned it and opened in the free version of Keil (I do not use Keil, so I do not have the paid version licence). I can debug of course but to be honest do not know what to look for.

x893 commented 6 years ago

Project from github use F102 processor settings. May be need switch to correct version V1..V3 and F103 processor. Please check project settings for your board.

diymat commented 6 years ago

I have changed the uC of course. But where is the version?

diymat commented 6 years ago

Recompiled - checked all the uC settings and the effect is the same - VCOM is detected, HID is not. When I flash the provided HEX file it detects both :)

x893 commented 6 years ago

What's hex you flash ?

CMSIS-DAP-V1-F103.hex CMSIS-DAP-V2-F103.hex CMSIS-DAP-V3-F103.hex

diymat commented 6 years ago

just flashed all of them. All provide both devices. The compiled version is not and to be stranger it detects as a different COM port which indicates some differences between descriptors sent.

x893 commented 6 years ago

Select configuration in tollbar combo box (near Download toolbar button). Also check pins in DAP_Config.h for your board.

diymat commented 6 years ago

As I wrote I do not know Keil :) and I did not noticed this toolbar. But unfortunately the free version does not allow me to link the MDK

diymat commented 6 years ago

Thank you very much for your support.

x893 commented 6 years ago

Can you check DAP_Config.h for your board ? You can open it in vim/nano/notepad and define configuration. Also you can flash hex files and see correct hex for your board (USB and SWD/SWC/JTAG pins configuration) or add schematic of your board here and i see in depth.

diymat commented 6 years ago

Hi. Thank you very much. Actually I have everything I need. I develop a board with DAP - so I just wanted to go through the existing implementation to do not reinvent the wheel. It is a STM32F3 board with many other interfaces on it. I honestly appreciate your help.

x893 commented 6 years ago

No problem.