I’ve never used Xpack and haven’t used windows 10, but you’ll likey need to add the path to the openocd bin directory to your system path. Just do a google search for “windows 10 update system path”.
Hi Stijn,
I installed OpenOCD like described here: https://gnu-mcu-eclipse.github.io/openocd/install/
Use the Windows part not XPack. Installing the drivers for ST-Link is also described there.
If you want to add Environment Variables to Windows 10, make right click to your PC-symbol, choose Properties. Then click on this:
Then choose this:
Add your variables here:
Depending on your location, this is only a example of my installation.
C:\Program Files\Git\cmd
C:\ProgramData\Anaconda3
C:\Program Files (x86)\GNU Tools ARM Embedded\7 2017-q4-major\bin
C:\Tools\tup
C:\Program Files (x86)\GnuWin32\bin
C:\Program Files\GNU MCU Eclipse\OpenOCD\0.10.0-7-20180123-1217\bin
C:\Program Files\Microsoft VS Code\bin
C:\Users\Entwicklung\AppData\Local\Programs\Microsoft VS Code\bin
Greetings / Zennix
Hi
thanks for the reply.
I used the Xpack method and got here
If this is not good just tell me and I will do it the other way.
The problem is that when I run the exe file, it opens cmd and closes imediatly
I think I allready got the st-link drivers figured out.
The environment variabele is also added, what is the ODrive repository?
cheers
Carelsbergh Stijn
The behavior that you describe with the executable closing right away is typical for programs that are meant to be run on the command line. Open up a command prompt and try typing openocd
(assuming that is the name of the executable). If it works then your system path is setup correctly. OpenOCD won’t do much without passing in some arguments though. During the build process it isn’t typically called directly. The make flash
call from the odrive Firmware source directory is what makes the call to openocd. I think there is a way to get your IDE setup to also call openocd but I haven’t gone through the setup of that yet, so I won’t be much help there.
Have you pulled the odrive project down from github yet? I would start with the master branch of oskar’s repo first. Once you have confidence in the build workflow you can clone some of the other repos that are out there that have the functionality that you are looking for.
Hi,
Thanks, so I first have to try the original firmware before the firmware with end stops?
Cheers
Carelsbergh Stijn
That’s just my suggestion. It’s much easier to problem solve when you take very incremental steps. It will be good to make sure your build environment is setup and working as expected before going too much further.
Hi
I’ve sceencaptured my screen on the startup of the exe and this is what I’m getting:
W
har should I do?
Cheers
Carelsbergh Stijn
I’m not convinced that is a problem, it just looks like a config file is missing. Try doing a build in the Firmware directory of the odrive repo. If the build is successful then try make flash
with the programmer hooked up to one of your odrive boards.
Hi
I think I have gotten my software under controll, doe this mean that the flash is succesfull?
Cheers
Carelsbergh Stijn
Yep, that looks good.
Hi
it says libusb failed, what does that mean?
cheers
Carelsbergh stijn
Not sure. It looks like it goes on and completes the flashing process. Are you having problems?
Hi
I can’t get it to show up on the odrivetool
Cheers
Carelsbergh Stijn
What version do you get from running openocd --version
?
Have you read through the following post? It’s long, but a lot of different solutions are presented that may work for you. I’m running macOS, so I haven’t had to deal with the Windows USB drivers mess.
Hi
Thanks for the help.
I will first try my other hard drive with Linux on it, maybe it does work on that.
I will send you an update later today
Cheers
Carelsbergh Stijn
Are you running Ubuntu on your other hard drive? If so, you can get the arm development tools from apt. Otherwise you’ll need to go to the ARM website and manually download the correct version of development tools. Same situation for tup, ubuntu is best supported, but you can always build from source. The build process isn’t too terrible, you just need to make sure to install libfuse-dev which I think is the only external dependency that needs to be installed. Once built I think you have to manually copy the executable to one of the system bin folders so that it can be called from anywhere.
Ok, if needed, I will try it.
Thanks
Cheers
Carelsbergh Stijn
Hi
I powered up my other hard drive and the ODrive showed right up, is there a way to check if the firmware on the odrive is the one I tried to install or iif it is the original pre loaded firmware?
cheers
Carelsbergh Stijn
Check if both systems load the same usb-driver.