About html, I am sorry! I think that it is fixed now.

I can post the complete solution, no problem. If I forgot to post something, please tell it to me! I am using the 0.2.0 version because I already was using it before to write some LPC2109 boards.
Now I will try the 0.3.1 version... :-)

I am still having some problems to write the flash with gdb. If I use the telnet connection to write directly in OpenOCD it is working. I agree that the write to MEMMAP register should be placed inside the config file but I got an error when trying it, I will try again later.

All that I need to do to write the memory in LPC2368 is:

1) Programmer configuration file

1.1) J-Link: jlink.cfg

#
# Segger J-Link
#
# http://www.segger.com/jlink.html
#

interface jlink

1.2) J-TEC (it is our own programmer based in FT2232, I will send a patch to add it to OpenOCD later): jtec.cfg

#
# Tecnequip J-TEC
#
# http://www.tecnequip.com.br
#

interface ft2232
ft2232_layout jtec_jtag
ft2232_device_desc "Dual RS232 A"

2) CPU configuration file: lpc2368.cfg

# NXP LPC2103 ARM7TDMI-S with 32kB Flash and 8kB SRAM, clocked with 12MHz crystal

if { [info exists CHIPNAME] } { set _CHIPNAME $CHIPNAME
} else {
  set _CHIPNAME lpc2368
}

if { [info exists ENDIAN] } {
  set _ENDIAN $ENDIAN
} else {
  set _ENDIAN little
}

if { [info exists CPUTAPID ] } {
  set _CPUTAPID $CPUTAPID
} else {
  set _CPUTAPID 0x4f1f0f0f
}

# LPC2000 -> SRST causes TRST
reset_config trst_and_srst srst_pulls_trst

# reset delays
jtag_nsrst_delay 100
jtag_ntrst_delay 100

jtag_reset 1 1
jtag_reset 0 0

jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID

set _TARGETNAME [format "%s.cpu" $_CHIPNAME]

target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4

# 8kB of internal SRAM
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x8000 -work-area-backup 0

# 32kB of internal Flash, core clocked with 12MHz crystal
# flash bank lpc2000 <base> <size> 0 0 <target#> <variant> <clock> [calc_checksum]
flash bank lpc2000 0x0 0x80000 0 0 0 lpc2000_v2 12000 calc_checksum

3) Execute OpenOCD:

sudo openocd -f jtec.cfg -f lpc2368.cfg

4) Connect by telnet and send commands:

$ telnet 127.0.0.1 4444
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Open On-Chip Debugger
> halt
target state: halted
target halted in ARM state due to debug-request, current mode: Abort
cpsr: 0x400000d7 pc: 0x00066a3c
> flash write_image erase /Projetos/linux/Linux/ARM/Programas/GDB/elfs/minilpc.elf
auto erase enabled
Padding image section 0 with 0 bytes
wrote 69996 byte from file /Projetos/linux/Linux/ARM/Programas/GDB/elfs/minilpc.elf in 23.154978s (2.952085 kb/s) > verify_image /Projetos/linux/Linux/ARM/Programas/GDB/elfs/minilpc.elf verified 69996 bytes in 2.292830s
>

When I fix the GDB configuration I will send it to the list.

Best regards,
Marcelo Utikawa da Fonseca

Øyvind Harboe escreveu:
On Wed, Dec 16, 2009 at 5:52 PM, Marcelo Utikawa da Fonseca
<[email protected]> wrote:
Great, now it is working! :-)

I put the following line in my gdb config file:

monitor mwb 0xe01fc040 0x01

Thank you!

That's great, but actually that mwb should probably go into the
reset init sequence inside the config file I think.

Now please post to the complete solution to the list.

You probably want to see that config file go into the the next
release of OpenOCD, right?

Also what version of OpenOCD are you running? It says 0.2.0 and
that's an old version.

Can I ask where you got it and why you
decided to try with an older version?





---------------------------------------------
Tecnequip Tecnologia em Equipamentos
Endere�o/Address: R. Ganges, 557
Cidade/City: S�o Paulo
Estado/State: SP
Pa�s/Country: Brasil
CEP/Postal Code: 03445-030
Fone/Phone: 55-11-20937199
FAX: 55-11-29412289
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to