Flashing custom board via Nucleo gives "Unknown MCU Target"

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

L. MacKenzie
Posts: 5
Joined: Wed Dec 06, 2017 8:02 pm

Flashing custom board via Nucleo gives "Unknown MCU Target"

Postby L. MacKenzie » Wed Dec 06, 2017 9:55 pm

I am using TrueStudio Lite to flash a custom board via a Nucleo. I have removed the ST-LINK jumpers from the Nucleo programmer and connected my custom board to the SWD header. In TrueStudio set the debug probe to ST-LINK with the GDB Connection Settings to "Autostart local GDB server" and the Interface to JTAG. I am using the STM32F767IIT6 chip, so I configured the target to be the STM32F767II. When I click "Debug", it builds my source code just fine, but then gives me this error:

Code: Select all

Target unknown MCU target

Error in initializing ST-Link device.
Reason: Unknown MCU found on target.


What does this error mean? And how can I fix it? I have looked for this error, but not found anything helpful. I have also looked through the tutorials on using TrueStudio, but have not been able to find anything to explain what I am doing wrong or how I need to set my project up.

Also, this is a project that I have inherited and I know that the board can and has been programmed this way before, so I know that the board wiring is correct and I am pretty certain that my wiring between the Nucleo and the board is also correct, so I am pretty certain that this is an issue with my project configuration in TrueStudio.

Also, I am new to TrueStudio, so please explain. Thanks!

hal_atollic
Posts: 21
Joined: Wed Sep 07, 2016 6:00 pm

Re: Flashing custom board via Nucleo gives "Unknown MCU Target"

Postby hal_atollic » Fri Dec 08, 2017 11:30 pm

Set the Interface to SWD.

Cheers, Hal

L. MacKenzie
Posts: 5
Joined: Wed Dec 06, 2017 8:02 pm

Re: Flashing custom board via Nucleo gives "Unknown MCU Target"

Postby L. MacKenzie » Fri Dec 08, 2017 11:45 pm

Thanks for the post. I set the Interface to SWD and now when I click Debug, I get the error:

Code: Select all

Target no device found

Error in initializing ST-Link device.
Reason: No device found on target.

Do you know what the problem is, or have any advice how I can fix this?

Thanks!
Logan

hal_atollic
Posts: 21
Joined: Wed Sep 07, 2016 6:00 pm

Re: Flashing custom board via Nucleo gives "Unknown MCU Target"

Postby hal_atollic » Sat Dec 09, 2017 4:28 pm

The problem seems to be with the custom board, or your wiring to it, of which we have no visibility.

Things to look at:
Is the board powered up?
Is the SWD cabling correct to the board?
Is the board and Nucleo on a common ground?
Is the board reset pin pulled high?

Cheers, Hal

L. MacKenzie
Posts: 5
Joined: Wed Dec 06, 2017 8:02 pm

Re: Flashing custom board via Nucleo gives "Unknown MCU Target"

Postby L. MacKenzie » Tue Dec 12, 2017 7:22 pm

Thanks for the response. I made sure that the board was powered up and doubled checked the cabling to the board and everything seems to be good. The board and the Nucleo should be on a common ground since I connected the GND on the Nucleo's CN6 header to the GND header on the custom board. I measured the voltage on the reset pin and it is pulled up to 3.3V.

I also tested that I could flash the Nucleo just by dropping a binary file into the Nucleo directory on my computer and that works just fine, the issue seems like it is something with my wiring or configuration, but I think I have double checked everything.

When I use the STM32 ST-Link Utility to try to connect to my custom board I cannot select a serial number in the target settings. It just says, "Old ST-LINK firmware/ST-LINK already used". What does that mean?

Thanks!
Logan

hal_atollic
Posts: 21
Joined: Wed Sep 07, 2016 6:00 pm

Re: Flashing custom board via Nucleo gives "Unknown MCU Target"

Postby hal_atollic » Tue Dec 12, 2017 7:30 pm

Try updating your ST-Link driver.
Cheers, Hal

L. MacKenzie
Posts: 5
Joined: Wed Dec 06, 2017 8:02 pm

Re: Flashing custom board via Nucleo gives "Unknown MCU Target"

Postby L. MacKenzie » Tue Dec 12, 2017 7:44 pm

I re-downloaded and re-installed the ST-Link driver from http://www.st.com/en/development-tools/ ... are-scroll and was able to upgrade the firmware from ST-Link to V2.J28.M18, but I still get the same error in TrueStudio when I try to debug, and I cannot connect with the ST-Link Utility either. I am going to try and go back over everything I have done with setting up the project and wiring and double check everything again.

Thanks for the help!
Logan

hal_atollic
Posts: 21
Joined: Wed Sep 07, 2016 6:00 pm

Re: Flashing custom board via Nucleo gives "Unknown MCU Target"

Postby hal_atollic » Wed Dec 13, 2017 4:00 pm

If you still can't find the problem, a possibility is a misconception as to what is correct. As a start, post a diagram or detailed description of your MCU pin to ST-LINK pin connections.

Cheers, Hal

L. MacKenzie
Posts: 5
Joined: Wed Dec 06, 2017 8:02 pm

Re: Flashing custom board via Nucleo gives "Unknown MCU Target"

Postby L. MacKenzie » Wed Dec 13, 2017 8:37 pm

I found the problem. My wiring was correct, but at some point I must have incorrectly connected the headers because I damaged my PCB's programming interface. The existing firmware on the board still functions correctly, but I am no longer able to program the board. I tested with another board and I can program it just fine.

Adrian_A
Posts: 4
Joined: Sun Feb 25, 2018 6:42 pm

Re: Flashing custom board via Nucleo gives "Unknown MCU Target"

Postby Adrian_A » Tue Apr 30, 2019 7:32 pm

I'm having the same problem now, but strangely:

1. I can program the chip just fine via SWD using the new STM32CubeProgrammer.
2. I have another STM32H7 chip on the same board, with the identical implementation of the debugger hardware interface. I can program it and debug it via SWD and TrueStudio just fine.

Update: In my debugger configuration, JTAG was selected rather than SWD. Not sure that happened, but hopefully this will help someone.


Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 1 guest