cancel
Showing results for 
Search instead for 
Did you mean: 

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

MLi.6
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3

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
Up vote any posts that you find helpful, it shows what's working..
MLi.6
Associate II

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

MLi.6
Associate II

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