Finally I decided to move to ARM architectures, and I have bough a Olimex LPC-2378-STK board and a Olimex ARM-USB-TINY emulator. Recently I received both and here started my problems. I have installed the Eclipse + GNUARM + OpenOCD environment included in the CD provided with Olimex, downloaded a test program from [here, modified the OpenOCD configuration file and I have made a lot of tests, but I can’t get the board to work. Every time I try to program the flash I get this message fro OpenOCD:
Info: openocd.c:93 main(): Open On-Chip Debugger (2007-09-05 09:00 CEST)
Error: lpc2000.c:384 lpc2000_flash_bank_command(): unknown LPC2000 variant
Error: flash.c:180 handle_flash_bank_command(): 'lpc2000' driver rejected flash bank at 0x00000000
Warning: embeddedice.c:175 embeddedice_build_reg_cache(): EmbeddedICE version 7 detected, EmbeddedICE handling might be broken
Warning: arm7_9_common.c:734 arm7_9_assert_reset(): srst resets test logic, too
Info: target.c:232 target_init_handler(): executing reset script 'openocd_flash_lpc2378.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(): Command probe not found
Info: configuration.c:50 configuration_output_handler(): Command erase not found
Info: configuration.c:50 configuration_output_handler(): Command write not found
Warning: arm7_9_common.c:734 arm7_9_assert_reset(): srst resets test logic, too
The “funny” thing is that even when I unplug the ARM-USB-TINY from the USB Bus, I still get the “Unknown LPC Variant” messages:
Info: openocd.c:93 main(): Open On-Chip Debugger (2007-09-05 09:00 CEST)
Error: lpc2000.c:384 lpc2000_flash_bank_command(): unknown LPC2000 variant
Error: flash.c:180 handle_flash_bank_command(): 'lpc2000' driver rejected flash bank at 0x00000000
Error: ft2232.c:1341 ft2232_init_ftd2xx(): unable to open ftdi device: 2
The config files I’m using are these (from Martin Thomas, slightly modified):
openocd_flash_lpc2378_ftdi.cfg
# Martin Thomas 4/2007
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0004
jtag_speed 3
jtag_nsrst_delay 333
jtag_ntrst_delay 333
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
#target configuration
daemon_startup reset
#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_init 0 arm7tdmi-s_r4
run_and_halt_time 0 30
target_script 0 reset openocd_flash_lpc2378.script
working_area 0 0x40002000 0x4000 nobackup
# LPC2378 @ 12MHz / 0x80000 from 512*1024
flash bank lpc2000 0x0 0x80000 0 0 lpc2000_v2 0 12000 calc_checksum
# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
##### TODO #####
# the current configuration at least somehow works with the LPC2378
# on the Olimex-Board. so please ignore the following comments for now
# "Upon power up or any chip reset, the LPC2300 uses the IRC as the clock source.
# Software may later switch to one of the other available clock sources."
# "The nominal IRC frequency is 4 MHz."
# ---> 4000 statt 12000 ?
# oder gar 14768 weil ISP schon irgendwas gemacht hat?
# oder PLL aus und umschalten auf IRC -> schein nicht richtig zu klappen...
# flash bank lpc2000 0x0 0x80000 0 0 lpc2000_v2 0 4000 calc_checksum
openocd_flash_lpc2378.script
#
# The following command wills be executed on
# reset (because of run_and_init in the config-file)
# - wait for target halt
# - erase memory
# - flash content of file main.bin into target-memory
# - shutdown openocd
#
# PRELIMINARY - first test for LPC2378
#
#
# Martin Thomas
# http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects
# based on information from Dominic Rath
#
halt
sleep 20
wait_halt
# ignore my comments - setup works without the following.
# disable PLL and switch to IRC (4 MHz nom.)
# hmm - should not be needed since IRC is default source after Reset...
# any interaction with the ISP startup??
# doesn't work anyway - something missing
# TODO: read manual.
#mww 0xE01FC080 0x00000000 # PLLCON = 0
#mww 0xE01FC08C 0x000000AA # PLLFEED = 0xAA
#mww 0xE01FC08C 0x00000055 # PLLFEED = 0x55
#mww 0xE01FC040 0x00000001 # MEMMAP = 0x01
#sleep 10
arm7_9 dcc_downloads enable
flash probe 0
# erase complete flash:
#flash erase 0 0 26
# just erase the 3 first sectors of bank 0
flash erase 0 0 5
flash write 0 main.bin 0x0
sleep 30
reset run
sleep 30
shutdown
When I try to flash the program, the ARM-USB-TINY LED blinks a little bit, and the board wakes from reset, but nothing else happens.
I’ve tested a lot of things: changing jtag_speed, changing ft2232_device_desc from “A” to “B”, changing jtag_nsrst_delay and jtag_ntrst_delay, I have reinstalled the dev environment from the ground up following James P. Lynch guide, I have also tested WinARM, and a lot of things I don’t remember now, but always get the same result :(. I’m starting to think maybe something in the board or the emulator is wrong.
Please help! Any suggestion would be really appreciated!](http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/)