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 2 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
27 changes: 22 additions & 5 deletions docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,24 @@ 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

[log_cflag]: https://github.com/system76/ec/blob/master/src/board/system76/common/common.mk#L31-L39
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
[log level cflag][log_cflag]. This is an EC compile time configuration and
curiousercreative marked this conversation as resolved.
Show resolved Hide resolved
changing will require a build and flash of the EC.

## 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 +37,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 +63,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 +103,7 @@ oryp7 | 6 | 5
9. Reconnect battery
10. Replace bottom panel

### Setup
#### Setup

Requirements:
- Target wired for EC debugging
Expand Down