Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

Now I Can't Connect At All

Sun Jul 21, 2013 6:22 pm

Now I can't connect at all I suppose I will just reflash the sd. Also any tips or links for post above.

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

JTAG help

Sun Jul 21, 2013 9:11 pm

I did everything right but keep getting

Code: Select all

Runtime Error: embedded:startup.tcl:47: Can't find openocd.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 47
and

Code: Select all

Runtime Error: embedded:startup.tcl:47: Can't find openocd.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 47
Error: Debug Adapter has to be specified, see "interface" command
in procedure 'init'

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Mon Jul 22, 2013 1:16 am

Where did you extracted the openocd files?

What command did you use to invoke openocd?

The firmware I posted on page 3 is the modified firmware.

You will need to recompile the kernel if you want to use wifi dongles. The image I've posted contains only basic drivers.
42

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

OpenOCD

Mon Jul 22, 2013 10:51 am

No problem with WiFi I realized I have an old Ethernet adapter that plugs into the wall and can travel around 80 ft to a received. Im not home for about 2:30 more hours because I always go run on almost every weekday morning so I cant check the path although I am 90 percent sure it was right. Another code I was receiving was something about not being able to finds pic MX...110 something butt I have the 128b. I will check the command later today.

hybris
Posts: 52
Joined: Mon Jun 03, 2013 8:50 pm
Location: Tyrol / Austria

Re: LinuxCNC

Mon Jul 22, 2013 11:18 am

Is it necessary to have the gpio cable from the rpi connected while i'm programing the pic with the pic-programer?

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Mon Jul 22, 2013 11:36 am

hybris wrote:Is it necessary to have the gpio cable from the rpi connected while i'm programing the pic with the pic-programer?
You need to disconnect the RPi from the circuit. I think just removing the icsp pins and supply lines will do.
42

hybris
Posts: 52
Joined: Mon Jun 03, 2013 8:50 pm
Location: Tyrol / Austria

Re: LinuxCNC

Mon Jul 22, 2013 11:46 am

kinsa wrote: I think just removing the icsp pins and supply lines will do.
when i'm finished programing?

oh, you mean the icsp pins from the rpi! ok, thanks :)

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: OpenOCD

Mon Jul 22, 2013 12:58 pm

Beutrocks wrote:No problem with WiFi I realized I have an old Ethernet adapter that plugs into the wall and can travel around 80 ft to a received. Im not home for about 2:30 more hours because I always go run on almost every weekday morning so I cant check the path although I am 90 percent sure it was right. Another code I was receiving was something about not being able to finds pic MX...110 something butt I have the 128b. I will check the command later today.
I will be fast asleeo when you come back ;)

Cheers!
42

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

Hey

Mon Jul 22, 2013 2:09 pm

I didn't mean 230 am if that's what you were thinking I meant 2 and half hours :lol: anyways im using the test.hex code at the end of the tut and getting.

Code: Select all

rpi@rpi-linuxcnc:~$ sudo /usr/local/bin/pic32openocd test.hex
[sudo] password for rpi:
Open On-Chip Debugger 0.8.0-dev-00094-gc658229 (2013-07-21-19:21)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
SysfsGPIO nums: tck = 10, tms = 7, tdi = 9, tdi = 11
SysfsGPIO num: trst = 22
Runtime Error: embedded:startup.tcl:47: Can't find board/pic32mx110f128b.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 47

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: Hey

Mon Jul 22, 2013 2:52 pm

Beutrocks wrote:I didn't mean 230 am if that's what you were thinking I meant 2 and half hours :lol: anyways im using the test.hex code at the end of the tut and getting.

Code: Select all

rpi@rpi-linuxcnc:~$ sudo /usr/local/bin/pic32openocd test.hex
[sudo] password for rpi:
Open On-Chip Debugger 0.8.0-dev-00094-gc658229 (2013-07-21-19:21)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
SysfsGPIO nums: tck = 10, tms = 7, tdi = 9, tdi = 11
SysfsGPIO num: trst = 22
Runtime Error: embedded:startup.tcl:47: Can't find board/pic32mx110f128b.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 47
It's close to midnight from where I'm from :D

Edit pic32openocd and fix the typo:

Code: Select all

BRD_CFG=pic32mx150f128b.cfg
Cheers!
42

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

Worked

Mon Jul 22, 2013 4:57 pm

Just came to say thanks now its time to shop for steppers and polulus.

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

What could this be

Mon Jul 22, 2013 5:35 pm

Code: Select all

