打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
How to printf() to PC through J-Link?
userphoto

2010.07.14

关注
if you are using a Cortex-M3 device and CMSIS, you can easily use the ITM_Sendchar(c) function, defined in CMSIS core_cm3.h.
The ITM output (channel 0 for printf) is captured from the J-Link through SWO sampling, this must be configured (dependant on your IDE).

On ARM7/9 there is a method called semihosting, a printf is redirected through armlib to the debugger, how this works with J-Link the Segger guys should be able to help :-)
In Keil uVision on ARM7/9 and there is the Real Time Agent doing this work, and the CMSIS for Cortex. Note, for STM32F10x the stm32f10x_dbg.ini (found i.e. in STLibBlinky) must be added to debug settings. In uVision you can watch the serial output when debugging in the RTA or ITM window under Serial Windows.

In IAR the printf's are captured through semihosting and sent to the Terminal. On CM3 the semihosting can also be used, or printf through ITM.

The advantage on ITM is, that the core does not need to be "stopped" when printing a message.
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
使用 Printf via SWO/SWV 输出调试信息
MDK配合J
SEMIHOSTING(转载)
浅谈工程师的调试法宝(三)---SWO引脚的巧妙应用
STM32调试利器之 ITM | 和 BUG 说声再见吧
将printf重定向到ITM[图解]
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服