Skip to main content
MLi.6
Associate II
Jun 24, 2019 10:50 PM UTC
Solved

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

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.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Jun 25, 2019 12:14 AM UTC

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.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

3 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Jun 25, 2019 12:14 AM UTC

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.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
MLi.6
MLi.6Author
Associate II
Jun 25, 2019 12:27 AM UTC

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

MLi.6
MLi.6Author
Associate II
Jun 25, 2019 1:03 AM UTC

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