Hi,
I received yesterday my SAM7-EX256 board with nu JTAG tiny interface but after installing the dummy-cd I don’t get it working…
First I was unable to install the driver for the jtag tiny. After googling I found that I had to change the PID from 0x3 to 0x4. After doing that the driver installed.
But now I’m trying to program the example-binaries from their website (demo code LCD write, Joystick and buttons read). After running the script, the openocd reports that the image is written but nothing happens, even after disconnecting power and jtag and reconnecting only the power. I tried both images both for GE8 and GE12 but without success. I also wrote a small example that should turn on the lcd backlight but that also doesn’t seem to work.
I used the configuration below
telnet_port 4444
gdb_port 3333
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0004
jtag_speed 2
jtag_nsrst_delay 200
jtag_ntrst_delay 200
#reset_config <signals> [combination] [trst_type] [srst_type]
reset_config trst_and_srst separate
#jtag_device <IR length> <IR capture> <IR mask> <IDCODE instruction>
jtag_device 4 0x1 0xf 0xe
#daemon_startup <'attach'|'reset'>
daemon_startup reset
#target <type> <endianess> <reset_mode> <jtag#> [variant]
target arm7tdmi little run_and_init 0 arm7tdmi_r4
#run_and_halt_time <target#> <time_in_ms>
run_and_halt_time 0 30
target_script 0 reset program.script
working_area 0 0x40000000 0x4000 nobackup
flash bank at91sam7 0 0 0 0 0
and the program.script:
#
# The following command wills be executed on
# reset (because of run_and_init in the config-file)
# - halt target
# - init ecr
# - flash content of file main.bin into target-memory
# - shutdown openocd
#
# created by Martin Thomas
# http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects
# based on information from Dominic Rath
#
halt
sleep 10
wait_halt
# Init - taken form the script openocd_at91sam7_ecr.script
mww 0xfffffd44 0x00008000 # disable watchdog
mww 0xfffffd08 0xa5000001 # enable user reset
mww 0xfffffc20 0x00000601 # CKGR_MOR : enable the main oscillator
sleep 10
mww 0xfffffc2c 0x00481c0e # CKGR_PLLR: 96.1097 MHz
sleep 10
mww 0xfffffc30 0x00000007 # PMC_MCKR : MCK = PLL / 2 ~= 48 MHz
sleep 10
mww 0xffffff60 0x003c0100 # MC_FMR: flash mode (FWS=1,FMCN=60)
# arm7_9 force_hw_bkpts enable # program resides in flash
# AT91SAM7 flash command-"batch"
arm7_9 dcc_downloads enable
wait_halt
armv4_5 core_state arm
flash probe 0
flash erase 0 0 0
flash protect 0 0 1 off
flash write 0 sam7_ex256_ge8.bin 0x0
The output of the script looks like:
Info: openocd.c:93 main(): Open On-Chip Debugger (2007-09-05 09:00 CEST)
Error: arm_jtag.c:38 arm_jtag_set_instr_error_handler(): setting the new JTAG instruction failed, debugging is likely to be broken
Info: target.c:232 target_init_handler(): executing reset script 'program.script'
Info: configuration.c:50 configuration_output_handler(): requesting target halt...
Warning: arm7_9_common.c:933 arm7_9_halt(): target was already halted
Info: configuration.c:50 configuration_output_handler(): target already halted
Info: configuration.c:50 configuration_output_handler(): waiting for target halted...
Info: configuration.c:50 configuration_output_handler(): target halted
Info: configuration.c:50 configuration_output_handler(): dcc downloads are enabled
Info: configuration.c:50 configuration_output_handler(): waiting for target halted...
Info: configuration.c:50 configuration_output_handler(): target halted
Info: configuration.c:50 configuration_output_handler(): core state: ARM
Info: configuration.c:50 configuration_output_handler(): flash 'at91sam7' found at 0x00100000
Info: configuration.c:50 configuration_output_handler(): erased sectors 0 through 0 on flash bank 0 in 0s 70101us
Info: configuration.c:50 configuration_output_handler(): cleared protection for sectors 0 through 1 on flash bank 0
Info: configuration.c:50 configuration_output_handler(): wrote 33792 byte from file sam7_ex256_ge8.bin to flash bank 0 at offset 0x00000000 in 4s 366279us (7.557923 kb/s)
Anyone any idea what goes wrong?