|ARM Technical Support Knowledge Articles|
Applies to: MON51 Target Monitor
Information in this article applies to:
I'm using MON51 and the uVision Debugger to download my program and debug it on my target system. Can my program share the serial port with the monitor?
Yes. However, there are a few limitations that you should consider.
#ifndef MONITOR SCON = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */ TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */ TH1 = 221; /* TH1: reload value for 1200 baud @ 16MHz */ TR1 = 1; /* TR1: timer 1 run */ TI = 1; /* TI: set TI to send first char of UART */ #endif
You may wish to create a new target in your project for debugging with the monitor. In this target configuration, you can define MONITOR (in the compiler settings for all compiled modules) and monitor-specific code will be generated.
All information that you transmit out the serial port will be received and displayed in the serial window in uVision.
Article last edited on: 2005-07-09 09:58:01
Did you find this article helpful? Yes No
How can we improve this article?