rpi@rpi-linuxcnc:/usr/local/bin$ sudo /usr/local/bin/pic32openocd picnc_bb.hex
Open On-Chip Debugger 0.8.0-dev-00094-gc658229 (2013-07-21-19:21)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
SysfsGPIO nums: tck = 10, tms = 7, tdi = 9, tdi = 11
SysfsGPIO num: trst = 22
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
Info : SysfsGPIO JTAG bitbang driver
Warn : gpio 22 is already exported
Info : This adapter doesn't support configurable speed
Info : JTAG tap: pic32mx.cpu tap/device found: 0x14d06053 (mfg: 0x029, part: 0x4d06, ver: 0x1)
Info : accepting 'telnet' connection from 4444
Info : JTAG tap: pic32mx.cpu tap/device found: 0x14d06053 (mfg: 0x029, part: 0x4d06, ver: 0x1)
target state: halted
target halted in MIPS32 mode due to debug-request, pc: 0xbfc00000
Info : device id = 0x14d06053 (manuf 0x029 dev 0x4d06, ver 0x01)
Info : flash size = 3kbytes
pic32mx is already unlocked, erasing anyway
pic32mx unlocked.
INFO: a reset or power cycle is required for the new settings to take effect.
Info : JTAG tap: pic32mx.cpu tap/device found: 0x14d06053 (mfg: 0x029, part: 0x4d06, ver: 0x1)
target state: halted
target halted in MIPS32 mode due to debug-request, pc: 0xbfc00000
Info : JTAG tap: pic32mx.cpu tap/device found: 0x14d06053 (mfg: 0x029, part: 0x4d06, ver: 0x1)
target state: halted
target halted in MIPS32 mode due to debug-request, pc: 0xbfc00000
** Programming Started **
auto erase enabled
** Programming Failed **
shutdown command invoked

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: What could this be

Tue Jul 23, 2013 12:04 am

Beutrocks wrote:

Code: Select all

rpi@rpi-linuxcnc:/usr/local/bin$ sudo /usr/local/bin/pic32openocd picnc_bb.hex
Open On-Chip Debugger 0.8.0-dev-00094-gc658229 (2013-07-21-19:21)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
SysfsGPIO nums: tck = 10, tms = 7, tdi = 9, tdi = 11
SysfsGPIO num: trst = 22
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
Info : SysfsGPIO JTAG bitbang driver
Warn : gpio 22 is already exported
Info : This adapter doesn't support configurable speed
Info : JTAG tap: pic32mx.cpu tap/device found: 0x14d06053 (mfg: 0x029, part: 0x4d06, ver: 0x1)
Info : accepting 'telnet' connection from 4444
Info : JTAG tap: pic32mx.cpu tap/device found: 0x14d06053 (mfg: 0x029, part: 0x4d06, ver: 0x1)
target state: halted
target halted in MIPS32 mode due to debug-request, pc: 0xbfc00000
Info : device id = 0x14d06053 (manuf 0x029 dev 0x4d06, ver 0x01)
Info : flash size = 3kbytes
pic32mx is already unlocked, erasing anyway
pic32mx unlocked.
INFO: a reset or power cycle is required for the new settings to take effect.
Info : JTAG tap: pic32mx.cpu tap/device found: 0x14d06053 (mfg: 0x029, part: 0x4d06, ver: 0x1)
target state: halted
target halted in MIPS32 mode due to debug-request, pc: 0xbfc00000
Info : JTAG tap: pic32mx.cpu tap/device found: 0x14d06053 (mfg: 0x029, part: 0x4d06, ver: 0x1)
target state: halted
target halted in MIPS32 mode due to debug-request, pc: 0xbfc00000
** Programming Started **
auto erase enabled
** Programming Failed **
shutdown command invoked
Try resetting the PIC by removing the power.
42

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

No Luck

Tue Jul 23, 2013 1:41 pm

I tried pulling power to the picnc board but had no luck unless you wanted me to unplug a certain power input on the pic32.

EDIT: I suppose if you wanted to have a look at it if you have no more suggestions I can post a 2-3gb copy of the sd for download if you wanted to try and figure it out.
Last edited by Beutrocks on Tue Jul 23, 2013 1:47 pm, edited 1 time in total.

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Tue Jul 23, 2013 1:46 pm

Was the first run successful?
42

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

Hmmm

Tue Jul 23, 2013 7:57 pm

IM not positive but Im pretty sure it wasn't also how would I check.

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: Hmmm

Wed Jul 24, 2013 1:51 am

Beutrocks wrote:IM not positive but Im pretty sure it wasn't also how would I check.
What type of capacitor did you use for C2?

PIC32 is very picky, it needs to be of low ESR type and must be mounted as close to the pins as possible.

The wiring looks OK as openocd can identify the chip. Maybe try wiring the PIC32 just for programming so that it is easy to catch mistakes.

P.S

Can you please post the full command you've used? Also what firmware did you use?
42

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

Well

Wed Jul 24, 2013 7:16 am

