Skip to main content
Visitor II
June 24, 2019
Solved

Unable to program the device. Error: Flash Download failed - Target DLL has been cancelled

  • June 24, 2019
  • 3 replies
  • 8806 views

I had my C code running on NUCLEO-F411RE last week. I downloaded it with Keil uVision and STLink driver.  But, I did something when I tried to flash it today with an assembly code instead of the C code.  Now, I cannot flash the device.

* A pop up window with the following message.

"No target connected. "

* I get another error message in the Build Output window.

Error: Flash Download failed - Target DLL has been cancelled

ST Link driver is still working.  When I plug in the board, I get STMicroelectroinics STLink Virtual COM Port (COM15) in Windows' Device Manager.  My Keil IDE can detect the board with the correct serial #.  Last week, I had upgraded the firmware on the board through Keil IDE.  

I tried to uninstall and install ST Link driver again.  It did not fix the problem.  

Could the boot load firmware have been corrupted? 

Thank you for any help you can offer.

Michael

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    Change the connectivity options. ie Connect Under Reset, Reset Hardware

    Try strapping BOOT0 High, resetting and then connecting/erasing. See Flash->Erase or use ST-LINK Utilities, etc.

    Generally low power mode, and reconfiguring the JTAG/SWD pins will result in access getting blocked during initial connectivity.

    3 replies

    Graduate II
    June 25, 2019

    Change the connectivity options. ie Connect Under Reset, Reset Hardware

    Try strapping BOOT0 High, resetting and then connecting/erasing. See Flash->Erase or use ST-LINK Utilities, etc.

    Generally low power mode, and reconfiguring the JTAG/SWD pins will result in access getting blocked during initial connectivity.

    MLi.6Author
    Visitor II
    June 25, 2019

    "Change the connectivity options. ie Connect Under Reset, Reset Hardware." This alone make it work again. Thank you!

    MLi.6Author
    Visitor II
    June 25, 2019

    It is working good. I have a question.

    For assembly code, I get "Internal command error" twice after Verfiy OK. But everything works good. These two errors show up if I select the option for reset and run automatically after verify in the debug setting. It does not happen with my C code. Do you think that it can cause any harm? Should I remove that option and use the reset button manually to run my new firmware after loading is complete? Thank you.

    Load "C:\\Users\\mikel\\Documents\\uVision\\stm32f4_nucleo\\asm\\blinky_greenled_asm\\Objects\\blinky.axf" 

    Erase Done.

    Programming Done.

    Verify OK.

    Internal command error

    Internal command error

    Flash Load finished at 17:52:11