ITM macrocell debug instructions

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ITM macrocell debug instructions

1,277件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cosborne2000 on Wed Jun 16 15:41:36 MST 2010
I would like to use the ITM_SendChar() command for debugging but can't figure out where the output is going.
I downloaded an eval version of Red Suite just to make sure that xpresso wasn't limited but still no results.  I'm using a RDB1768v2r3 dev board.

Much of the documentation I've seen for ITM_SendChar() refers to Keil software but its defined in CMSIS so I believe that all M3's should have this.

Where should I be looking for these chars?
0 件の賞賛
返信
3 返答(返信)

1,225件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Jun 17 08:14:59 MST 2010

Quote: cosborne2000

Just to be clear-- the "host string" function needs the Red Probe?



Yes, you need a Red Probe.


Quote:
Is there any faster alternative to semi-hosting that I can try with the RDB1768 dev board?

Well if what you are looking for is faster output than the semihosted  printf provides "out of the box", there are quite a few options.

To start with have you looked at the RDB1768 consoleprint example? This  dramatically improves the performance of semihosted output, by reducing  how many semihosted calls are actually made.

The RDB1768 EFSL (Embedded Filesystems Library) example contains a  further extension to this, by providing a 'cr_fast_printf()' which sits  on top of consoleprint().

Other alternatives would be to send output to the UART (I use a  USB-serial convertor to connect the RDB1768's UART to a terminal running  on my PC, which cost about $10) or use the board's USB connector to  connect directly to a terminal (as per the USB Serial (CDC) examples).

The UART_printf example also shows how printf can be retargeted to  output over serial rather than using semihosting.

The current release of the RDB1768 examples can be found at:

http://support.code-red-tech.com/CodeRedWiki/RDB1768cmsisExampleProjects

Best regards,
CodeRedSupport.
0 件の賞賛
返信

1,225件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cosborne2000 on Thu Jun 17 07:32:43 MST 2010
Thank you for your quick reply.
The "host string" function sounds great-- I just wanted to avoid the slow performance of semi-hosting.

Just to be clear-- the "host string" function needs the Red Probe?
Is there any faster alternative to semi-hosting that I can try with the RDB1768 dev board?
0 件の賞賛
返信

1,225件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Jun 17 01:32:55 MST 2010
We do not provide support for the CMSIS ITM_SendChar() function directly within the Code Red tools - though it is under consideration for the future.

However we do provide support for the Cortex-M3's ITM more generally via the '[I]RedTrace[/I]' functionality contained within RedSuite3 and RedSuite3 NXP Editions. This provides profile, interrupt statistics, interrupt trace, datawatch trace and hoststrings functionality.

'[I]Hoststrings[/I]' are the equivalent of the ITM_SendChar() function. However there is one big difference. If you want to use ITM_SendChar() to print a status message to the debugger - each character of that message is stored in the MCU's memory system and transferred a character at a time up to the debugger.

However with hoststrings, the message is actually read by the debugger from within your project structure - and all that the MCU has to do is send a reference to the debugger as to which message it wants printing, along with any parameters.

I have attached a screenshot that shows this in action. In the example code the calls to HS_CountMsg() and HS_LEDState() are actually macros which generate the appropriate ITM writes to cause the debugger to display the required message.

[I am afraid that I had to attach the screenshot within a zip. The limits applied to attached images by the forum software made the image illegible when it was uploaded directly]

To use Red Trace functionality with your RED1768v2 board, you will need a Red Probe debug probe - as the built in debug hardware on the RDB1768v2 does not provide the necessary support.

http://www.code-red-tech.com/red-probe.php

[Note that the debug hardware on the LPCXPresso board also does not provide this support].

If you need more details, including example code for using host strings on your RDB1768v2 board, please contact CodeRedSupport directly via:

http://www.code-red-tech.com/contact.php

quoting this forum thread.

Best regards,
CodeRedSupport.
0 件の賞賛
返信