Add the steps required to wire a supported laptop for EC debugging, along with setting up an environment to receive EC logs.
		
			
				
	
	
	
		
			1.5 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			1.5 KiB
		
	
	
	
	
	
	
	
Debugging the EC firmware
Failure to follow steps in order, or performing steps on an unsupported board, may result in damaged board components.
Terms used:
- target: The laptop system that has the EC to be tested.
- host: The system that will have all devices connected to it and will receive the EC logs.
Wiring the target
These steps apply to the following models:
- darp5
- darp6
- galp3-c
- galp4
- Power off system
- Unplug AC adapter
- Remove bottom panel
- Disconnect battery
- Attach one wire to battery pin 4 (CLK)
- Attach one wire to battery pin 5 (DATA)
- Route wires through the Kensington lock slot
- Secure wires to board with tape
 
- Attach female connector and housing to wires
- Reconnect battery
- Replace bottom panel
Setup
Requirements:
- Target wired for EC debugging
- Adafruit Trinket M0
- USB-C cable
- Enable I2C debugging in the EC firmware for the target
- Uncomment I2C_DEBUGGERinboard.mk
- Build and flash firmware
 
- Uncomment 
- Connect Trinket M0 to host
- This will create an ACM device at /dev/ttyACM*
 
- This will create an ACM device at 
- Connect to ACM device from host
sudo tio -b 115200 -m INLCRNL /dev/ttyACM0
- Ground target to host
- Connect USB cable from USB-C port on target to host
 
- Connect target to host
- Connect CLKwire toSCLon Trinket M0
- Connect DATAwire toSDAon Trinket M0
 
- Connect 
EC logs should now print to the console on the host. This can be tested by removing or inserting the AC adapter to trigger a power event.