"No ST-LINK detected" error message, when trying to connect with ST-LINK Utility - stm32

I have a
NUCLEO-F401RE board
(with STM32F401RE)
and it has been working fine for the most part. Here recently, I followed a tutorial in the book
"Mastering STM32"
where it says to install
OpenOCD.
I had been following along before this as well, and I had been able to connect to my board and flashing it with no problem.
After attempting to get OpenOCD to work though, this is no longer possible. Every time I try to connect to my board, I simply get the following error message:
No ST-LINK detected
I have tried updating the drivers multiple times, rebooting the board, reinstalling the ST-LINK Utility, switching the USB-Cable, resetting the board and reinstalling everything and I have also tried the trick where you hold down the reset button and try to erase the chip.
So far, none of this has worked for me unfortunately.
Here you find a picture of my board.
On my desktop, I am using Windows 10. On my board, and I am using FreeRTOS.
Here you find an image of my Windows Device Manager.
I have also tried to update the firmware on my board using the ST-Link upgrade, but without luck. When attempting this, I either do not have the option to select my device (when using the .jar app) or when using the .exe app, I just get the following error messages:
No ST-Link device detected
Please connect it and then retry
I have not been able to find a solution for this anywhere, so I hope you guys can help! If you need any further relevant information, just let me know. Thank you very much.

As mentioned in other answers, the problem is almost certainly due to a competing driver (something like libusb) taking control of the device.
However, you do not need to "uninstall and reinstall everything" to select the correct driver, assuming that you have already installed it once before. Moreover, the reinstallation procedure most likely won't help, because the uninstallers usually do not uninstall the drivers anyway, and Windows will keep prefering the same wrong driver.
Instead, open Device Manager, find your STM32 STLink device, double-click to open the Properties dialog. Then click "Update Driver", then "Browse my computer for driver software", then "Let me pick from a list of available drivers on my computer", and you should see something like that:
You see that in this example, at least four different drivers available on the system are happy to service the device. The first two are generic libusb drivers, not specific to the dongle (OpenOCD is happy to use either of those, if I remember correctly). The ST-Link utility, however, wants a dedicated driver, developed by STM - those are the two entries below on my picture. If you do not see those, try installing the ST-Link utility again (no need to uninstall anything) or download just the driver from the STM website.
You can now click on the preferred driver in this list and have it replace whatever driver was assigned to the device before.

From my poor experience the "No ST-LINK detected" message in the STM32 Utility shows when you are disconnected or when other program is using a ST-LINK. So, if this start happens after installing OpenOCD try to uninstall this and try again (maybe with option "Connect under reset"?).
For your information. When you plug the cable to the PC and the board is power on then in the settings (STM32 Utility) you can see available ST-Links (even blocked). Here is example when ST-Link is blocked

From what I have learned and understood (but everyone can correct me :)), your board is divided in two parts :
The ST-Link debugger part ;
The rest with the actual microcontroller.
The ST-Link part is used to flash the microcontroller and can be used to flash any other STM32F4 device through SWD. With your picture :
The STM32 ST-Link Utility uses the ST-Link part of your board to flash it. My point is that if you have the "No ST-Link detected", the issue, I am quite sure, doesn't come from the microcontroller part but comes from the ST-Link part. And since you did say that it worked before you install openocd, I would suggest the driver part in W10 that may be the root of your problems.
Try to uninstall everything (and I mean everything) related to the STM32 (openocd, STM32 ST-Link Utility and its driver through Device Manager).
Reinstall only STM32 ST-Link utility (if you did uninstall the drivers correctly, it should ask you the permission to install the drivers during set up) and try to connect your board.
You can also try to remove the SWD jumpers (connector CN2) on your board to detach the ST-Link from the built-in microcontroller part. Since the ST-Link part is independent it will still be detected by the STM32 ST-Link Utility (but you will have to put the jumpers back if you want to actually program your microcontroller).

