Exploring the Embedded Controller

I apologize if this is already answered in this thread. I tried searching for “flash RW” or “write RW” and came up empty handed. I’d like to build a new version of the lotus EC and write it to my RW slot. My primary interest is fixing the bug where the CPU gets stuck throttled at low MHz after being plugged in and waking. Unfortunately, with the console commands disabled and the read to memmap only taking a single byte means I can’t get a read out of EC_MEMMAP_POWER_SLIDE (0x151). Same issue with enabling safety_pwr_logging since that requires a console command. I figure a custom build can log the right data for my debugging and allow me to hopefully figure out where the bug is that is getting me stuck in a throttled state (or at least allow me to send a command to unstick things).

Is there good documentation as to how to build a local branch and flash it to RW (plus how to get back when it inevitably goes wrong :slight_smile: ).

Btw, for anyone wanting to use Github search to find things, I forked the Framework/EmbeddedController repo and made a branch with the current lotus EC code as the default branch. That makes it so searching the repo in Github searches that branch instead of the hx20-hx30 branch. I made a new branch instead of using the lotus-zephyr because I didn’t realize that was already at the correct commit