volunteer:
Hi,
Enter CMOS setup and change the parallel port mode.
You should enter setup mode by pressing the delete key when Windows is booting up, and then select Integrated Peripherals, and then chose IO Device Configuration [Press Enter], and press enter key. Now you will find the Parallel Port Mode item and you can change its value. Do remember to save it before you quit.
By the way, my OS is windowXP.
Please also refer to Jim’s tutorial on eclipse “arm cross compiler with eclipse (version 3)” on page 124.
Regards,
Kevin
Thanks a lot.
I changed my parallel port mode to ECP (because i could’nt select EPP).
Then i found out that my parallelport baseaddress is at 0x3BC instead of 0x378.
I changed the config file to
parport_port 0x3BC
and now the output of openocd is:
'C:\Programme\ARM_TOOLCHAIN\openocd-2006re115\bin\'at91sam7s256-wiggler-flash-program.cfg
Info: openocd.c:82 main(): Open On-Chip Debugger (2006-10-12 18:00 CEST)
Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets test logic, too
Info: target.c:219 target_init_handler(): executing reset script 'c:\scriptTemp\temp.ocd'
Info: configuration.c:50 configuration_output_handler(): requesting target halt...
Warning: arm7_9_common.c:842 arm7_9_halt(): target was already halted
Info: configuration.c:50 configuration_output_handler(): target already halted
Info: configuration.c:50 configuration_output_handler(): force hardware breakpoints enabled
Info: configuration.c:50 configuration_output_handler(): dcc downloads are enabled
Info: configuration.c:50 configuration_output_handler(): target state: halted
Info: configuration.c:50 configuration_output_handler(): target halted in Thumb state due to debug request, current mode: System
Info: configuration.c:50 configuration_output_handler(): cpsr: 0x200000df pc: 0x0000007e
Info: configuration.c:50 configuration_output_handler(): flash 'at91sam7' found at 0x00100000
Error: at91sam7.c:257 at91sam7_wait_status_busy(): status register: 0x70405
Error: at91sam7.c:259 at91sam7_wait_status_busy(): Lock Error Bit Detected, Operation Abort
Info: configuration.c:50 configuration_output_handler(): flash erase error
Error: at91sam7.c:257 at91sam7_wait_status_busy(): status register: 0x70405
Error: at91sam7.c:259 at91sam7_wait_status_busy(): Lock Error Bit Detected, Operation Abort
Info: configuration.c:50 configuration_output_handler(): failed writing file main.bin to flash bank 0 at offset 0x00000000
Info: configuration.c:50 configuration_output_handler(): flash program error
Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets test logic, too
Flash Programming Finished
If i enable debug mode the output is:
'C:\Programme\ARM_TOOLCHAIN\openocd-2006re115\bin\'at91sam7s256-wiggler-flash-program.cfg
Info: openocd.c:82 main(): Open On-Chip Debugger (2006-10-12 18:00 CEST)
Debug: jtag.c:1210 jtag_init():
Debug: parport.c:373 parport_init(): requesting privileges for parallel port 0x3bc...
Debug: parport.c:383 parport_init(): ...privileges granted
Debug: parport.c:210 parport_reset(): trst: 0, srst: 0
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 1
Debug: jtag.c:1096 jtag_reset_callback():
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 1
Debug: jtag.c:1096 jtag_reset_callback():
Debug: openocd.c:100 main(): jtag init complete
Debug: arm7_9_common.c:656 arm7_9_assert_reset(): target->state: unknown
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 0
Debug: jtag.c:1096 jtag_reset_callback():
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 1
Debug: jtag.c:1096 jtag_reset_callback():
Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets test logic, too
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 0
Debug: jtag.c:1096 jtag_reset_callback():
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 1
Debug: jtag.c:1096 jtag_reset_callback():
Debug: parport.c:210 parport_reset(): trst: 0, srst: 1
Debug: parport.c:210 parport_reset(): trst: 0, srst: 1
Debug: arm7_9_common.c:722 arm7_9_deassert_reset(): target->state: reset
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 2
Debug: jtag.c:1096 jtag_reset_callback():
Debug: parport.c:210 parport_reset(): trst: 0, srst: 0
Debug: openocd.c:104 main(): target init complete
Debug: openocd.c:108 main(): flash init complete
Debug: gdb_server.c:1347 gdb_init(): gdb service for target arm7tdmi at port 3333
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 3
Debug: jtag.c:1096 jtag_reset_callback():
Debug: arm7_9_common.c:838 arm7_9_halt(): target->state: running
Debug: embeddedice.c:253 embeddedice_write_reg(): 9: 0xffffffff
Debug: embeddedice.c:253 embeddedice_write_reg(): 11: 0xffffffff
Debug: embeddedice.c:253 embeddedice_write_reg(): 12: 0x00000100
Debug: embeddedice.c:253 embeddedice_write_reg(): 13: 0x000000f7
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:620 arm7_9_poll(): DBGACK set, dbg_state->value: 0x19
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005
Debug: embeddedice.c:253 embeddedice_write_reg(): 12: 0x00000000
Debug: arm7_9_common.c:936 arm7_9_debug_entry(): target entered debug from Thumb state
Debug: arm7_9_common.c:940 arm7_9_debug_entry(): r0_thumb: 0x00001230, pc_thumb: 0x00000084
Debug: arm7_9_common.c:976 arm7_9_debug_entry(): target entered debug state in System mode
Debug: arm7_9_common.c:980 arm7_9_debug_entry(): thumb state, applying fixups
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r0: 0x00001230
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r1: 0x00001224
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r2: 0x00001228
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r3: 0x00200550
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r4: 0x00200550
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r5: 0x0000007c
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r6: 0x00000000
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r7: 0x000000f9
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r8: 0x00200024
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r9: 0xe8bd500e
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r10: 0xe321f092
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r11: 0xe59fe02c
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r12: 0x000000d5
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r13: 0x00200b48
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r14: 0x000000f9
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r15: 0x0000007e
Debug: arm7_9_common.c:1011 arm7_9_debug_entry(): entered debug state at PC 0x7e
Debug: target.c:442 target_call_event_callbacks(): target event 0
Info: target.c:219 target_init_handler(): executing reset script 'c:\scriptTemp\temp.ocd'
Debug: target.c:1254 handle_halt_command():
Info: configuration.c:50 configuration_output_handler(): requesting target halt...
Debug: arm7_9_common.c:838 arm7_9_halt(): target->state: halted
Warning: arm7_9_common.c:842 arm7_9_halt(): target was already halted
Info: configuration.c:50 configuration_output_handler(): target already halted
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address: 0xfffffd44, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address: 0xfffffd08, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address: 0xfffffc20, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address: 0xfffffc2c, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address: 0xfffffc30, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address: 0xffffff60, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005
Info: configuration.c:50 configuration_output_handler(): force hardware breakpoints enabled
Info: configuration.c:50 configuration_output_handler(): dcc downloads are enabled
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:620 arm7_9_poll(): DBGACK set, dbg_state->value: 0x9
Info: configuration.c:50 configuration_output_handler(): target state: halted
Info: configuration.c:50 configuration_output_handler(): target halted in Thumb state due to debug request, current mode: System
Info: configuration.c:50 configuration_output_handler(): cpsr: 0x200000df pc: 0x0000007e
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffff240, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: at91sam7.c:331 at91sam7_read_part_info(): nvptyp: 0x002, arch: 0x0075, alt_id: 0x77c09f8e, alt_addr: 0x0000
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffffc24, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffffc30, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffffc2c, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffffc2c, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xffffff68, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Info: configuration.c:50 configuration_output_handler(): flash 'at91sam7' found at 0x00100000
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffffc24, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffffc30, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffffc2c, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffffc2c, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: at91sam7.c:235 at91sam7_set_flash_mode(): fmcn: 82
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address: 0xffffff60, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address: 0xffffff64, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005
Debug: at91sam7.c:279 at91sam7_flash_command(): Flash command: 0x5a000008, pagenumber:
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xffffff68, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: at91sam7.c:253 at91sam7_wait_status_busy(): status: 0x70405
Error: at91sam7.c:257 at91sam7_wait_status_busy(): status register: 0x70405
Error: at91sam7.c:259 at91sam7_wait_status_busy(): Lock Error Bit Detected, Operation Abort
Info: configuration.c:50 configuration_output_handler(): flash erase error
Debug: at91sam7.c:658 at91sam7_write(): first_page: 0, last_page: 8, count 1996
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffffc24, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffffc30, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffffc2c, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xfffffc2c, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: at91sam7.c:235 at91sam7_set_flash_mode(): fmcn: 82
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address: 0xffffff60, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address: 0x00100000, size: 0x00000004, count: 0x00000040
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address: 0xffffff64, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005
Debug: at91sam7.c:279 at91sam7_flash_command(): Flash command: 0x5a000001, pagenumber:
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0xffffff68, size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug: at91sam7.c:253 at91sam7_wait_status_busy(): status: 0x70405
Error: at91sam7.c:257 at91sam7_wait_status_busy(): status register: 0x70405
Error: at91sam7.c:259 at91sam7_wait_status_busy(): Lock Error Bit Detected, Operation Abort
Info: configuration.c:50 configuration_output_handler(): failed writing file main.bin to flash bank 0 at offset 0x00000000
Info: configuration.c:50 configuration_output_handler(): flash program error
Debug: target.c:1328 handle_reset_command():
Debug: arm7_9_common.c:656 arm7_9_assert_reset(): target->state: halted
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 0
Debug: jtag.c:1096 jtag_reset_callback():
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 1
Debug: jtag.c:1096 jtag_reset_callback():
Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets test logic, too
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 0
Debug: jtag.c:1096 jtag_reset_callback():
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 1
Debug: jtag.c:1096 jtag_reset_callback():
Debug: parport.c:210 parport_reset(): trst: 0, srst: 1
Debug: parport.c:210 parport_reset(): trst: 0, srst: 1
Debug: arm7_9_common.c:722 arm7_9_deassert_reset(): target->state: reset
Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 2
Debug: jtag.c:1096 jtag_reset_callback():
Debug: parport.c:210 parport_reset(): trst: 0, srst: 0
Flash Programming Finished.
The Errors are about the lock bits. AFAIK these lock bits must be cleared befor the bin data can be flashed. But i dont know if my settings in the Openocd scripts are correct.?! (see thread origin for my config file)
Thank’s a lot
rain