Note that even if your program has disabled interrupts or never enabled them , the program can still re-enter the monitor if it reaches a previously set breakpoint. Thus, by careful positioning of breakpoints you can debug programs even if interrupts cannot be enabled. This program is not a good choice for experimenting with the serial monitor! Values 0x80 and above are used by the Serial Monitor, and may not be used.
If your target sends such a character, NoICE communications may be disrupted. The AN monitor uses receive interrupts. This allows NoICE to stop a running program, and to read and write memory while the target is running.
However, it also means that if NoICE sends a keyhit character, the receive interrupt will cause entry to the monitor, where the character will be seen as an illegal command.
The target program will never see it. Be sure that your putchar function uses the correct address. In contrast BDM is able access target memory during dead bus cycles, and thus usually has no impact on the timing of a running program. In addition to the restrictions on interrupts mentioned in the previous section, the AN monitor initializes certain peripheral devices. In general, your application program should not reinitialize them, as doing so is likely to cause the monitor to stop operating.
Please examine the source code for the AN monitor being used on your target in order to understand what initialization is being done by the AN monitor.
A related note is that since the AN monitor does this initialization for your, and also initializes SP, it is easy to forget that when your program needs to run without the monitor, it must perform this initialization itself. This is one of the most common sorts of bugs in embedded systems work.
On the other hand, the monitor is almost free, and does not incur the expense of a BDM pod. Indeed, this monitor is still in use on HC11, Z80, and targets. For over ten years, hundreds of users have found NoICE and the target monitor to be a useful and valuable debugging tool.
NoICE allows you to select a standard baud rate from a drop-list. You can also enter a non-standard rate, should your application require it.
However, be aware that a standard PC serial port can only generate baud rates that are exact integer divisors of , If you enter a baud rate of , Windows will chose the closest available baud rate. Since the closest available rate in this case is about 4 percent off, operation is not likely to be satisfactory. In such a case, you might try to find a lower baud rate that can be suppored by both the target and the PC.
If NoICE is unable to communicate with the target at the rate you specify, it will try again at , , , , , and baud before declaring a failure. Most HC08 development boards contain this circuitry. For custom designs, you can either build this circuitry in, or design it as a separate interface board connected only during debugging. This requires the use of a BDM pod, but allows in-circuit debugging of programs in Flash with little or no interference to the user program being debugged.
This is a popular option for schools and other applications where low cost is the primary consideration. The only hardware requirement is an RS serial port. The AN monitor occupies the top 2K of Flash, including the reset and interrupt vectors. Thus, it has some impact on the memory organization and operation of user programs. Please download and read the Freesacale application note for details. But how do you burn the AN monitor into Flash?
0コメント