6 years ago.

Cannot load/debug NUCLEO-401RE with uVision

Hello

I have a NUCLEO-401RE and I upgraded the firmware to version V2.J21.M5 as described here:

https://mbed.org/teams/ST/wiki/Nucleo-Firmware

Downloading/saving fcompiled files from the mbed-online-compiler works. But if I export my project to uVision, I cannot download/debug my program. When I try to download the program, I get the error-message:

ST-LINK USB communication error.

Here is a screenshot of the debugger-setup:

/media/uploads/borealis/cortex-m_target_driver_setup_2014-06-27_11-19-42.png

If I am using my NUCLEO-103RB, everything works like a charm.

All jumpers on the NUCLEO-401RE are set as delivered on purchase.

Any help or suggestions are highly appreciated!

Thanks!

Question relating to:

ST
A world leader in providing the semiconductor solutions that make a positive contribution to people’s lives, both today and in the future.

I am right now debugging an application using 401RE, had a problem with flash algo (tab on your picture - Flash download), that it was empty... haven't seen yet USB communication error. Is flashing by .bin working on your board?

posted by Martin Kojtal 27 Jun 2014

There is an flash-algo slected in the "Flash Download" tab (STM32F4xx 256kB Flash).

/media/uploads/borealis/cortex-m_target_driver_setup_2014-06-27_13-51-26.png

Yes, placing the .bin-file into the NUCLEO-drive works fine.

posted by Marco Schuler 27 Jun 2014

2 Answers

6 years ago.

I had the same problem with my ST Nucleo F401RE. I have upgraded the firmware and I could not debug/program with Keil uVision. The solution was to downgrade from V2.J21.M5 to V2.J20.M4. If your Keil root installation folder is C:\Keil_v5, then you will find out the previous version of the firmware for ST-Link in your Keil installation under C:\Keil_v5\ARM\STLink. In my case it was version V2.J20.M4. After downgrading I can debug and program successfully. Also note that you should use SW Port (and not JTAG) in your ST-Link Debugger settings (the embedded ST-LINK/V2-1 supports only SWD for STM32 devices).

I also checked the V2.J20.M4 with IAR Embedded Workbench (7.20.1.7305) and I did not spot any problems so far.

Accepted Answer

You may also want to check http://www.keil.com/forum/58066/.

posted by Marcin Czenko 30 Jun 2014

Thanks for this - I will try when I get into the office this morning. Where is the best place to report this bug? ST, Keil?

posted by Nicholas Outram 01 Jul 2014

I would start with Keil...

posted by Marcin Czenko 01 Jul 2014

Ok, tried this. The F/W is now back to V2.J20.M4 I am using the SW Port in the ST Link settings

I am still getting "Internal command error" followed by "Error: Flash Download Failed - Target DLL has been cancelled"

Any thoughts?

posted by Nicholas Outram 01 Jul 2014

This is strange. Please check the following screenshots (I tried to edit my original answer but this funny website behaves like made by morons):

/media/uploads/EverydayProductive/photo_3.jpg /media/uploads/EverydayProductive/photo_5.jpg /media/uploads/EverydayProductive/photo_6.jpg /media/uploads/EverydayProductive/photo_4.jpg

/media/uploads/EverydayProductive/photo_2.jpg /media/uploads/EverydayProductive/photo_1.jpg

Did you try copying a Keil demo project for this board - there are two projects available for this board? Which version of the board do you have? Mine is MB1136 C-01 (white sticker on reverse side).

posted by Marcin Czenko 01 Jul 2014

Hi Marcin

Thanks for your answer. With Version V2.J20.M4 downloading/debugging works now. Also downloading the *.bin to the mbed-drive works with this version.

Does anybody know how to inform the ST-guys about this issue? Are they active on this board?

posted by Marco Schuler 02 Jul 2014
6 years ago.

Same problem here. Spent all afternoon trying to get uVision 5.11.1 to work with the Nucleo F401

There is a compatibility issue between ST-Link firmware V2J21 and ST-LINKIII-KEIL_SWO.dll version 2.0.6.0 which is part of MDK-ARM 5.11a. Downgrading the firmware to V2J20 is a first workaround but it would be preferable to upgrade the dll instead, as explained at http://www.keil.com/support/docs/3662.htm

posted by Sylvain C 03 Jul 2014