January 3, 2017, 11:07pm
I am trying to setup debugging using this
guide. I downloaded the firmware and tried to build using the commands shown but get the output attached below. What am i doing wrong? I have never used bash before. I use a local tool chain and write using netbeans. I would want to setup debugging so that it works in netbeans. Any help will be highly appreciated.
If you can wait another week or two there will be a much, much longer official particle FAQ on debugging using a local toolchain, OpenOCD, GDB, and Eclipse.
The first version of the guide at least won’t have Netbeans, but it is quite similar to how it works with Eclipse.
January 3, 2017, 11:24pm
I guess i could wait. Will it be windows or another platform?
Windows, Mac and Linux.
Though at the point you are in the bash shell above, you might just be able to do:
and see what happens.
January 3, 2017, 11:34pm
It builds the firmware and gets be back to bash-3.15. I tried to build using the commands shown on the page and got this output. It does not automatically try to flash the device like shown in the output.
The error “dfu-suffix: Command not found” means that either the whole DFU package (including dfu-suffix.exe) was not installed, or it’s not in the PATH.
This FAQ has information on debugging a dfu-util installation:
January 4, 2017, 12:26am
I reinstalled CLI and retried everything. Ran the cmd to check if dfu-util is installed and that checked out too. But i am getting the same error again.
In the path you set, it looks like it should be in C:\Particle\Tools\DFU-Util. You should look in there and see if it’s there. From the bash shell, you could also:
See if that’s found, and then look and that directory and see if dfu-util.exe. If neither of those work, then search your computer for dfu-util.exe and then change the PATH accordingly.
January 4, 2017, 3:45pm
So i could build and flash the device after correcting my path. But when i try the next step it gives me the error attached below.
and here us a snapshot of the folder containing openocd
There shouldn’t be a script tag in particle-ftdi.cfg. Just copy and paste this in place of the current contents of the file:
# Particle Industries, Inc.
# Configuration file for the Particle Programmer Shield
# Author: Mohit Bhoite
ftdi_vid_pid 0x0403 0x6010
ftdi_layout_init 0x0008 0x180b
ftdi_layout_signal nTRST -data 0x0200 -oe 0x0010
ftdi_layout_signal nSRST -data 0x0090 -oe 0x0040
Or download here:
January 4, 2017, 3:56pm
Which got me to this point.
The green light on the shield seems to be blinking really really fast and its missing some output as compared to the example output.
@Ali, now you need to open a telnet session into localhost port 3333 to see the opencd debug console. I use Putty for that.
January 4, 2017, 4:48pm
I did that and got to here.
I am sorry for asking so many questions at every step. Debugging on µCU is very different from C++ debugging using VS.
@Ali, I had problems with port 3333 so I ended up switching to port 4444 (on both the opencd.exe line and Putty). I have never had the output you see so I can’t comment on the errors.
January 4, 2017, 4:54pm
is the output below more what it should look like? I did not select telnet in putty earlier maybe thats why i got the errors.
@Ali, are you opening telnet with Putty and specifying port 3333? I have never had the type of output you see.
January 4, 2017, 5:00pm
i was using 4444 but switched it back to 3333 and then got this
@rickkas7, I’ve not seen this before!
I haven’t taken the Programmer Shield screenshots for Windows yet so I’m not sure what the output is supposed to look like. I just tried it and I’m having a FTDI driver issue, so it might be a little while before I have the answer for sure.
The output in comment
#10 looks about right for me, however. For using OpenOCD with GDB, usually you do use port 3333 and instead of connecting to it using PuTTY, you’d use the command line GDB.
For testing purposes, In another command prompt window, run the command:
And within the (gdb) command line, enter these commands:
target remote localhost:3333
monitor reset halt
January 10, 2017, 4:33pm
monitor reset halt
Sorry for the week long delay. Something else more pressing came up that needed to be looked at first. Now back to this.
I followed what you said and this is what i got