This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ST-Link connection problem

Hi guys,

I have been using the keil mdk-arm v4.6 to develop code for the ST Inemo-M1 discovery board. For my projects I used the ST-LINK debugger.

I then downloaded the newest version of the keil mdk-arm v5. (In the process, I uninstalled the other (v4.6) keil I had as it was functioning sort of erratically).

I re-compiled a project succesfully with the new version but when I try to load the program to flash it says: 'No ST-Link detected'; then 'Error: Flash download failed - Target DLL has been cancelled'. I uninstalled the ST-link utility and the ST-LINK driver and installed them back again but to no avail.

I then tried using the ST-LINK utility directly to load the program and it works without a hitch.

I did do all the proper settings for target including the utility debug and utility settings as well as the flash programming algorithm..

Any ideas as to what I can do or try?

regards

Parents Reply Children
  • Hi guys,

    As I am searching for an answer, I searched through the files generated by the 'Run time environment'. I opened the stm32f10x.h (set as read only) and notice that the definition of the device (#define STM32F10X_HD etc..) are all commented.

    I can understand that this should be defined somewhere else as it would otherwise generate an error but I cannot find where.. Is this by any chance as it should be?

    thanks for your time.

    regards

  • Hi guys,

    I did another much simpler project, just an addition of two integers in main.

    With both the st-link and inemo-m1 board removed, I went into taget options and utility settings. In the debug tab it says under SW device that 'No ST-LINK detected' which is fine.

    Then I plug in the st-link and this changes to 'No Cortex-M SW device found' which is fine since the inemo board is still disconnected. Moreover I think that this shows that uVision acknowledges that an ST-Link debugger was connected.

    Then I plug the inemo board as well and the text changes to 'ARM coreSight SW-DP', therefore the uvision must have got an acknowledgement somehow that the board was also connected.

    Still, when I actually try to load the flash program, uvision still returns an error as above.

  • Hello,

    I have exactly the same symptoms.
    I would add that when selecting JTAG protocol, device is not detected at all.

    Did you find any solution since your last post?

    Thanks,

    Nicolas.

  • On-board applications of the ST-LINK are SWD not JTAG. Only the stand-alone ST-LINK do JTAG, but they are not particularly robust or commercial devices.

    Make sure you have current firmware, and drivers.