Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - frank26080115

31
Bus Blaster JTAG debugger / Re: Trouble Using OpenOCD for AT91SAM7XC512
[quote author="robots"]config file is a config file ... not script file.

You can issue commands on the commandline like this
openocd -f ./openocd.cfg -c "init" -c "flash write_image ........" -c "shutdown"[/quote]

that didn't work, i ran

Code: [Select]
openocd -f "C:/Users/Frank/Documents/Projects/SuperCalculator/Code/SandBox/openocd.cfg" -c "init" -c "flash write_image erase unlock 'C:/Users/Frank/Documents/Projects/SuperCalculator/Code/SandBox/bin/lcd_test-flash.bin' 0x100000 bin" -c "shutdown"

and got
Code: [Select]
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
2000 kHz
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain
Warn : sam7x512.cpu: nonstandard IR mask
flash write_image erase C:/Users/Frank/Documents/Projects/SuperCalculator/Code/SandBox/bin/lcd_test-flash.bin 0x00100000 bin: command requires more arguments
32
Bus Blaster JTAG debugger / Re: Trouble Using OpenOCD for AT91SAM7XC512
thanks! I telnet-ed in and was able to write my .bin file, although it's a pain to do so through command line, surely there must be a way to make this simpler... I am unable to run the same commands from the .cfg file, putting

Code: [Select]
flash write_image erase "C:/Users/Frank/Documents/Projects/SuperCalculator/Code/SandBox/bin/lcd_test-flash.bin" 0x00100000 bin

into the .cfg file gives error "command requires more arguments", but in telnet, it will actually work.
33
Bus Blaster JTAG debugger / Re: Trouble Using OpenOCD for AT91SAM7XC512
Hi I just got home and got started again, I noticed something

I changed my cfg to
Code: [Select]
interface ft2232
ft2232_device_desc "Dual RS232-HS"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0x6010

jtag_khz 2000

reset_config srst_only srst_pulls_trst

if { [info exists CHIPNAME] } {
  set  _CHIPNAME $CHIPNAME
} else {
  set  _CHIPNAME sam7x512
}

if { [info exists ENDIAN] } {
  set  _ENDIAN $ENDIAN
} else {
  set  _ENDIAN little
}

if { [info exists CPUTAPID ] } {
  set _CPUTAPID $CPUTAPID
} else {
  set _CPUTAPID 0x3f0f0f0f
}

jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x1 -expected-id $_CPUTAPID

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi

$_TARGETNAME configure -event reset-init {
# disable watchdog
mww 0xfffffd44 0x00008000
# enable user reset
mww 0xfffffd08 0xa5000001
# CKGR_MOR : enable the main oscillator
mww 0xfffffc20 0x00000601
sleep 10
# CKGR_PLLR: 96.1097 MHz
mww 0xfffffc2c 0x00481c0e
sleep 10
# PMC_MCKR : MCK = PLL / 2 ~= 48 MHz
mww 0xfffffc30 0x00000007
sleep 10
# MC_FMR: flash mode (FWS=1,FMCN=60)
mww 0xffffff60 0x003c0100
sleep 100
}

$_TARGETNAME configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0

#flash bank <driver> <base_addr> <size> <chip_width> <bus_width> <target_number> [<target_name> <banks> <sectors_per_bank> <pages_per_sector> <page_size> <num_nvmbits> <ext_freq_khz>]
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME at91sam7 0 0 0 0 $_TARGETNAME 0 0 0 0 0 0 0 18432

and got

Code: [Select]
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
2000 kHz
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain
Warn : sam7x512.cpu: nonstandard IR mask
Info : max TCK change to: 30000 kHz
Info : clock speed 2000 kHz
Info : JTAG tap: sam7x512.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
Info : Embedded ICE version 1
Info : sam7x512.cpu: hardware has 2 breakpoint/watchpoint units

after a long time of waiting for something to happen

Code: [Select]
target state: halted
target halted in Thumb state due to breakpoint, current mode: Supervisor
cpsr: 0x600000f3 pc: 0x00003ff1

And then nothing else happens, which I guess is expected since I didn't really tell it to do anything, correct?

Also I noticed that I need to disconnect my JTAG entirely before powering up my MCU or else I will get the error

Code: [Select]
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.

Is there any way to re-use OpenOCD without constantly physically disconnecting-reconnecting my JTAG cable?

Also 30000 KHz does seem to cause problems, 2000 KHz works
34
Bus Blaster JTAG debugger / Re: Trouble Using OpenOCD for AT91SAM7XC512
Thanks for the pointer to that file, it was not included in the package I downloaded, I tried the at91sam7sx.cfg before and got a bunch of errors regarding the IDs not matching (not surprised)

Do I have to recompile anything so that the at91sam7x256.cfg works? is there anywhere in the source code where I can check that the ID I want is defined?
35
Bus Blaster JTAG debugger / Trouble Using OpenOCD for AT91SAM7XC512
I'm stumped on how to use OpenOCD and Bus Blaster to write to my AT91SAM7XC512

The document "using open source tools for at91sam7s cross development" appears to be very outdated as many of the commands have different parameters now. Many of the command names appears to have changed as well. Many guides I found are completely useless, since many of the commands they have used no longer exist, such as "jtag_device".

Running this in a cfg
Code: [Select]
interface ft2232
ft2232_device_desc "Dual RS232-HS"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0x6010

jtag_khz 30000

results in
Code: [Select]
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
30000 kHz
Info : max TCK change to: 30000 kHz
Info : clock speed 30000 kHz
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -expected-id 0x7f1f1f1f ..."
Warn : AUTO auto0.tap - use "... -irlen 2"
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Info : JTAG tap: auto0.tap tap/device found: 0x7f1f1f1f (mfg: 0x78f, part: 0xf1f1, ver: 0x7)
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
Warn : gdb services need one or more targets defined

