Topic : Variable watch

Forum : ARM

Original Post
Post Information Post
September 22, 2008 - 12:38pm
Guest

Hi!!!

I'm using Raisonance IDE for testing an application over a STR912 microcontroller, and it works fine.

My next step is to generate a live watch interface via serial, to be able to read on an external PC some of the ARM application variables.
Up to now, I generate on ARM application one memory table where I store for any tag three parameters needed to it (variable name string, variable address and variable type):

typedef struct
{
unsigned char vName[9];
unsigned char vType;
unsigned long vAddress;
} vVar_typ;

volatile vVar_typ vVar_Table[10];

and I fullfill information for every tag I want:

strcpy(vVar_Table[0].vName, "VAR1");
vVar_Table[0].vType = cINT16;
vVar_Table[0].vAddress = (unsigned long)&VAR1;
...

Then when starting communication protocol via serial between both systems, ARM app sends this table information to external app, and this has all needed for reqesting watch information to ARM (external app sends tag name, and if it's found on the table then tag value is returned).

IT WORKS FINE, but it is not very nice.

My question is:
Onyone knows how store symbolic names on ARM application, and any function to request this information on ARM code, to be able if requesting one tag name by external app then extract tag information (address and type) and then delivery tag value to request app???

Or perhaps I'm completelly out of ARM management possibilities and this must be controlled in one different mode.

Thanks and best regards to everybody!!!

Replies
Post Information Post
+1
0
-1
September 22, 2008 - 5:20pm
Guest

xitu wrote:
Anyone knows how store symbolic names on ARM application

Normally, you wouldn't do that - you would leave it to the debugger on the host system to do that!

Any particular reason why you're trying to do this yourself when you have RIDE to do it for you?!

+1
0
-1
September 25, 2008 - 11:17am
Guest

The reason to do it is:

1- This watch behavoir will be managed by serial by a external system where no Windows XP (and also no RIDE)is installed.
That's clear I can read variable values using RIDE and RLink, but it's not my app.requirement.

2- I must obtain pseuso-realtime readings of these tag's values (host ask by serial to ARM app for a tag value reading and it replies), without stopping ARM app.

I have so clear I can not use RIDE for the application, but anycase I don't know how to read with RIDE for a memory location (obtain variable value) without stopping ARM processor. Is it possible ???

Thanks a lot for your answers and best regards:
Xitu

+1
0
-1
September 26, 2008 - 1:23am
Guest

So, you are trying to make some kind of non-pc-based ARM debugger??

I would still suggest that you keep the symbol information in the debugger, and not try to embed it in the application...

+1
0
-1
September 29, 2008 - 8:26am
Guest

Hi!

Could be as you say.

Really I want to implement something likelly a OPC server on the ARM, to be able to read (and also write, in the future) some specific tags.

If I maintain symbol information in the debugger as you suggest (and also it was my first idea) the problem and my question is I don't know how can I manage this information:
I don't know how to extract from this information my required data (variable list, symbolic names as strings, memory locations, data types,...).

Then do you know where can I obtain any initial idea about how to do this?

Thanks a lot and best regards:
Xitu

+1
0
-1
September 30, 2008 - 2:10am
Guest

xitu wrote:
I want to implement something like an OPC server

A what?