Hallo,
ich habe folgendes Problem.
Ich möchte mit OpenOCD einen AT91SAM7S64 programmieren.
Da aber davor SAM-BA auf dem uC drauf war, ist ein Lock-Bit gesetzt.
Deswegen habe ich versucht, dieses Bit zu löschen. Mit diesem .cfg-File
habe ich versucht den Befehl flash protect 0 0 15 off auszuführen. Dabei
kam aber die Meldung, dass er protect nicht kennt. Was mache ich da
falsch.
.cfg-File
1 | #daemon configuration
|
2 | telnet_port 4444
|
3 | gdb_port 3333
|
4 |
|
5 | #interface
|
6 | interface parport
|
7 | parport_port 0x378
|
8 | parport_cable wiggler
|
9 | jtag_speed 0
|
10 |
|
11 |
|
12 | #use combined on interfaces or targets that can't set TRST/SRST separately
|
13 | reset_config srst_only srst_pulls_trst
|
14 |
|
15 | #jtag scan chain
|
16 | #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
|
17 | jtag_device 4 0x1 0xf 0xe
|
18 |
|
19 | #target configuration
|
20 | daemon_startup reset
|
21 |
|
22 | #target <type> <startup mode>
|
23 | #target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
|
24 | target arm7tdmi little run_and_init 0 arm7tdmi
|
25 | run_and_halt_time 0 30
|
26 |
|
27 | # flash-options AT91
|
28 | target_script 0 reset openocd_at91sam7s_flash.script
|
29 | working_area 0 0x00200000 0x4000 nobackup
|
30 | flash bank at91sam7 0 0 0 0 0
|
31 |
|
32 |
|
33 | # Information:
|
34 | # erase command (telnet-interface) for complete flash:
|
35 | # flash erase <num> 0 numlockbits-1 (can be seen from output of flash info 0)
|
36 | # SAM7S64 with 16 lockbits and bank 0: flash erase 0 0 15
|
37 | # set/clear NVM-Bits:
|
38 | # at91sam7 gpnvm <num> <bit> <set|clear>
|
39 | # disable locking from SAM-BA
|
40 | flash protect 0 0 15 off
|
41 | # at91sam7 gpnvm 0 0 1
|
Folgende Fehlermeldung wurde ausgegeben:
1 | Programming with OPENOCD
|
2 | openocd_go_flash.cmd
|
3 | Info: openocd.c:82 main(): Open On-Chip Debugger (2006-10-12 18:00 CEST)
|
4 | Info: configuration.c:50 configuration_output_handler(): Command protect not found
|
5 | Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets test logic, too
|
6 | Info: target.c:219 target_init_handler(): executing reset script 'openocd_at91sam7s_flash.script'
|
7 | Info: configuration.c:50 configuration_output_handler(): requesting target halt...
|
8 | Warning: arm7_9_common.c:842 arm7_9_halt(): target was already halted
|
9 | Info: configuration.c:50 configuration_output_handler(): target already halted
|
10 | Info: configuration.c:50 configuration_output_handler(): waiting for target halted...
|
11 | Info: configuration.c:50 configuration_output_handler(): target halted
|
12 | Info: configuration.c:50 configuration_output_handler(): dcc downloads are enabled
|
13 | Info: configuration.c:50 configuration_output_handler(): flash 'at91sam7' found at 0x00100000
|
14 | Error: at91sam7.c:257 at91sam7_wait_status_busy(): status register: 0x30005
|
15 | Error: at91sam7.c:259 at91sam7_wait_status_busy(): Lock Error Bit Detected, Operation Abort
|
16 | Info: configuration.c:50 configuration_output_handler(): failed writing file main.bin to flash bank 0 at offset 0x00000000
|
17 | Info: configuration.c:50 configuration_output_handler(): flash program error
|
18 | Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets test logic, too
|
Kann mir da jemand helfen?
Servus,
Johannes