Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add console_internal debugging instructions #394

Merged
merged 3 commits into from
Aug 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,25 @@ Terms used:
- *host*: The system that will have all devices connected to it and
will receive the EC logs

## Parallel port
## Debugging with target device
curiousercreative marked this conversation as resolved.
Show resolved Hide resolved

1. Install dependencies
```bash
./scripts/deps.sh
```
1. Start the console
```bash
make BOARD=system76/<model> console_internal
```
1. If you're not seeing seeing expected output, check the
[`LEVEL` cflag][level_cflag]. This is an EC compile time configuration and
changing will require a build and flash of the EC.

[level_cflag]: https://github.com/system76/ec/blob/01907011bb63/src/board/system76/common/common.mk#L31-L39

## Debugging with external device

### Parallel port

This method replaces the keyboard with a device used for debug logging.
An alternate method of interacting with the target is needed; e.g., an
Expand All @@ -20,7 +38,7 @@ Requirements:
For details on configuring the Mega 2560 and breakout board, see
[mega2560](./mega2560.md).

### Setup
#### Setup

1. Enable parallel port debugging in the EC firmware
- Uncomment `PARALLEL_DEBUG` in `src/board/system76/common/common.mk`
Expand All @@ -46,12 +64,12 @@ To return the Mega 2560 to host mode, reset the device.

If logs are corrupted, try power cycling the Mega or reseating the cable.

## I2C connection
### I2C connection

**Failure to follow steps in order, or performing steps on an
unsupported board, may result in damaged board components.**

### Wiring the target
#### Wiring the target

The I2C connection is made through the battery pins. Find the pins marked
`SMC_BAT` (clock) and `SMD_BAT` (data) in the service manual.
Expand Down Expand Up @@ -86,7 +104,7 @@ oryp7 | 6 | 5
9. Reconnect battery
10. Replace bottom panel

### Setup
#### Setup

Requirements:
- Target wired for EC debugging
Expand Down