How to install ST-Link driver onto STM32 Discovery Board for Visual GDB Debugging - embedded

I am attempting to program a STM32VLDiscovery Board, using Visual Studio 2019, Visual GDB and STM32CubeMX. When I connect the board to the machine, it appears as 'USB Mass Storage Device'. I am using a Windows 10 VM. The program builds fine, but when I attempt to begin on-board debugging, I get an error message stating:
USB Mass Storage Device" does not appear to have "ST-Link Driver"
driver installed. The debugger may have problems finding your decvice.
Try installing it now?
If I click yes, then a bit of software called UsbDriverTool.exe starts and a progress bar appears with the message
VisualGDB is installing the following USB driver: ST-Link Driver the following device: USB Mass Storage Device
This then fails with the message
Automatic driver installation gailed. Do you want to try installing it manually?
Clicking 'yes' again gets the message
USB driver installation failed with code -532462766
And then finally
open failed (no matching adapter found)
Can anyone tell me please, how I go about getting the ST-Link driver on to the discovery board so that I can start debugging my code?
(One other thing that may be relevant. I tried using the STM32 ST-Link Utility program to program the code on to the board. I find that it will only connect to the board if I am holding reset whilst I press the 'connect' button.

Related

STM32CUBEIDE st link gdb debug error in final launch sequence

So, I am learning stm32 mcus, using a nucleo f4 board.
Everything was working fine and now debug launch fails.
Actually, I was doing one debug, closed it and next debug session won't launch.
It starts debug on Linux or on Windows with OpenOCD, but ST-Link GDB debug fails (gdb does work on linux).
This is the error message:
Already did allow the stlink server in the windows firewall.
Avast antivirus was deleting the STLINK server exe file, added an exception and it works.
Also the problem is the mass storage option (that allows use the explorer to grab directly the hex files) and makes conflicts with the ide. I solved the problem using explorer and ejecting the board, then debugger goes fine.

FATAL error ST-Link No MCU device found

I'am using IAR Workbench and I am having hard time to flash my STM32F407VG I got:
FATAL error ST-Link No MCU device found.
The USB cable connecting the laptop and the MCU is new so I don't think it's the problem.
ST-Link en.stsw-link009 is installed
When I go to project options Debugger > ST-Link > Reset > connect during reset and try to download again I got:
Warning stack pointer is setup to incorrect alignement stack addr = 0x00000016 after the download progress bar stay blocked.
By navigating in the option menu I find it's possible to adjust CPU frequency actually it's 72 MHz, the default one, I changed it to 168 MHz, the CPU frequency but the problem remains.
Could you please suggest me some solutions to debug/resolve the problem.
Edit
I have used STM32 ST-Link Utility and i succeded to connect to the board, But the problem with my IDE is not resolved yet.
I used ST-Link Utility to erase flash memory, once this is done i activated
Debugger > ST-Link > Reset > connect during reset
and all works well, i don't know why but i'am glad to see my board works again
Thank you for your help

"crashes" while exporting from VM

I am using CENTOS6 and REDHAWK2.0 (RH2.0). VM installed based on "VirtualBox 5.0.16 for Windows host" and "VirtualBox 5.0.17 r106140 Guest Additions installer image". The OS for the computer is Windows professional 7. However, whenever I export the machine profile (CENTOS6, RH2.0) from VM, all the projects listed in the REDHAWK "project explorer" window disappear (no projects show up in "project explorer" window if I reopen the REDHAWK IDE). I have tried this in different PCs, and it keeps happening. However, if I don't export the appliance, everything is OK, which means that project list in the "project explorer" window stay no matter how many times I close and open the REDHAWK IDE in the VM.
Another note:
When I close the VM, I get the following message:
Microsoft Visual C++ Runtime Library
Runtime Error!
program: C:Program Files\Oracle\VirtualBox\VBoxSVC.exe
R6025
-pure virtual function call
Then, after I close this dialogue box, I got another message:
VirtualBox Interface has stopped working
Details:
Problem signature:
Problem Event Name: APPCRASH
Application Name: VBoxSVC.exe
Application Version: 5.0.16.5871
Application Timestamp: 56d9b7f1
Fault Module Name: MSVCR100.dll
Fault Module Version: 10.0.40219.1
Fault Module Timestamp: 4d5f034a
Exception Code: 40000015
Exception Offset: 00000000000761c9
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 3b88
Additional Information 2: 3b88e6353d8105cc00c90d3a5da0074b
Additional Information 3: 5abc
Additional Information 4: 5abc42e81271271eab3d346a48f0ce0a
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid= ... cid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
Any clues on how to fix this problem?
I have not seen any bugs that are related between VirtualBox itself on the host and the Redhawk project explorer in the guest, but the following are steps you can take to debug further. Because your order of operations isn't clear:
Do not export a VM while the VM is still running. Shut it down first, then export.
If you were already doing that, or still have issues, ensure there are no compatibility issues between your version of host OS (Windows 7 Professional) and the version of VirtualBox (VirtualBox 5.0.16). A quick search on your error turned up VirtualBox COM service crash at exit. Try re-installing the VirtualBox client and updating your Windows host - if there is something wrong/corrupted with VirtualBox itself then there's no telling what problems you'll have with a guest OS.
If you re-install VirtualBox and then re-import or add your existing VM and you still have issues inside the VM with Redhawk IDE project explorer view, you may have a corrupted IDE. Delete the eclipse folder with the IDE and re-download it.

BeagleBone Black not detected in network interface on Mac

I have a BeagleBone Black development board. When I initially bought it, I set it up on my Mac and was able to ssh into it without any problem. Then, I followed a tutorial once for sharing the internet of my Mac with the BeagleBone using USB and since then I was unable to SSH into my BeagleBone from my Mac. I tried updating the HornDis driver and it didn't solve anything.
What happens is that my Mac (Mavericks) detects the BeagleBone drive, but it doesn't show up in the network interface. Hence, I can't ssh into the BeagleBone at all. I tried installing both the FTDI and HornDis driver over and over and it didn't solve the problem.
I really need it to work on my Mac and I'm kind of lost at this point. Any help would be really appreciated. I can't reinstall the OS in the BeagleBone because I have some very important project work installed and working in that BeagleBone and don't want to reinstall all those packages again.
Thanks.
I have solved this problem by resetting the SMC and the PRAM. Here are the details if someone needs it:
Reset the SMC and PRAM
SMC Reset:
Shut down the MacBook Pro.
Plug in the MagSafe power adapter to a power source, connecting it to the Mac if it's not already connected.
On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
Release all the keys and the power button at the same time.
Press the power button to turn on the computer.
PRAM:
Shut down the MacBook Pro.
Locate the following keys on the keyboard: Command, Option, P, and R.
Turn on the computer.
Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
Hold the keys down until the computer restarts and you hear the startup sound for the second time.
Release the keys.
After following the above two steps I plugged in the BeagleBone and it was detected in the network interface. I was then able to successfully ssh into it.

STLINK cannot detect my STM32VL discovery

I'm working on a debian 6.0 installed on virtualbox 4 hosted by Windows7, and I'm trying to get my STM32VL work using STLINK project that allows programming and debugging STM32 on Linux.
I followed their tutorial and installed all needed dependancies.
But when I run the program ./​​st-util -1, I get the following error:
tbarry#darkstar:~/stlink$ ./st-util -1
2014-03-20T10:18:48 WARN src/stlink-sg.c: Failed to find an stlink v1 by VID:PID
Error: could not open stlink device
Error: could not open stlink device
I underline that I have already installed Virtualbox extensions, and usb 2.0 is well handled.
Does anyone have an idea of ​​what is blocking me?
I'd same problem. It was driver problem. Windows detected my st-link as mass storage device, so st-util didn't see it. I've used zadig utility in order to change the driver.
Not having found a solution to my problem, I tried with VMware player and it worked nice.
Conclusion: Whatever the problem I had, it was coming from VirtualBox.