industrialNETworXnetx

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft für Systemautomation mbH

| 29.01.2010 | 10:24 | 0 comments

Amontec Settings for netX500

The following config file works for a standard "Amontec JTagkey Tiny" with a netX500 board. It was tested on Linux with OpenOcd Snapshot 2007-07-31. Details like flash and optimized speed are still missing.

netx500.cfg file:

telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Amontec JTAGkey A"
ft2232_layout "jtagkey"
ft2232_vid_pid 0x0403 0xcff8
jtag_speed 1

#reset_config trst_and_srst|trst_only|srst_only srst_pulls_trst|trst_pulls_srst|combined
reset_config trst_and_srst

#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> <endianess> <reset mode>
target arm926ejs little run_and_init 0
working_area 0 0x1000 0x4000 backup
run_and_halt_time 0 500

#flash configuration
#flash bank <driver> <base> <size> <chip_width> <bus_width> [driver_options ...]
flash bank cfi 0xC0000000 0x01000000 2 2 0

#This file contains the board specific settings like the SDRam Parameters.
target_script 0 reset nxeb500hmi.init

 

nxeb500hmi.init file:

#
# halt target
#

poll

arm7_9 dcc_downloads enable

sleep 10

#
# setup sdram
#
mww 0x00100140 0
mww 0x00100144 0x03C13251
mww 0x00100140 0x030D0111

sleep 1

#setup flash controller
mww 0x00100100 0x0103030f

#
# detect flash
#
flash probe 0

 

Try the Telnet interface to use OpenOcd without a GDB frontend:

telnet 127.0.0.1 4444
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Open On-Chip Debugger
>

Please note: the numer "4444" is the "telnet_port" setting from the config above. If you change the number in your config file, change it in the telnet command too.

Make sure that the target is halted:

> halt
requesting target halt...
target already halted

 

Display some memory area:

> mdw 0
0x00000000: ea080001

 

Download and start an elf image:

> load_image Debug/testcode.elf elf
5876 byte written at address 0x00008800
downloaded 5876 byte in 0s 213039us
> reg cpsr 0xd3
cpsr (/32): 0x000000d3
> resume 0x8800
Target 0 resumed
>