Difference between revisions of "Programming nRF51822 with STlink on Windows"
(→Configuring Open OCD) |
|||
Line 5: | Line 5: | ||
==Configuring Open OCD== | ==Configuring Open OCD== | ||
+ | |||
+ | #Download OpenOCD zip file and extract its contents in any directory. There are two bin folders "bin" and "bin-x64" inside this directory. Depending on the version of the OS utilize the OpenOCD version. | ||
+ | |||
+ | '''Setting OpenOCD path''' | ||
+ | #Right click on '''This PC''' and select '''properties'''. this will open "System" window, in system window click on '''Advanced System <br/>Settings''', it will open system properties. Now click on '''Environment Variables'''. <br/>In this window select '''Path''' under '''System variables''' and click on '''Edit''' button as shown below | ||
+ | |||
+ | [[File:path1.png|850x600px]] | ||
+ | |||
+ | |||
+ | #Give the path of bin file in openocd as C:\openocd\bin-x64, if you are usin 64-bit OS or C:\openocd\bin, if you are using 32-bit OS and click '''OK''' | ||
+ | |||
+ | |||
+ | [[File:path2.png|550x300px]] | ||
==Connecting STlink with nRF51822== | ==Connecting STlink with nRF51822== |
Revision as of 15:03, 30 September 2015
Sandeep (talk) and Vaibhav Katkar (talk) 17:43, 10 September 2015 (IST)
Getting STlink v1 working with openOCD is a pain. The USB driver implementation has flaws. The PC picks different drivers for the same device depending on its mood! Initially I got it working on my computer and to check I asked Vaibhav to try on his computer. He too wanted to use it to debug the LPC1114 MCU that he is working on for a last few weeks. It did not work, even after following the exact same steps. So we debugged and found out what the issue was.
Contents
Configuring Open OCD
- Download OpenOCD zip file and extract its contents in any directory. There are two bin folders "bin" and "bin-x64" inside this directory. Depending on the version of the OS utilize the OpenOCD version.
Setting OpenOCD path
- Right click on This PC and select properties. this will open "System" window, in system window click on Advanced System
Settings, it will open system properties. Now click on Environment Variables.
In this window select Path under System variables and click on Edit button as shown below
- Give the path of bin file in openocd as C:\openocd\bin-x64, if you are usin 64-bit OS or C:\openocd\bin, if you are using 32-bit OS and click OK