and if I tie JTAGSEL to enable boundary scan

Code: [Select]
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
30000 kHz
Info : max TCK change to: 30000 kHz
Info : clock speed 30000 kHz
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -expected-id 0x0b63207f ..."
Warn : AUTO auto0.tap - use "... -irlen 2"
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Info : JTAG tap: auto0.tap tap/device found: 0x0b63207f (mfg: 0x03f, part: 0xb632, ver: 0x0)
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
Warn : gdb services need one or more targets defined

Note, my target is powered and appears to be responding, as I am able to see its identifiers
Also notice the line "Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001"

From the OpenOCD manual says "The bit pattern loaded by the TAP into the JTAG shift register on entry to the ir capture state, such as 0x01. JTAG requires the two LSBs of this value to be 01."

So I added the line

Code: [Select]
jtag newtap at91samx512 cpu -irlen 4 -ircapture 0x1 -irmask 0x1 -expected-id 0x7f1f1f1f
or if the jumper is in
Code: [Select]
jtag newtap at91samx512 cpu -irlen 4 -ircapture 0x1 -irmask 0x1 -expected-id 0x0b63207f

and then got

Code: [Select]
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
30000 kHz
Warn : at91samx512.cpu: nonstandard IR mask
Info : max TCK change to: 30000 kHz
Info : clock speed 30000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
Warn : gdb services need one or more targets defined

I double checked the power, and also even tried 2000 kHz instead of 30000 kHz

Also note that I am specifying at91sam7x512 instead of at91sam7xc512 because OpenOCD told me I should (I forgot when I got an warning, but it did tell me to use x instead of xc)

it got the ID just fine at 30000 kHz, I think the speed and connections and power are all fine. I can still use SAM-BA with the TST and ERASE pins.

Can anybody help me simply write a .bin file into my AT91SAM7XC512?
36
Bus Blaster JTAG debugger / Re: Longest JTAG Cable Possible?
[quote author="ian"]Hi Frank,

Great to hear it arrived quickly.

I would add to what sqkybeaver said - it depends on the application.

I've been doing CPLD and FPGA programming with a 30cm long tangle of 1-to-1 jumper wires, but it is quite slow.

For high-speed arm debugging or something like that short as possible is probably best, I'd try 10cm and less if possible.[/quote]

It arrived fast since I paid for UPS shipping instead of regular, it actually got here in 4 days, the shipment confirmation was sent from Seeed on their Monday morning (my Sunday night), and arrived on my Monday afternoon, but the tracking said it was shipped on Friday.

Are you suggesting that the wire length actually affects the speed of the JTAG interface? Did you have to adjust the speed of the JTAG interface due to the long wires?

I made my cable about 6" long and it's then connected to an adapter I made that's designed for my target board. All the ground wires are connected.

I have a question regarding the ground wires on a 20 pin JTAG flat cable: what is the significance of having alternating signal-ground pairs of wires? Is it to provide a return path for all the signals in close proximity in order to reduce EMF?
37
Bus Blaster JTAG debugger / Longest JTAG Cable Possible?
Hey I got my V1, awesome. I got some flat cable and connectors and I'm wondering how long I can make the flat cable before running into problems?

How do I calculate this? In our power system class, we covered inductance and admittance of 3 phase transmission lines, I'm not sure if that kind of stuff will apply here.
38
Project logs / Re: The SliderSynth
label the stick with the musical scale and give us a chart, it'll be interesting to find a relationship between distance vs frequency
41
Bus Blaster JTAG debugger / Re: Bus blaster v2 eta?
It's 3.3V, AT91SAM7XC512. I was actually originally planning on getting the FT2232 breakout board and then building a buffer + header attachment myself using a perfboard and some 7400s, but it was out of stock. I actually thought it would've been smart for you to simply provide everything on the Bus Blaster as an attachment for the breakout board instead.

I also have an Altera USB-Blaster clone, but I'm not sure how straight forward it will be to get it working with OpenOCD to do work with ARM, or how to get it working with CrossWorks which is a backup plan.

I only have PayPal right now, DigiKey or Mouser requires me to call in some favors.

So they had them working and they just stopped working on a different computer?
Hopefully something good happens soon.
42
Bus Blaster JTAG debugger / Re: Bus blaster v2 eta?
My PCB is an ARM7 project and I can't do anything with unless I have a JTAG debugger
Hopefully this gets resolved soon

What happens to the entire batch if the failure was due to a hardware issue or unknown issue instead of a driver or software issue? I'd take one for a heavy discount.
44
Project logs / Musical Alarm Clock





Video and instructions at http://www.instructables.com/id/Music-P ... arm-Clock/
I know most of you will simply glance at the first page and maybe skim through the rest. This Instructable has 18 steps (with demo examples for each building block) and 5 appendices, with about 90 files and pictures, including logic analyzer files/screencaps, expected terminal output, USB device dumps. I sincerely hope you explore all my efforts. I covered everything from SD cards, FAT file system, USB mass storage, IR remote control, LCDs, RTCs, and decoding MP3s. It's built using a Teensy++ and encased into a SparkFun shipping box.
45
Breakout boards / Re: Re: What breakout do you need/want?
cool, I already have my own version done using USnooBie and a bargraph on a breadboard, I should really document it

or... since everybody and their dog has a smartphone except me... a pager motor vibrator for a laptop? need to look up the current I can suck through the expresscard slot later

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01522457832session_write_close ( )...(null):0
20.01562589448ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01562590224Database_MySQL->query( ).../DatabaseHandler.php:119
40.06022728984Database_MySQL->error( ).../Db-mysql.class.php:273