Download Broadcom CFE_2006

Transcript
Common Firmware Environment (CFE) Functional Specification
%x, %X
%p, %P
%b
%w
%a
%I
%p, %P
%Z
A hexadecimal number. Capital X will display capital letters for the hex
digits (A-F)
A hexadecimal number, sized to the width of a pointer
A byte (same as %02X)
A 16-bit word (same as %04X)
An Ethernet address, in the form XX-XX-XX-XX-XX-XX. To use this
template, pass the address of a 6-byte buffer.
An IP address, in the form nnn.nnn.nnn.nnn – to use this template, pass the
IP address as the address of a 4-byte buffer.
A pointer, appropriately sized for 32-bit and 64-bit versions of CFE
Dump a buffer. To use this template, supply two arguments, a length in
bytes and a buffer address. For example, xprintf(“%Z”,10,buffer) will
display a hex dump of 10 bytes starting at buffer.
The templates %s, %d, %u, and %x take the following modifiers:
Modifier
nn
0nn
l
ll
Description
Field width, for example %30s. Numbers will be right justified in the field,
strings will be left-justified in the field.
For numeric templates, fill the leading spaces with ‘0’ characters.
For numeric templates, indicates that the argument is of a “long” type.
For numeric templates, indicates that the argument is of a “long long” (64bit) type.
The xprintf routine does not support floating point.
The console_log routine is useful for “background” processes like polling loops. It works with
the console_readline routine to avoid disturbing the current state of input on the console, so you
can display messages (for example, Ethernet link status changes) without disrupting a partiallyentered command line.
The console_readline_noedit routine reads a line of text from the console (similar to gets). It
provides rudimentary line editing (basically, backspace) and will return when a complete line of
text is entered. You can call console_readline to get line input with editing.
The console interface is implemented in main/cfe_console.c.
The xprintf routines are implemented in lib/lib_printf.c.
4.10 Environment Manager
The environment manager is responsible for tracking simple textual environment variables and
other small values and storing them in persistent storage such as an EEPROM or flash device.
© 2000-2003 Broadcom Corporation
61