Does KDS support debug scripting

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

Does KDS support debug scripting

Jump to solution
903 Views
ohiogt
Contributor III

Is there a console and script that can be used while debugging?  Specifically I'd like to automate the export of variables from the memory view to raw binary files as can be done via the GUI.  Thanks in advance.

Labels (1)
0 Kudos
1 Solution
757 Views
BlackNight
NXP Employee
NXP Employee

Hi Shawn,

KDS is using GDB (client and server) for debugging. There are many ways how you can script GDB.

You can do this outside the IDE, see https://mcuoneclipse.com/2015/03/25/command-line-programming-and-debugging-with-gdb/ or https://mcuoneclipse.com/2015/08/26/batch-programming-with-gdb-segger-j-link-and-pe-multilink/ 

You can use the console in Eclipse to execute single commands or scripts, see

https://mcuoneclipse.com/2015/07/14/automatic-variable-expression-and-memory-display-with-gdb-and-ec... 

As for exporting memory: there is the 'dump' command in GDB you can use to save memory/variables to a file, see

https://mcuoneclipse.com/2015/01/05/updated-percepio-tracealyzer-and-trace-library-to-version-v2-7-0... 

I hope this helps,

Erich

View solution in original post

0 Kudos
4 Replies
758 Views
BlackNight
NXP Employee
NXP Employee

Hi Shawn,

KDS is using GDB (client and server) for debugging. There are many ways how you can script GDB.

You can do this outside the IDE, see https://mcuoneclipse.com/2015/03/25/command-line-programming-and-debugging-with-gdb/ or https://mcuoneclipse.com/2015/08/26/batch-programming-with-gdb-segger-j-link-and-pe-multilink/ 

You can use the console in Eclipse to execute single commands or scripts, see

https://mcuoneclipse.com/2015/07/14/automatic-variable-expression-and-memory-display-with-gdb-and-ec... 

As for exporting memory: there is the 'dump' command in GDB you can use to save memory/variables to a file, see

https://mcuoneclipse.com/2015/01/05/updated-percepio-tracealyzer-and-trace-library-to-version-v2-7-0... 

I hope this helps,

Erich

0 Kudos
757 Views
ohiogt
Contributor III

Erich,

Thanks, that points me in the right direction.  I'll read though material you posted.

Shawn

0 Kudos
757 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Shawn,

There is a Expressions view can check variable and  "EmbSys Registers" to check

registers .

pastedImage_1.png

Does this can helps ?


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
757 Views
ohiogt
Contributor III

Hi Alice,

Thanks for the response.  I think I understand GUI Expression and register views.  I'm just trying to speed up the export of large arrays for analysis in external tools.  I'm hoping to automate this process with a scripting language.

Shawn

0 Kudos