data logger in code warrior

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

data logger in code warrior

1,948 Views
natarajmani
Contributor III

Hi friend,

 

i am using code warrior 10.6..i am going to debug the source code....is there any option to generate data logger  when we use debugger in code warrior at run time( it will record the value of data and it will generate some. txt  or .csv file )..please tell me where it is present in Code warrior,,i studied Help contents which is given with Code warrior compiler..but there is no details about Data logger..please do the needful...

Labels (1)
11 Replies

1,343 Views
trytohelp
NXP Employee
NXP Employee

Hi,

Please let me know the device (processor) and the interface you're using.

By default I don't think there is an option to capture the value in a log file.

However there are other options depending of the device and interface used.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,343 Views
natarajmani
Contributor III

hi`

i am using MPC5674f and mpc5644a Processor with XPC564AKIT324S...i am interfacing some basic peripherals which is led ,ADC.so how can i generate data logger file....and what is the purpose of using software analysis in debugger..please do the needful as soon as possible..

0 Kudos

1,343 Views
trytohelp
NXP Employee
NXP Employee

Hi,

I've found another way to capture the data when the application is running.

The doc was created for breakpoint but it's the same for watchpoint.

    http://mcuoneclipse.com/2012/07/06/breakpoints-with-special-effects/

I've created an example and it's working on my side.

After to have created the watchpoint you can edit the properties and add 2 actions:

    - save the value of data in a file,

    - re-start the application.

Attached you will find a video showing the behavior.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,343 Views
natarajmani
Contributor III

Dear friend,

     As you said in video,,i have done all the steps..but dump file is not generating in workspace ..and i need variable status..which means suppose if i debug default program ..'i' value  will be incremented when i am pressing F5..so 'i' value will be updated in ( x) =Variables  view ..now i want to get the status of 'i' value through some .txt or .csv file.please tell me how to get details about variable status..

0 Kudos

1,343 Views
trytohelp
NXP Employee
NXP Employee

Hi,

The dump file is created in my workspace.

In my example I defined the path E:\\Temp_bis\\Community\\370959\\MCU_10.6.5\\trace.dump -a

-a specfies the file will not be overwritten

In my E:\Temp_bis\Community\370959\MCU_10.6.5\ folder I can see the file trace.dump.

You can change the file name by my_trace.txt for instance.

How my example is working ?

In fact I defined a watchpoint on memory used by the variable my_val.

The watchpoint was defined with write access.

This means each time the value of this variable will change, the application will stop on the watchpoint and so will execute the 2 actions defined:

    - save the value of my_val in the file,

    - re-start the application.

Attached you will find the example I used.

Now there are other options you can use in the Debugger shell.

The list of options are given in the

Please have a look to \MCU\Help\PDF\Targeting_Microcontrollers.pdf manual.

The Chapter 7 CodeWarrior Command Line Debugging pages 549 - 566

Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,343 Views
natarajmani
Contributor III

Hi friends,

Thanks friend..i think problem might be in command in export trace data which you mentioned last mail. what is the commands need to give in export trace data..i tried  like this  ( save -h D:\1.txt -a ) ..still i did not get the file.

0 Kudos

1,343 Views
trytohelp
NXP Employee
NXP Employee

Hi,

If you need details regarding a command I recommend to open Windows + Show View + Debugger Shell.

In the Debugger shell you will get more info for all command.

For instance type:  help save

You will get:

++++++++++++++++++++

%>help save

COMMAND    save - saves memory contents to a file

SHORTCUT  sa

SYNTAX    save -h|-b [<ms>:]<addr>... <file> [-a|-o]

[8bit|16bit|32bit|64bit]

OPTIONS  

        -h|-b  Sets the output file format to hex or binary.  For

hex format,

                the address is also saved so that the contents can

easily

                be restored with the "restore" command.

[<ms>:]<addr>  Address to read from.  For architectures with

multiple memory

                spaces, a memory space id may be specified.  See

config MemIdentifier

                and mem -ms for more details.

        -a|-o  Specifies whether the output file should be

appended to

                or overwritten.

8bit|16bit|32bit|64bit  Controls the memory access size.

EXAMPLES

          save -h p:0..10 p:20..28 filename

            Save two memory block to filename in hexadecimal

format

SEE ALSO  restore

FULL NAME  cmdwin::save

++++++++++++++++++++

On my side I'm using:

save -h 40003ff0..40003ff3 E:\\Temp_bis\\Community\\370959\\MCU_10.6.5\\trace.dump -a

Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,343 Views
natarajmani
Contributor III

Hi friend,

     i tried as you said..i got the details about address of variables and value of variables..i need variable name also..so please tell me..how to get the variable name with values in the file....

0 Kudos

1,343 Views
trytohelp
NXP Employee
NXP Employee

Hi,

Don't think this is possible with save command.

The save command is used to capture the memory information and to put it in a file.

So each time the watchpoint is reached the memory 0x40003ff0 to 0x40003ff3 are captured.

We don't define a variable but a memory range.

.

I've tried other commands as var, display or evaluate.

However the system returns the value or other information only but not the name of variable.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,343 Views
trytohelp
NXP Employee
NXP Employee

Hi,

I've performed some tests on my side and I don't think the Trace is very interesting in this case.

Now I don't have the same processor.

Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,343 Views
trytohelp
NXP Employee
NXP Employee

Hi,

I recommend you to refer to the \MCU\Help\PDF\Profiling and Analysis Users Guide.pdf manual.

The Trace Date is available under MPC56xx devices.

There are some information in the manual explaining how the feature is working.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos