Log

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Log

1,305 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Thu Jan 07 06:12:25 MST 2010
Is there anyway to log peripherals information in lpcxpresso?

Thanks,
Renan
0 Kudos
Reply
12 Replies

1,297 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Fri Jan 08 12:06:34 MST 2010

Quote: renan
But is it possible to do that if lpcxpresso examine the registers more often?

If so, where can I request a feature, lcpxpresso and redsuite?

Renan



One technique for logging data is to write a timer interrupt that polls the values and records them into a circular array. It is also possible to read the data in software and then send it to the PC through the debugger using semihosting printf. On Red Suite (the full product- not LPCXpresso) SWD trace (Cortex M3 feature) can be used on the LPC1300/LPC1700 to automatically monitor specific memory locations, but I think it only monitors program read/write operations and not peripheral register changes. Some IDEs can poll and update all displayed data while the code is running, but I have not seen one that polls and writes to a file yet. I could see where that could be useful.
0 Kudos
Reply

1,297 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Jan 08 06:37:55 MST 2010
The only way you can do that is to single step and snapshot after each one. But, then do you want to single step by (C) statement, or by instruction?

However, I can't see any benefit.Why would you want to do this?
0 Kudos
Reply

1,297 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Fri Jan 08 04:55:29 MST 2010
But is it possible to do that if lpcxpresso examine the registers more often?

If so, where can I request a feature, lcpxpresso and redsuite?

Renan
0 Kudos
Reply

1,297 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Jan 08 04:37:04 MST 2010
That is not possible. All that can be captured are the current values of the registers at the time they are examined.
0 Kudos
Reply

1,297 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Fri Jan 08 04:26:39 MST 2010
Let me give you another example:

Suppose those 5 lines, and breakpoint in line 1 and 5:

1. LcdInit(); 
2. KeybInit();
3. int status = -1;
4. status = readKey();
5. LcdCommand(1);
This is what happen with the registers in each line:

Line     Register
1           LPC_GPIO0->FIOSET2 = 0xFF;
2           LPC_GPIO0->FIOCLR2 = 0xFF;
4           LPC_GPIO0->FIOSET2 = 0xFF;
Instead of checking the registers on line 1, 2 and 4, when the breakpoint stops the execution on line 5, I would check a file or a window that contain these kind of information:

GPIO0
------------------------------------------------
FIOSET                     |            FIOCLR           .......
-------------------------------------------------
     ADDRESS  |       VALUE |         ADDRESS  | VALUE | 
   BIT_31     |      0      |      .
   BIT_30     |      0      |         .
   BIT_29     |      0      |            .
   BIT_28     |      0      |
   BIT_27     |      0      |
   BIT_26     |      0      |
   BIT_25     |      0      |
   BIT_24     |      0      |
   BIT_23     |      1      |
   BIT_22     |      1      |
   BIT_21     |      1      |
   BIT_20     |      1      |
   BIT_19     |      1      |
   BIT_18     |      1      |
   BIT_17     |      1      |
   BIT_16     |      1      |
   BIT_15     |      0      |
   BIT_14     |      0      |
   BIT_13     |      0      |
   BIT_12     |      0      |
   BIT_11     |      0      |
   BIT_10     |      0      |
   BIT_9       |      0      |
   BIT_8       |      0      |
   BIT_7       |      0      |
   BIT_6       |      0      |
   BIT_5       |      0      |
   BIT_4       |      0      |
   BIT_3       |      0      |
   BIT_2       |      0      |
   BIT_1       |      0      |
   BIT_0       |      0      |
0 Kudos
Reply

1,297 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Jan 08 04:06:56 MST 2010
I still don't understand.

What *exactly* are you looking for?
0 Kudos
Reply

1,297 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Fri Jan 08 03:26:50 MST 2010
Exactly

For example, the first breakpoint is on LcdInit(), and the second is status = readKey():

LcdInit();
KeybInit();
int status = -1;
status = readKey();


Many registers changed between the first and the second breakpoint, and I can't run line by line to check what registers changed, so I need a log to see what happened during the transition.

When I sad I can't run line by line, this was an example, I mean that in this specific situation it I really can run line by line, but I'm sure there are going to happen situation when I really cannot. That's the reason I'm asking for such a thing.

The log might be a just a file or another window where this information can be checked later.

Renan
0 Kudos
Reply

1,297 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Jan 08 01:56:01 MST 2010
When you hit the breakpoint, LPCXpresso will highlight the registers whose value have changed since the last break.
0 Kudos
Reply

1,297 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Thu Jan 07 11:53:08 MST 2010
Well, it worked as you say, but it is almost what I need.

In this situation I will save only the information that is displayed at that exact moment.
So if I press the Resume button, I wont have access to that view, so I can't save anything. For example, in this code:
int main (void)
{
     LCDinit();
    Keybinit();
    int status = -1;
    status = readKey ();
...


I have set a breakpoint at this line status = readKey ().
When I start debuging the debug pointer points to  LCDinit(), then I press Resume.
I need to know what happened between the first line and my breakpoint.

There is a way to do this?

Thanks,
Renan
0 Kudos
Reply

1,297 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Jan 07 10:07:03 MST 2010
If you right-click on the view, you will see a "Save" menu option. This will save the table and its contents to a .csv file.
0 Kudos
Reply

1,297 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Thu Jan 07 09:21:46 MST 2010
When you start debuging I can click in a tab called Peripherals and select, for example GPIO0, then it fills another tab called Memory where I have information on the registers FIODIR, FIOMASK, FIOPIN, FIOSET and FIOCLR.

I would like to log all of this data in a file. Is this possible with lpcxpresso?
0 Kudos
Reply

1,297 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Jan 07 06:25:11 MST 2010
What do you mean? What is it you want to log?
0 Kudos
Reply