How to printf() to PC through J-Link?
来源:百度文库 编辑:神马文学网 时间:2024/05/04 10:00:26
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.
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.
How to printf() to PC through J-Link?
How to...
how to
How to use desktop of *nix machine on your PC?
How to setup Linux PC CCcam server with Clark...
How to praise
How to apply PKM
how to install moodle
How to switch careers
CSS How To...
How To Initiate Conversation
how to learn English
How to Sell America
How to stduy Chinese?
How to Play DotA
How to praise
How To Learn English2
How To Learn
How to learn English
How to achieve success
how to install moodle
how to 网站
how to makeCI
how to Contact us