Lauterbach target-host data transfer and file system help needed

I am debugging a data communication target board using Trace32-USB. As the target itself has some problem with its network connection, I want to use the host to send out raw IP packets for testing.

Could anyone help:

1) Is there a data channel in Lauterbach ICE that allows explicit exchange of data between the target and the host? 2) If there is one, how do I use it (both within the target code and the host code)

If such real-time data transfer is difficult or impossible, another method I can think of is to log the data, save it on the host as a file, then it can be picked up by a host application. Could anyone help for this approach:

1) Is there any document on the Lauterbach file system on host? I know I can save settings and display windows in Trace32. So there must be a file system for Lauterbach. Just don't know how to use it inside a program. If I use the usual open(), write(), close() function calls, what must I do to make sure that it will be saved on the Trace32 file system?

The Lauterbach documentation is confusing if anything, so I am hoping someone who has gone through this can give me some pointers

Thanks for any help

Reply to
DGG
Loading thread data ...

Lauterbach has a scripting language, PRACTICE, as you probably know. We have used it to automate things like programming FLASH in our target. It can probably be used to automate your data dumps.

On this ICE68332 "Help Contents" gives a list containing "TRACE32 Documents". Under that heading you will find "PRACTICE sripting language" with users and reference mauals.

--
mdc at manbw dk  -  MAN B&W Diesel A/S, Copenhagen
www.manbw.com    -  Electronics & software dept.
 Click to see the full signature
Reply to
Mogens Dybæk Christensen

I can get access to PRACTICE. What I don't know how to do is, In target code, how can I get access to a file on the host, through Trace32.

This is the code running on the target (not on trace32),

VOID Application_Initialize(VOID *unused) { FILE *stream;

// ...... CreateTasks();

//Where will it be printed? on Trace32 display window. //How can I open a window with window name "Debug message", for example? printf( "Tasks created\n\r" );

//Where is this file created? can I move around the file system // on host, ie. Windows? stream =3D fopen("..\\datafiles\\testdata.txt", "wb"); }

Can you see my questions? It would be even better if It is possible to create a pipe between target and a process on the host, so that I can exchange data between target and host. Is there a way to do this?

Regards

Mogens Dyb=E6k Christensen wrote:

hoping

our

Documents".

users and

Reply to
DGG

I dont think it is possible to write files on the host from an application. (Check your documentation, there may be some backdoor in your model.)

You have to think the other way around. Your script should set a breakpoint, then let the CPU run up to that point. After the break the script can take over, print or dump what you want.

An ICE is designed to "look over the shoulders" of the system under test, it is not assumed to invade it. Thus the ICE can see the system, byt ideally, from the software under test, it should not change anything. This means that you test in a real life environment, and you can find real life problems.

That is why an ICE is far more expensive than a debugging cable and a monitor ROM. ;-)

--
mdc at manbw dk  -  MAN B&W Diesel A/S, Copenhagen
www.manbw.com    -  Electronics & software dept.
 Click to see the full signature
Reply to
Mogens Dybæk Christensen

Thinking along the debugging line, would it be better if you could collect more information while the target is running? I know you can use trace tool that comes with Lauterbach (forgot its name, maybe performance analyser or some other analyser), however it is at the address bus/data bus level.

I would like to see the target send high level information back (strings that contain variable values at runtime without breaking the execution), and lauterbach just collects what is sent to it.

Now, I don't know how to do this by inserting calls in target code. Lauterbach should do this. Not difficult

Reply to
DGG

Sorry, I have no time to go further into this discussion.

It you want runtime information to be output by your system, an ICE is simply the wrong tool! :-)

As I wrote yesterday, it is designed for something else.

But if there is a serial port on your system, you can output anything there. Connect it to a serial port on your host and use e.g. Hyperterminal to log it. We do that, also when running on the ICE.

--
mdc at manbw dk  -  MAN B&W Diesel A/S, Copenhagen
www.manbw.com    -  Electronics & software dept.
 Click to see the full signature
Reply to
Mogens Dybæk Christensen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.