summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2015-10-23 15:46:46 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-11-11 11:00:55 -0800
commit77e76fc7fb8ed606386eae7f8528ead205d740ea (patch)
tree85a700fe4a6a1b5a97d95c7bd9e17f11f809cd2e /chip
parent8501badde7178f6197f534093ff7aae33af2ca71 (diff)
downloadchrome-ec-77e76fc7fb8ed606386eae7f8528ead205d740ea.tar.gz
util: Add EC-3PO, the EC console interpreter.
EC-3PO is the console interpreter that will one day replace the EC console that we have today. EC-3PO aims to migrate our rich debug console from the EC itself to the host. This allows us to maintain our rich debug console without impacting our EC image sizes while also allowing us to add new features. This commit is the 1st of three phases, the insertion phase. The main goal of this insertion phase is to get EC-3PO in place between servo and the EC UART, while not modifying the behaviour of the console too much. At this point, EC-3PO is capable of the following things: - Replicate command editing. - Save command history. - Performs error checking with console commands. The command editing should be at parity with the current EC console. With EC-3PO, one can have a much longer command history which also persists across EC reboots. And lastly, with a cooperating EC image, EC-3PO can perform error checking with console commands. Automatically retrying console commands if the command was incorrectly received at the EC end. Currently, commands are sent to the EC in a "packed" plaintext form. The next phase will introduce the host command packet communication. console.py is the module that provides the console interface between the user and the interpreter. It handles the presentation of the console including command editing. It also has an accompanying set of unit tests in console_unittest.py. It currently has 1 test suite to test the various console editing methods. interpreter.py is the module that provides the interpretation layer between the EC and the user. It also is responsible for the automatic command retrying. It requires pipe connections to be made to it for command and debug data communication. BUG=chrome-os-partner:46054 BRANCH=None TEST=util/ec3po/console_unittest.py TEST=Flash GLaDOS with a modified EC build. Run console.py passing the EC UART, verify that I can edit commands, send commands, view command history, and receive output from the EC. TEST=cros lint --log-level debug ./util/ec3po/console.py TEST=cros lint --log-level debug ./util/ec3po/interpreter.py TEST=cros lint --log-level debug ./util/ec3po/console_unittest.py Change-Id: I38ae425836efd69044334e1ed0daf3f88a95917c Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/308615 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Diffstat (limited to 'chip')
0 files changed, 0 insertions, 0 deletions