Hi all,
Well, I still cannot get my lpc-p2378 to flash!
This is the error I get:
Info: openocd.c:82 main(): Open On-Chip Debugger (2006-10-12 18:00 CEST)
Error: lpc2000.c:381 lpc2000_flash_bank_command(): unknown LPC2000 variant
Error: flash.c:156 handle_flash_bank_command(): ‘lpc2000’ driver rejected flash bank at 0x00000000
Error: armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error: arm7_9_common.c:972 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Error: target.c:1054 handle_target(): couldn’t poll target, exiting
I got the scripts from the LED demo that is on the Olimexs site for the LPC-P2378 page
Here are my scripts
lpc…cfg
#daemon configuration
telnet_port 4444
gdb_port 3333
#commands specific to the Amontec JTAGKey
interface ft2232
ft2232_device_desc “Olimex OpenOCD JTAG A”
ft2232_layout “olimex-jtag”
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 2
#use combined on interfaces or targets that can’t set TRST/SRST separately
#reset_config srst_only srst_pulls_trst
reset_config trst_and_srst separate
#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
#target arm7tdmi
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30
target_script 0 reset openocd.ocd
working_area 0 0x40000000 0x7fff nobackup
#flash configuration
#flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v1 14746 calc_checksum
#flash bank cfi 0x80000000 0x800000 2 2 0
flash bank lpc2000 0x0 0x80000 0 0 0 lpc2000_v2 12000 calc_checksum
and openocd.ocd
halt
wait_halt
#mww 0xE01FC080 0x00000000 # PLLCON = 0
#mww 0xE01FC08C 0x000000AA # PLLFEED = 0xAA
#mww 0xE01FC08C 0x00000055 # PLLFEED = 0x55
#sleep 100
#mww 0xE01FC1A0 0x00000020 # OSCEN
#sleep 100
#mww 0xE01FC10C 0x00000001 # clock-source ext.
#sleep 100
#mww 0xE01FC000 0x00000000 # MAMCR
#mww 0xE01FC004 0x00000007 # MAMTIM
#mww 0xE01FC000 0x00000002 # MAMCR
#mww 0xE01FC040 0x00000001 # MEMMAP
#mdw 0x00000000
#sleep 100
flash probe 0
arm7_9 dcc_downloads enable
erase complete flash:
flash erase 0 0 26
just erase the 6 first sectors of bank 0
#flash erase 0 0 5
sleep 100
flash write 0 main.bin 0x0
sleep 100
reset run
sleep 100
shutdown
I am NOT married to these files! So if anyone has some that can replace these, cool!
Please please please, any suggestions would be greatly appriciated!
All the hardware works as I can flash mt at91-sam7 just fine…
~Kam (^8*