Just ran into this. The problem boiled down to using nucleo boards and trying to interface with them using older versions of ST-LINK (ST's search for ST-Link's first hit led me to stsw-link0004, which was not installing the right drivers). Why they don't point you to the latest greatest first, who knows.
Whenever I tried to install drivers, I could only select USB Composite device as a compatible driver, despite repeatedly uninstalling/reinstalling stlink0004.
You need to install the newest st-link e.g. stsw-link0009 (or newer).
Uninstall device (device manager had it under USB Composite Device)
Uninstall ST-LINK
Disconnect nucleo.
Reboot.
Install ST-link (stsw-link0009)
The prompt should have you install 3+ drivers. Not just 2.
Plug in. Voila.

Related

How to debugging and flashing Nucleo32 board from TrueStudio?

I'm trying to flash my code to NUCLEO-L432KC(STM32L432KC) by TrueStudio. It was failed.
[
It looks tool cannot detect ST-Link probe. I just connected it by USB cable from PC (Windows10). Code and project file are generated by STM32CubeMX.
What is the missing? What should I do?
I have confirmed following.
From STM32CubeProgrammer GUI, it cannot detect ST-Link connection.
From STM32CubeProgrammer CLI, it can detect S/N of ST-Link. But cannot connect.
From STLinkUpgrade 3.3.0, it can detect device and S/N. Also can update to V2J33M25.
From IAR Embedded Workbench, it can build and flash code and debug. No problem at all.
It looks same result using by STM32F4 Discovery kit for STM32F429 MCU.
Make sure you don't have another program such as ST-LINK utility running while you use the debugger. Some versions of the ST-LINK "hogs" the debug pod access and other programs then would have trouble connecting to it.
Install the drivers https://www.st.com/en/development-tools/stsw-link009.html
Choose the correct micro in the debug configuration window

Eclipse program not working

Hello I'm creating an Android project using Eclipse the emulator is very slow I tried using the emulator through my phone but it still wont work I have a Kyocera Event and android 4.0
software anyone have any suggestions on how to fix this problem so I can run the emulator through my phone?
Try to use HAXM if you have an Intel processor and a different image of the system rather than ARM. I had similar problem with debugging using my tablet, I would highly recommend HAXM.
Did you enable USB Debugging in your phone settings? And check SDK Manager - Extra - Google USB Driver
I have been using real devices to test my apps, and if you dont know, your device might not be recognized by your IDE even though it is picked up by your computer. The solution, first, click http://developer.android.com/tools/extras/oem-usb.html
scroll down to the bottom, locate the manufaturer of your phone and download the appropriate driver for your device, install it, then, you need to open the "SDK Manager" to download the system images for the platforms you want to test against, you might need to download the "Google USB Driver" in the "Extras" section in "SDK Manager". Or if you want an emulator that is as fast as a real device, consider "Geny Motion", pretty easy to install. You can search for "Geny Motion" through google, shoule be able to see it the first result. Hope this helps.

Eclipse isn't Seeing Nexus 7

I bought a new Nexus 7, and Eclipse cannot see it. It is appearing in Device Manager as Android Device ---> Android Composite ADB Interface. There is no other devices category, and I have updated the list.
My SDK Manager has everything except for the obsolete installed and updated. I have also tried reinstalling Eclipse all together.
I have updated the driver via \adt-bundle-windows-x86_64-20130514\sdk\extras\google\usb_driver and it says the best one is already installed. USB-debugging is enabled on the Nexus 7. I am all out of ideas. Please help!
Uninstall and Reinstall Nexus 7
Update:
Plan B:
OK you say it didnt work.... this is kind of a long shot but saved my bacon a lot when I was working as a technician in my past life and had to find unknown device drivers.
Right click your Nexus in device manager , select properties and go to this page
The example shows my radeon card but if you google this hardware ID( the top one in your pc), and check a couple of random sites , you are likely to find it. This method is used for finding unknown drivers, and you may as well give it a shot as you have exhausted most options.
Plan C:
Trying the same nexus on a different windows7 computer to see if it installs . If it does, then you can try to extract it from that computer ( e.g. using driverguide software) and force windows on your main pc to use that.
Plan D:
run sysprep.exe on your PC by typing it in RUN and double clicking the file and clicking Generealize.This prepares your pc for imaging and removes all drivers. Note that you'll have to activate windows again after this.
Plan E:
And lastly, the call center answer , use system restore, although the damned thing fails 90% of the time and install again after a reboot. or a whole scary reinstall of windows :(
//Ignore below now as it didn't work for you
Download this driver http://www.samsung.com/us/support/owners/product/SCH-I515MSAVZW
You can also check this question for a solution for Nexus and an alternative driver. I had the same problem , although not with a Nexus, but a sony Xperia, and I had to download a generic driver to get it going. The above samsung site has the driver, but the model is called SCH-I515. You should be able to fix it without the generic driver
ADB dosn't recognize my Galaxy Nexus - Win7

getting GDB working with eclipse and the RX62N board from renesas

I have set up the board according to the RX cpu example in eclipse, and everything seemed to be working fine till I wanted to get the example running on the board. When I click the option to hardware debug, I get an error saying "Error launching GDB server. Check installation".
Am I to re install eclipse, or the GCC toolchain for the RX cpu, or anything else?
I don't know anything about your specifics (that is Renesas or the RX62N). I do use eclipse for embedded work. Typically on a new platform I would make sure I can build and download a release version first. Once you have that working then see if you can get a Debug build and the debugger running. On the platforms I am used to, you have to put in hooks (typically just a single call) to enable the debugger. For exmple on the NetBurner the debugger can run over the serial port or Ethernet so the call has to specify which version you want to use. I know other platforms use JTAG debuggers etc, Typically a dev kit for the board comes with a manual that details how to get the debugger working. I doubt that you need to reinstall anything you just need to get the configuration set up correctly.

Eclipse Doesn't Recognize my Android Device

I have the samsung galaxy tab, when I plug it into to eclipse to run and debug my apps. Eclipse doesn't recognize the device. When I try it with my friend's Droid 2 it still doesn't work. Can someone please help me?
If you are developing with Windows, you might need to install the USB driver for our device. For Windows 7, here's how you do it:
To install the Android USB driver on Windows 7 for your device:
Connect your Android-powered device to your computer's USB port.
Right-click on Computer from your desktop or Windows Explorer, and select Manage.
Select Devices in the left pane.
Locate and expand Other device in the right pane.
Right-click the device name (such as Nexus S) and select Update Driver Software. This will launch the Hardware Update Wizard.
Select Browse my computer for driver software and click Next.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in \extras\google\usb_driver.)
Click Next to install the driver.
Check this link for more information if you need it.
Have you tried:
Settings -> Applications -> Development - Enable USB Debugging
In android 4.2.* The “Developer Options” menu item is gone!
Answer: The “Developer Options” menu item on 4.2.* is hidden.
Goto Settings -> About Phone.
Goto “Build Number” at the end of the Scroll list.
Tap on “Build Number” repeatedly (7 times). On your third tap you should see message indicating that you only have 4 more taps to go to ‘become a developer’.
Continue: 4 more taps.
Hooray, you are now a ‘Developer’, go back to the Setting page.
You should see Developer Option menu item in your setting list now.
Open Developer Options and check USB debugging > Ok
****it's work for me****
Reference : http://www.wugfresh.com/faq/how-do-i-enable-usb-debugging-on-android-4-2-the-developer-options-menu-item-is-gone/
download the samsung software Kies .it detects samsung deivces
Go to http://developer.android.com/tools/device.html and follow up
this solution worked for me
In addition to Settings -> Applications -> Development - Enable USB Debugging, click on the following option:
Revoke USB debugging authorization
And then plug the device again.
Addition to Tor-Morten's answer: Only checking the Developer setting for USB debugging may not be enough. The USB connection setting (Android 4.4: Settings -> Storage -> Option Menu -> USB computer connection) needs to be checked for either "Media device" or "Camera" before it will be shown in Eclipse's Android Device Chooser window.
Maybe its a matter of how you plugged the device onto your computer. I'm using a mac and pluged the usb into one of the keyboard slots. It doesn't find anything even you've installed Kies with all its new drivers.
After plugging it directly into one of the slots at the computer the device has been recognized imediately.
Even it is a beginner mistake....maybe it helps :)
This is a fairly common problem. You basically don't have the drivers you need for USB debugging.
There are a few different ways I've had to obtain drivers for phones. The first way you should attempt is to go into the Android SDK and AVD manager and download the Google USB driver debug package.
This may or may not give you the driver you need. If it doesn't you will have to do one of two things. One, add the device details to the driver file you just downloaded. Generally these will be posted on forums/boards discussing your phone type. Secondly, you can download a different driver from another source like the phone manufacturer.
Make sure your account has admin privileges. I installed my Motorola drivers without elevating, and although the install ran smoothly it never associated them to the device. Once I ran as admin, worked like a charm.
Ι had the same problem:
While i had activated the debugging options on my phone (Samsung Galaxy S Duos Black), eclipse couldn't find the device because the usb drivers failed to download or something and so in the Device Manager (win7) i saw only Android and CSC something, all yellow and with no installed drivers.
I tried to download the Samsung drivers manually, but this failed to work.
What REALLY worked was downloading+installing Samsung Kies, connecting my device through usb and at first it failed again to put the drivers, then i disconnected the device, pressed some troubleshooting errors button that was on the main screen (NOT the lite version, the normal one), that took some time, re-connected the device and voila, the drivers were installed successfully and both the Device Manager and eclipse recognised the device.
If you are on Linux you can try on terminal the following steps. Don't forget to have your device plugged in. Use sudo if doest work.
adb kill-server
adb start-server
adb devices (see if device is recognized)
I had the same problem with my LG G3 phone.
I tried to re-install the driver as explained here: http://developer.android.com/tools/extras/oem-usb.html
Nothing helped. Fortunately on the very same page I have found the link to LG firmware site: http://www.lg.com/us/support/software-firmware
So I did the following:
Connect the phone to the PC using the USB cable
Uninstalled the Google's USB driver (My Computer->Management->Devices->Portable Devices->MyPhone: uninstall)
Download driver for my LG G3 phone (LG885) from the LG site
Install this driver
Got on the phone screen request to approve the new RCA key and allow debugging.
Try to Run an Android project in Eclipse.
PROBLEM SOLVED.
I Had the same problem.
I saw that the product was correctly defined under Device Manager, but Eclispe did not show the product in the target.
The easy way was to install Samsung Kies and to see that the following command:
...eclipse\adt-bundle-windows-x86_64\sdk\platform-toolsadb\adb device
gives me some output instead of only "List of devices attached".
once it recognizes the product, use "run configuration" choosing target "Active devices" under "Launch on all compatible devices/AVD's" radio button.
still, you don't get the product on the list as expected but it works.
Good Luck!
I had the same problem on windows with my samsung galaxy device .. installing samsung kies solved the problem for me.
I had loads of problem getting this to work when I switched to a new computer.
I downloaded and installed Kies, but Windows 7 still didn't recognize my device.
My problem was the proxy my company use, Kies tries to download USB drivers in the installation, but fails silently and finishes the installation.
You might have this problem if your USB Driver folder in the installation is empty (i.e C:\Program Files (x86)\Samsung\Kies\USB Driver).
Solution for me: install Kies without a proxy.
Unload EasyTether extension.
This worked for me - look at the part about unloading the EasyTether extension. adb not finding my device / phone (MacOS X) I was able to connect my samsung galaxy note 2 to macbook pro snow leopard.
Download new USB driver for samsung/pc connection here:
http://developer.samsung.com/android/tools-sdks/Samsung-Andorid-USB-Driver-for-Windows
After enabling developer mode and USB debugging of course.
The phone should ask to accept the pc location as secure after USB driver upgrade.
Installing KIES did not fix the problem on my Galaxy Note 3.