Thank you for your answer.
Knowing that i'm new to such developments and at the same time i have to
accomplish openocd flash programming, i had yet corrected my
code i succeded only to program the On-chip flash of the lpc2212. by the
script ".cfg" here attached ( I have only one WARNING to correct it !).
flash write_bank 0 X35AU.bin 0x0 ===============>
Warn : Verification will fail since checksum in image
(0xe1a00000) to be written to flash is different from calculated vector
checksum (0xb8
a06f60).
Warn : To remove this warning modify build tools on developer
PC to inject correct LPC vector checksum.
wrote 1452 bytes from file BootLoader_108.bin to flash bank 0 at offset
0x00000000 in 0.187501s (7.562 kb/s)
My serious problem now and three days ago, is to program the external
flash of the ARM7 LPC2212 based board. This flash is *S29AL016D SPANSION
2Mo Nor flash* (normally, we use a CFI method for that) so, i wrote and
tryed the following code but, there are many error messages displayed for me
and i couldn't understand them in order to correct them.
I wish you help me to resolve this.
For OnCHIP ^programming micro i have the following WARNING :
I resume my error messages as the following :
flash protect 0 0 0 off =========> Error: auto_probe failed -601
flash protect 0 0 1 off =========> Error: auto_probe failed -601
flash protect 0 0 2 off =========> Error: auto_probe failed -601
flash protect 0 0 3 off =========> Error: auto_probe failed -601
flash erase_sector 0 0 1 =========> Error: auto_probe failed -601
flash write_image X35A_20_90.bin 0x8001000 =======> Error: Argument
overflow
image.base_address option value
('0x80010000') is not valid
Command handler execution failed
when i change this by :
flash write_image X35A_20_90.bin 0x0 wrote 0 bytes from file
X35A_20_90.bin in 0.000000s (nan kb/s)
Perhaps, i didn't right configured jtag, ram and flash bank as it must be .
Console Error messages, cfg files are attached with this mail.
Note : I have too some cmm good programming files, i can send them to you
if that make my problem more clear.
Yours truly.
2010/9/17 Andreas Fritiofson <andreas.fritiof...@gmail.com>
> > flash write_binary 0 BootLoader_108.bin 0x0 0: command requires more
> > arguments
>
> There is no command with the name 'flash write_binary'. Perhaps you
> mean 'flash write_bank'? In that case, the extra zero on the end
> shouldn't be there. The error message is nonsense.
>
> "> help flash write_bank
> flash write_bank bank_id filename offset
> Write binary data from file to flash bank, starting at specified
> byte offset from the beginning of the bank."
>
> /Andreas
>
#
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface parport
parport_port 0x378
parport_cable wiggler
# jtag_rclk 1000
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
# reset delays
jtag_nsrst_delay 100
jtag_ntrst_delay 100
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag newtap lpc2212 cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id
0x4F1F0F0F
#jtag device S29AL016 flash -irlen 4 -ircapture 0x0F -irmask 0xf -expected-id
0x22490001
#target configuration
#daemon startup reset
targets
target create lpc2212.cpu arm7tdmi -endian little -chain-position lpc2212.cpu
-variant arm7tdmi-s_r4
#target create lpc2212.cpu0 arm7tdmi -endian little -chain-position
lpc2212.cpu0 -variant arm7tdmi-s_r4
lpc2212.cpu configure -work-area-virt 0 -work-area-phys 0x40000000
-work-area-size 0x1000 -work-area-backup 0
set _CHIPNAME lpc2212
set _TARGETNAME $_CHIPNAME.cpu
set _FLASHNAME $_CHIPNAME.flash
#flash bank $_FLASHNAME lpc2000 0x0 0x20000 0 0 $_TARGETNAME lpc2000_v1 14745
calc_checksum
set _FLASHNAME1 $_CHIPNAME.flash1
set _FLASHNAME2 $_CHIPNAME.flash2
set _FLASHNAME3 $_CHIPNAME.flash3
set _FLASHNAME4 $_CHIPNAME.flash4
flash bank $_FLASHNAME1 cfi 0x80000000 0x4000 0 0 lpc2212.cpu
flash bank $_FLASHNAME2 cfi 0x80004000 0x2000 0 0 lpc2212.cpu
flash bank $_FLASHNAME3 cfi 0x80008000 0x8000 0 0 lpc2212.cpu
flash bank $_FLASHNAME4 cfi 0x80010000 0x10000 0 0 lpc2212.cpu
init
jtag_init
halt
mww 0xFFE00000 0x1000244F
mww 0xFFE00004 0x20001423
mww 0xFFE0000C 0x1000FBEF
mww 0xE002C014 0x0FE109E4
###############################################################################################"
echo " "
echo "Configuring and programming the EXTERNAL S29AL016D"
echo " "
mww 0xE0028008 0x01000000
mww 0xFFE00004 0x20001423
scan_chain
flash banks
flash protect 0 0 0 off
flash protect 0 0 1 off
flash protect 0 0 2 off
flash protect 0 0 3 off
echo "Protection off OK"
flash erase_sector 0 0 1
# flash erase_sector 0 0
flash write_image X35A_20_90.bin 0x0
shutdown
#
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface parport
parport_port 0x378
parport_cable wiggler
# jtag_rclk 1000
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
# reset delays
jtag_nsrst_delay 100
jtag_ntrst_delay 100
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag newtap lpc2212 cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id
0x4F1F0F0F
#target configuration
#daemon startup reset
targets
target create lpc2212.cpu arm7tdmi -endian little -chain-position lpc2212.cpu
-variant arm7tdmi-s_r4
#lpc2212.cpu configure -work-area-phys 0x40000000
#lpc2212.cpu configure -work-area-size 0x1000
# internal SRAM
lpc2212.cpu configure -work-area-virt 0 -work-area-phys 0x40000000
-work-area-size 0x4000 -work-area-backup 0
set _CHIPNAME lpc2212
set _TARGETNAME $_CHIPNAME.cpu
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME lpc2000 0x0 0x20000 0 0 $_TARGETNAME lpc2000_v1 14745
calc_checksum
init
jtag_init
set _File BootLoader_108.bin
halt
echo " halting OK."
mww 0xFFE00000 0x1000244F
mww 0xFFE00004 0x20001423
mww 0xFFE0000C 0x1000FBEF
mww 0xE002C014 0x0FE109E4
flash banks
#flash probe $_FLASHNAME 0
arm7_9 dcc_downloads enable
reset run
#wait_
poll 1
echo " halting ..."
halt
sleep 10
flash probe 0
flash protect 0 0 1 off
flash erase_sector 0 0 4
flash info 0
flash write_bank 0 BootLoader_108.bin 0x0
sleep 10
shutdown
C:\Program Files\OpenOCD\0.4.0\bin>openocd.exe -f openocdEXT.cfg
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
parport port = 0x378
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
Fin newTAP .........................................................
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
lpc2212.cpu configured
init
Info : clock speed 500 kHz
Info : JTAG tap: lpc2212.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787, part:
0xf1f0, ver: 0x4)
Info : Embedded ICE version 4
Info : lpc2212.cpu: hardware has 2 breakpoint/watchpoint units
jtag init
Info : JTAG tap: lpc2212.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787, part:
0xf1f0, ver: 0x4)
jtag init OK
halting OK.
mww 0xFFE00000 0x1000244F was executed OK
mww 0xFFE00004 0x20001423 was executed OK
mww 0xFFE0000C 0x1000FBEF was executed OK
mww 0xE002C014 0x0FE109E4 was executed OK
Configuring and programming the EXTERNAL S29AL016D
mww 0xE0028008 0x01000000 was executed OK :IO0DIR ;AnL Reset PIN P0.24
mww 0xE0028004 0x01000000 was executed OK : IO0SET ;AnL Reset PIN P0.24
TapName Enabled IdCode Expected IrLen IrCap IrMask
-- ------------------- -------- ---------- ---------- ----- ----- ------
0 lpc2212.cpu Y 0x4f1f0f0f 0x4f1f0f0f 4 0x01 0x0f
scan chain
#0: cfi at 0x80000000, size 0x00004000, buswidth 0, chipwidth 0
#1: cfi at 0x80004000, size 0x00002000, buswidth 0, chipwidth 0
#2: cfi at 0x80008000, size 0x00008000, buswidth 0, chipwidth 0
#3: cfi at 0x80010000, size 0x00010000, buswidth 0, chipwidth 0
Error: auto_probe failed -601
Error: auto_probe failed -601
Error: auto_probe failed -601
Error: auto_probe failed -601
Protection off OK
Error: auto_probe failed -601
Fin Flash info 2
Fin Flash info 3
Fin Flash info 4
Error: auto_probe failed -601
wrote 0 bytes from file X35A_20_90.bin in 0.000000s (nan kb/s)
shutdown command invoked
C:\Program Files\OpenOCD\0.4.0\bin>
C:\Program Files\OpenOCD\0.4.0\bin>openocd.exe -f openocdEXT.cfg
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
parport port = 0x378
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
Fin newTAP .........................................................
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
lpc2212.cpu configured
init
Info : clock speed 500 kHz
Info : JTAG tap: lpc2212.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787, part:
0xf1f0, ver: 0x4)
Info : Embedded ICE version 4
Info : lpc2212.cpu: hardware has 2 breakpoint/watchpoint units
jtag init
Info : JTAG tap: lpc2212.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787, part:
0xf1f0, ver: 0x4)
jtag init OK
halting OK.
mww 0xFFE00000 0x1000244F was executed OK
mww 0xFFE00004 0x20001423 was executed OK
mww 0xFFE0000C 0x1000FBEF was executed OK
mww 0xE002C014 0x0FE109E4 was executed OK
Configuring and programming the EXTERNAL S29AL016D
mww 0xE0028008 0x01000000 was executed OK :IO0DIR ;AnL Reset PIN P0.24
mww 0xE0028004 0x01000000 was executed OK : IO0SET ;AnL Reset PIN P0.24
TapName Enabled IdCode Expected IrLen IrCap IrMask
-- ------------------- -------- ---------- ---------- ----- ----- ------
0 lpc2212.cpu Y 0x4f1f0f0f 0x4f1f0f0f 4 0x01 0x0f
scan chain
#0: cfi at 0x80000000, size 0x00004000, buswidth 0, chipwidth 0
#1: cfi at 0x80004000, size 0x00002000, buswidth 0, chipwidth 0
#2: cfi at 0x80008000, size 0x00008000, buswidth 0, chipwidth 0
#3: cfi at 0x80010000, size 0x00010000, buswidth 0, chipwidth 0
Error: auto_probe failed -601
Error: auto_probe failed -601
Error: auto_probe failed -601
Error: auto_probe failed -601
Protection off OK
Error: auto_probe failed -601
Fin Flash info 2
Fin Flash info 3
Fin Flash info 4
Error: Argument overflow
image.base_address option value ('0x80010000') is not valid
Command handler execution failed
C:\Program Files\OpenOCD\0.4.0\bin>
C:\Program Files\OpenOCD\0.4.0\bin>openocd.exe -f openocd.cfg
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
parport port = 0x378
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
init
Info : clock speed 500 kHz
Info : JTAG tap: lpc2212.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787, part:
0xf1f0, ver: 0x4)
Info : Embedded ICE version 4
Info : lpc2212.cpu: hardware has 2 breakpoint/watchpoint units
jtag init
Info : JTAG tap: lpc2212.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787, part:
0xf1f0, ver: 0x4)
jtag init OK
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x40000038
halting OK.
mww 0xFFE00000 0x1000244F was executed OK
mww 0xFFE00004 0x20001423 was executed OK
mww 0xFFE0000C 0x1000FBEF was executed OK
mww 0xE002C014 0x0FE109E4 was executed OK
#0: lpc2000 at 0x00000000, size 0x00020000, buswidth 0, chipwidth 0
dcc downloads are enabled
Info : JTAG tap: lpc2212.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787, part:
0xf1f0, ver: 0x4)
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x40000164
Warn : NOTE! Severe performance degradation without fast memory access enabled.
Type 'help fast'.
halting ...
flash 'lpc2000' found at 0x00000000
cleared protection for sectors 0 through 1 on flash bank 0
erased sectors 0 through 2 on flash bank 0 in 0.078125s
Warn : Verification will fail since checksum in image (0xe1a00000) to be
written to flash is different from calculated vector checksum (0xb8
a06f60).
Warn : To remove this warning modify build tools on developer PC to inject
correct LPC vector checksum.
wrote 1452 bytes from file BootLoader_108.bin to flash bank 0 at offset
0x00000000 in 0.187501s (7.562 kb/s)
shutdown command invoked
C:\Program Files\OpenOCD\0.4.0\bin>
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development