I have been directly wiring a desperate set of jumpers and only plugging in 17 to the main power rail and gnd to the gnd power rail(this is all well still leaving the previous normal circuit connections in place just using separate cables for ntrust TDO TDI TCK.) I've been using the commanded in my recent post at the top of the one that's only code in the post. C2 is mounted with the positive side to vcap and negative to gnd. Tomarrow I can post the voltage readings through the board.
Thanks again.

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Wed Jul 24, 2013 7:44 am

What type of capacitor are you using for C2? You're only limited to ceramics or tantalums.
42

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

tantulum

Wed Jul 24, 2013 7:57 pm

10uf tantalum capacitor going from vcap to ground I have 3 other .1 uf ceramic disc capacitors spaced out between the power rails.

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: tantulum

Thu Jul 25, 2013 7:29 am

Beutrocks wrote:10uf tantalum capacitor going from vcap to ground I have 3 other .1 uf ceramic disc capacitors spaced out between the power rails.
I will have a look at it next week as I'm travelling at the moment.

Cheers
42

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: What could this be

Mon Jul 29, 2013 1:33 am

Beutrocks wrote:

Code: Select all

rpi@rpi-linuxcnc:/usr/local/bin$ sudo /usr/local/bin/pic32openocd picnc_bb.hex
Open On-Chip Debugger 0.8.0-dev-00094-gc658229 (2013-07-21-19:21)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
SysfsGPIO nums: tck = 10, tms = 7, tdi = 9, tdi = 11
SysfsGPIO num: trst = 22
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
Info : SysfsGPIO JTAG bitbang driver
Warn : gpio 22 is already exported
Info : This adapter doesn't support configurable speed
Info : JTAG tap: pic32mx.cpu tap/device found: 0x14d06053 (mfg: 0x029, part: 0x4d06, ver: 0x1)
Info : accepting 'telnet' connection from 4444
Info : JTAG tap: pic32mx.cpu tap/device found: 0x14d06053 (mfg: 0x029, part: 0x4d06, ver: 0x1)
target state: halted
target halted in MIPS32 mode due to debug-request, pc: 0xbfc00000
Info : device id = 0x14d06053 (manuf 0x029 dev 0x4d06, ver 0x01)
Info : flash size = 3kbytes
pic32mx is already unlocked, erasing anyway
pic32mx unlocked.
INFO: a reset or power cycle is required for the new settings to take effect.
Info : JTAG tap: pic32mx.cpu tap/device found: 0x14d06053 (mfg: 0x029, part: 0x4d06, ver: 0x1)
target state: halted
target halted in MIPS32 mode due to debug-request, pc: 0xbfc00000
Info : JTAG tap: pic32mx.cpu tap/device found: 0x14d06053 (mfg: 0x029, part: 0x4d06, ver: 0x1)
target state: halted
target halted in MIPS32 mode due to debug-request, pc: 0xbfc00000
** Programming Started **
auto erase enabled
** Programming Failed **
shutdown command invoked
I can duplicate this error whenever the hex file is empty or corrupted.

The md5sum: c704d2bf6e6a1e39ffa90a9a7aa2e62d picnc_bb.hex
42

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

I feel stupid

Tue Jul 30, 2013 10:35 pm

You were right I feel stupid because I didn't even bother to check the md5 hash. A good lesson can be learned from this don't be lazy.

Thanks for noticing that :D

hybris
Posts: 52
Joined: Mon Jun 03, 2013 8:50 pm
Location: Tyrol / Austria

Re: LinuxCNC

Wed Jul 31, 2013 4:44 pm

hey kinsa

first: because of my torque i take nema23 stepper motors, but i'm afraid that the pololu a4988 can't handle the peak current, sou i'm planning to order the a3977 stepper driver. the frequenzy is identical, also the voltage range is correct and the maximum current is 2.5A. sou they are nearly the same than the a4988, they can just handle the higher current. am i right with this?
https://www.distrelec.at/ishop/Datashee ... ng_tds.pdf

second question: for the picnc jr there are 2 different circuits, the breadboard and the schematic. is the firmware you posted compatible with both circuits?

thank you very much for your support!
greets, Tom

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Wed Jul 31, 2013 11:24 pm

hybris wrote:hey kinsa

first: because of my torque i take nema23 stepper motors, but i'm afraid that the pololu a4988 can't handle the peak current, sou i'm planning to order the a3977 stepper driver. the frequenzy is identical, also the voltage range is correct and the maximum current is 2.5A. sou they are nearly the same than the a4988, they can just handle the higher current. am i right with this?
https://www.distrelec.at/ishop/Datashee ... ng_tds.pdf
I have no experience with this chip so I'm not really the right person to ask, but based on the specs alone this will definitely work with PICnc.
hybris wrote:second question: for the picnc jr there are 2 different circuits, the breadboard and the schematic. is the firmware you posted compatible with both circuits?

thank you very much for your support!
greets, Tom
The hex file that I've posted is for the breadboard circuit only. The source for code for PICnc Jr is available in the google code page.

Cheers
42

Return to “Automation, sensing and robotics”