ARM ARM DUI 0224I manual Redirecting character output to hardware devices

Models: ARM DUI 0224I

1 402
Download 402 pages 14.06 Kb
Page 57
Image 57

Getting Started

where path is the directory (C:\temp for example) that contains the boot monitor image.

To load the image to NOR flash 1, at the Boot Monitor prompt enter:

>FLASH

Flash> WRITE IMAGE path\Boot_Monitor.axf NAME boot_monitor FLASH_ADDRESS 0x34000000

where path is the directory (C:\temp for example) that contains the boot monitor image.

Note

Very long path names can cause problems with semihosting. To avoid this, move the image to a temporary directory.

9.Loading the image into flash takes a few minutes to complete. Wait until the prompt is displayed again before proceeding.

10.Turn the board off and then on.

Boot Monitor starts automatically.

2.6.4Redirecting character output to hardware devices

The redirection of character I/O is carried out within the Boot Monitor platform library routines in retarget.c and boot.s. During startup, the platform library executes a SoftWare Interrupt instruction (SWI). If the image is being executed without a debugger (or the debugger is not capturing semihosting calls) the value returned by this SWI is –1, otherwise the value returned is positive. The platform library uses the return value to determine the hardware device used for outputting from the C library I/O functions. (Redirection is through a SWI to the debugger console or directly to a hardware device)

ARM DUI 0224I

Copyright © 2003-2010 ARM Limited. All rights reserved.

2-21

Page 57
Image 57
ARM ARM DUI 0224I manual Redirecting character output to hardware devices