Does KDS support debug scripting

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Does KDS support debug scripting

跳至解决方案
1,350 次查看
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.

标签 (1)
0 项奖励
回复
1 解答
1,204 次查看
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 项奖励
回复
4 回复数
1,205 次查看
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 项奖励
回复
1,204 次查看
ohiogt
Contributor III

Erich,

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

Shawn

0 项奖励
回复
1,204 次查看
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 项奖励
回复
1,204 次查看
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 项奖励
回复