Hallo

I had work with openocd on NS9360.
It is an older config type you have to adapt it!
Also a have written a gdb init script. This is set in your register the
correct values.
You can also put it in you config script.

siehe Anhang.

Best regards Rene


Henry Margies schrieb:
> Hi list,
>
> I have some difficulties getting OpenOCD and a ns9360 based board working. 
> The NS9360 has an Arm926EJS CPU.
>
> One problem is, that OpenOCD detects an unknown EmbeddedICE version:
>
> Debug: 74 230 openocd.c:142 handle_init_command(): jtag init complete
> Debug: 75 235 embeddedice.c:206 embeddedice_build_reg_cache(): Embedded ICE 
> version 0
> Error: 76 235 embeddedice.c:270 embeddedice_build_reg_cache(): unknown 
> EmbeddedICE version (comms ctrl: 0x00000000)
> Debug: 77 235 arm7_9_common.c:61 arm7_9_clear_watchpoints(): -
> Debug: 78 235 embeddedice.c:452 embeddedice_write_reg(): 12: 0x00000000
> Debug: 79 235 embeddedice.c:452 embeddedice_write_reg(): 20: 0x00000000
>
> Not sure if that is the reason why "halt" is not working.
>
> Debug: 90 20725 target.c:2024 handle_halt_command(): -
> Debug: 91 20725 arm7_9_common.c:1326 arm7_9_halt(): target->state: running
> Debug: 92 20725 embeddedice.c:452 embeddedice_write_reg(): 0: 0x00000000
> Debug: 93 20727 target.c:2003 target_wait_state(): waiting for target 
> halted...
> Info : 95 21727 target.c:405 target_poll(): Halt timed out, wake up GDB.
> Debug: 96 21727 target.c:861 target_call_event_callbacks(): target event 4 
> (gdb-halt)
> Error: 105 25728 target.c:2014 target_wait_state(): timed out while waiting 
> for target halted
> Debug: 106 25729 command.c:444 run_command(): Command failed with error code 
> -4
>
>
> My configuration is "basically" this (based on the ConnectCore Wi-9C config):
> jtag newtap ns9360 cpu -irlen 4 -ircapture 0x9 -irmask 0x0f -expected-id 
> 0x09105031
> target create ns9360.cpu arm926ejs -endian little -chain-position ns9360.cpu 
> -variant arm926ejs
> reset_config trst_and_srst
>
> OpenOCD starts with this output:
>
> trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
> Info : clock speed 6000 kHz
> Info : JTAG tap: ns9360.cpu tap/device found: 0x09105031 (mfg: 0x018, part: 
> 0x9105, ver: 0x0)
> Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
>
> I tried version 0.1.0 and 0.2.0 and the latest GIT (0.3.0-dev-00345). The 
> error is always the same. (btw: I'm using an Amontec JTAGkey, if that is of 
> any relevance)
>
> I appreciate any help or hints, maybe it is just a tiny configuration problem 
> after all?
>
>
> Thanks,
>
> Henry
>   

echo Setting up the environment for debugging gdb.\n

set complaints 1
set output-radix 16
set input-radix 16
set endian big

dir .
set prompt (ns9360) 


# listening for commands on this PC's tcp port 8888
target remote localhost:8888


# in big-endian
monitor endian big

# Set GDB in big-endian 
set endian big

# Reset the chip to get to a known state.

monitor 
monitor halt

# set ARM big
monitor arm926 cp15 0 0 1 0
monitor arm926 cp15 0 0 1 0 0x500F8
# 
monitor arm926 cp15 0 0 1 0




# Setup GPIO for clock enable
monitor mww 0x90600104 0x33313333


# Enable the memory controller for RAM

monitor mww 0xA0700000  0x00000001
monitor mww 0xA0700024  0x00000006
# Set the refresh counter, 60 is optimal, 30 is safer for now
monitor mww 0xA0700028  0x00000001
monitor mww 0xA0700030  0x00000001
monitor mww 0xA0700034  0x00000004
monitor mww 0xA070003C  0x00000001

# tAPR
monitor mww 0xA0700040  0x00000005

# tDAL

monitor mww 0xA0700044  0x00000001
# tWR

monitor mww 0xA0700048  0x00000006

# tRC 32 clock cycles  

monitor mww 0xA070004C  0x00000006

# tRFC 32 clock cycles

monitor mww 0xA0700054 0x00000001
# tRRD
monitor mww 0xA0700058  0x00000001
# tMRD
monitor mww 0xA0700100  0x00004280
# Dynamic Config 0 (cs4) 
monitor mww 0xA0700120  0x00004280
# Dynamic Config 1 (cs5)
monitor mww 0xA0700140  0x00004280
# Dynamic Config 2 (cs6)
monitor mww 0xA0700160  0x00004280
# Dynamic Config 3 (cs7)

monitor mww 0xA0700104  0x00000203
# CAS latency is 2 at 100 MHz
monitor mww 0xA0700124  0x00000203
# CAS latency is 2 at 100 MHz
monitor mww 0xA0700144  0x00000203
# CAS latency is 2 at 100 MHz
monitor mww 0xA0700164  0x00000203
# CAS latency is 2 at 100 MHz

monitor mww 0xA0700020  0x00000103
monitor mww 0xA0700024  0x00000001
# Set the refresh counter to be as small as possible

# Add some dummy writes to give the SDRAM time to settle, it needs two
# AHB clock cycles, here we poke in the debugger flag, this lets
# the software know that we are in the debugger

monitor mww 0xA0900000  0x00000002
monitor mww 0xA0900000  0x00000002
monitor mww 0xA0900000  0x00000002
monitor mww 0xA0900000  0x00000002
monitor mww 0xA0900000  0x00000002

monitor mdw 0xA0900000 
monitor mdw 0xA0900000 
monitor mdw 0xA0900000 
monitor mdw 0xA0900000 
monitor mdw 0xA0900000 


monitor mww 0xA0700024  0x00000030 
# Set the refresh counter to "64" (was 30) 
monitor mww 0xA0700020  0x00000083 



monitor mdw 0x00022000

monitor mww 0xA0700020  0x00000003 
# issue SDRAM NORMAL command
monitor mww 0xA0700100  0x00084280 
# Enable buffer access
monitor mww 0xA0700120  0x00084280 
# Enable buffer access
monitor mww 0xA0700140  0x00084280 
# Enable buffer access
monitor mww 0xA0700160  0x00084280 
# Enable buffer access



# Setup GDB FOR FASTER DOWNLOADS
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed

# Load the program executable called "image.elf"
# load image.elf
# Load the symbols for the program.
load  ./image.elf 
 #Configfile for Netsilicon NS9360 (ARM926ahs)
 #tested on board: Digi ConnectCore 9C
 #openOCD higher Revision 144 is needed


 #daemon configuration
 telnet_port 4444
 gdb_port 8888

 
 # home-made jtag-interface
 interface ft2232
 ft2232_device_desc "Olimex OpenOCD JTAG A"
 ft2232_layout olimex-jtag
 #ft2232_vid_pid 0x15ba 0x0003
 jtag_speed 0

 #use combined on interfaces or targets that can't set TRST/SRST separately
 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

 jtag_nsrst_delay 100
 jtag_ntrst_delay 100

 #target configuration
 daemon_startup reset

 #target <type> <endianness> <startup mode> <chainpos> <variant>
 target arm926ejs big run_and_init 0 arm926ejs
 run_and_halt_time 0 500
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to