Debbuging problems with Yagarto and OpenOCD

Hello,

I am trying to transfer some WinARM examples to Eclipse/Yagarto. The goal is to flash and debug them with this IDE, but I have some problems with it. :frowning:

Flashing is generally possible but debugging doesn’t work very well. Sometimes it is possible to debug and sometimes not. I have also some problems with RAM debugging on the Example LPC2148_Test_RAM_Debug (see zip-file)

I started with the example files from Yagarto and Eclipse_with_GNUARM (Lynch). With these files everything works fine, but with the transferred files it doesn’t work well.

In the zip-file I have saved the three Eclipse projects I want to run and debug. There is also a doc-file with the eclipse debugging settings in it.

Generally eclipse is not very stable when I debug the project LPC2148Test_Flash_Debug with works sometimes.

Does anybody use Yagarto an Openocd for developing? Does it work properly in debug mode?

It would be more comfortable than WinARM and Insight.

By the way I use a LPC2148 (Embedded Artist Quick start Board) and a Olimex JTag(Wiggler). The Yagarto and Openocd package is the actually one from the Yagarto webpage.

All projects works well when I flash them with Eclipse or H-Flash.

Maybe anybody has some time to have a look at the projects. :stuck_out_tongue:

You can download them on

http://www.mikrocontroller.net/topic/65765#new

EclipseProjekte.zip

Thanks a lot,

Best Regards

mgiaco

Does anybody have an idea was wrong with the projects or debug settings?

Thanks

mgiaco

the first ting to do to debugg is to remove all the optimisation

Optimization level, can be [0, 1, 2, 3, s].

0 = turn off optimization. s = optimize for size.

(Note: 3 is not always the best optimization level. See avr-libc FAQ.)

OPT = s

#OPT = 0

the OPT should be set to 0 and not s

For the flashing section i cannot help you since i don’t use lpcs.

regards

Jonathan

Thanks I will test this and make a report.

Ist it better to get a USB-JTag or is the Wiggler okay for debugging

mgiaco

Oh, no it doesn´t work.

Has anybody a Yagarto Project with a simple Timer_IRQ and debugging settings for Yagarto. So that I can test If my laptop is to slow or what else is wrong.

Thanks

ecam(at)aon(dot)at

mgiaco

best is usb, the wiggler is not fast. I have soome problem with the wiggler interface. I use the usb ocd from olimex and it’s work relatively well.

regards

Jonathan

Okay so I will buy one. Ist the Jtag from Amontec okay?

mgiaco

is the same thing as olimex. same style.

regards

Jonathan

Hello Jonathan,

is the same thing as olimex. same style.

Yes, but it is a 3 in 1 device, and Amontec is a 1 in 1.

I do not know if the other 2 from the olimex can make

some problems?

But you are right the JTAG is the same style.

Regards,

Michael

Hello now I made some tests with the Amontek JTag, but nothing is better.

I have no solution whats wrong.

Hi,

I have no solution whats wrong.

Neither do we, because your problem reports have been vague at best.

Flashing is generally possible but debugging doesn’t work very well.

If flashing using the OpenOCD works you have no problems with your JTAG setup.

Sometimes it is possible to debug and sometimes not. I have also some

problems with RAM debugging on the Example LPC2148_Test_RAM_Debug > (see zip-file)

What’s happening when it doesn’t work?

I started with the example files from Yagarto and Eclipse_with_GNUARM

(Lynch). With these files everything works fine, but with the transferred

files it doesn’t work well.

Does that mean you’re able to debug the original examples? What do you mean with “the transferred files it doesn’t work well”?

Generally, debugging with Eclipse works, but it also hides problems from you. I don’t use Eclipse for debugging, so I won’t be able to comment on the correct eclipse setup.

Regards,

Dominic

Hi mgiaco,

at the YAGARTO page, you will find a LPC2148 example too:

http://www.yagarto.de/howto/yagarto1/index.html#htu

Can you debug with Insight and your JTAG hardwar using this example?

I have create this very small and easy example to test the

installation and your hardware/software. Please try it :!:

Regards,

Michael

Yes with this example everything works fine, but when i try an bigger code example with IRQs then it doesen works fine. See the linke, sorry for that but where can I upload files here?

I made one more teste and then I will show you the errors.

mgiaco

Info: openocd.c:84 main(): Open On-Chip Debugger (2007-01-31 12:00 CET)

Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets test logic, too

Warning: arm7_9_common.c:842 arm7_9_halt(): target was already halted

Info: server.c:67 add_connection(): accepted ‘gdb’ connection from 0

Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets test logic, too

Warning: arm7_9_common.c:1963 arm7_9_write_memory(): memory write caused data abort (address: 0xe01fc040, size: 0x4, count: 0x1)

Info: server.c:367 server_loop(): dropped ‘gdb’ connection

This Message is very often.

Dominic:
Hi,

Generally, debugging with Eclipse works, but it also hides problems from you. I don’t use Eclipse for debugging, so I won’t be able to comment on the correct eclipse setup.

Dominic

What do you use dominic for debugging ?

Jonathan

(gdb) target state: halted

target halted in ARM state due to debug request, current mode: User

cpsr: 0x80000010 pc: 0x00000430

requesting target halt and executing a soft reset

software breakpoints enabled

0xe01fc040: 00000002

{section=“.text”,section-size=“520”,total-size=“3598”}

On the Console ist this message, and then Eclipse is Launching(20%) and nothing happens. I must restart eclipse.

@dominic Yes with the examples i can debugging my code.

i installed the yagarto & openocd and i can debug with the Olimex ARM-USB-JTAG and the sam7-ex board