Servo is a debug board used for Chromium OS test and development. It connects to most Chrome devices through a debug header on the mainboard. The debug header is used primarily during development and is often removed before a device is released to consumers. If you have a production device the debug header might need reworking before servo can be connected.
Servo is a key enabler for automated testing, including automated firmware testing. It provides:
For example, it can act as a USB host to simulate connection and removal of external USB devices. It also provides JTAG support.
Though servo boards are not publicly distributed or sold (by Google), detailed information on Servo V2 block diagram, BOM, schematic and layout is available.
In a typical debug setup, you connect servo to the debug header on a Chrome device, and to a host machine through the HOST_IN USB port. See the annotated FAFT setup image for details.
Most newer Chrome OS mainboards attach to servo with a 50-pin flex cable. The schematic and layout for this cable is also available. The standard DUT-side debug header is an AXK750347G from Panasonic, though shorter variants are sometimes used.
The basic steps to connect servo are:
You should be able to use the power button on servo to power the Chrome device on and off.
To use servo, on your Linux workstation you need to build Chromium OS and create a chroot environment.
The hdctools (Chrome OS Hardware Debug & Control Tools) package contains several tools needed to work with servo. Make sure the latest version is installed in your chroot:
On your workstation, servod must also be running to communicate with servo:
With servod running, dut-control commands can be used to probe and change various controls. For a list of commands, run dut-control with no parameters:
You can toggle GPIOs by specifying the control and the state. For example, to perform a DUT cold reset:
Higher-level controls may set several sub-controls in sequence. For example, to transition a DUT to recovery mode:
To access the CPU or EC UARTs, first check the port mapping with dut-control, then attach a terminal emulator program to the port:
Servo can also be used for flashing firmware. To flash EC firmware:
The procedure for flashing system firmware may vary slightly by platform. Here is a typical command sequence for flashing system firmware on Baytrail-based Chrome devices:
To set up servo to run automated tests, connect the servo board and the test device to the network via Ethernet, and load a Chromium OS image onto USB memory stick. The networking and build image steps are not described here; see FAFT for details on configuring servo to run automated tests. For information on writing tests, see the servo library code in the Chromium OS autotest repo.
Using the Servo along with GDB and OpenOCD, you can single-step debug via JTAG on TI EC targets. For example, here's how you would get setup for samus.
1. Start up servod for the target which you will attach to and enable JTAG access.
2. Now that servod is up and running, we need to launch OpenOCD. There are some configuration files present and we need to instruct OpenOCD to use the configuration file for the Servo V2. The arguments to openocd here are for samus.
Once you see a line indicating the number of breakpoints, you should be ready to attach with gdb. When OpenOCD launches, it starts up a gdbserver listening on port 3333 by default. This can be overridden by setting the
3. Now that OpenOCD is up and running, we can launch GDB and load the symbols from our EC ELF file. Make sure to use the correct gdb binary from the toolchain.
4. Once GDB launches and the connection has been established correctly, set the number of breakpoints according to the output received earlier from launching OpenOCD.
At this point you can now halt or reset the target, set breakpoints, step through functions, and even single step through assembly instructions.
You send commands to the target using the "
Within GDB, here are some commands that you may find useful. For more information, consult the GDB documentation.
Set the layout to split mode which shows you the disassembly, source, and the gdb command window. (You can use ‘
Set breakpoints on functions or addresses (Tab complete works here for loaded symbols)
Step exactly 1 assembly instruction
Run until the current stack frame returns
Servo v2 reworks are needed to flash the PD MCU on certain boards and access the PD MCU console. These reworks are not mutually compatible, so only apply the one relevant to your board.
glados_pd / kunimitsu_pd / chell_pd:
Chromium OS >