The Hardware
- The E78 ECM uses an MPC5566 MCU from NXP/Freescale.
- It also has a companion ASIC that does some voltage level translation, input/output protection, and an external watchdog. So far I don't see any evidence that this has its own firmware image like the E38 does with it's slave MCU. I don't have any SPS tools to try and see what it is doing or grab its kernel to verify. I am keeping my efforts away from any other tools.
- The hardware does differ slightly between the V8 version and the Inline 4 version. The Inline 4 version only populates 4 injector drivers and only 2 O2 sensor heater drivers (1 bank). That is what is obvious, I have not looked to see if the ignition outputs are missing any series resistors or anything else. Hoping those are the only differences. There are a bunch of low side drivers that are identical to the Injector drivers (This will be important later). There are at least 20 low side drivers in the Inline 4 hardware and 24 with V8 hardware.
- Looking at the firmware bin that I currently have. There are a few hardware revision bits. One of the bits controls subtracting an offset from the ADC. The other bits control changing a couple pins. I think those are actually enabling/disabling a console output, but have not looked further.
So far I have created a functioning read Kernel for E78. I have not worked up the courage to do a write to flash, but that will happen soon since I saved off my shadow password and can bootpin into a recovery when I inevitably brick it. I have written to RAM from kernel and that works fine. I have not integrated interrupts in the Kernel like I did for E92 and I am just letting the gm bootloader service the eMIOS interrupt which keeps the watchdogs happy. I will have to move everything over to read kernel if I want to write to bootloader flash (I think failing to do this is why so many people have accidentally bricked their ECMs when trying to implement writing to flash). The kernel implements actual UDS rather than the GM flavor. It also implements LZ4 compression which just about doubles the transfer rate.
https://github.com/FL0WL0W/KernelMPC5566
The Tool
I am using my own tool to load the kernel. It is ESP32C6 hardware I designed for some can translation stuff that I am using because it's what I have available. The code is kind of a scratchpad at the moment depending on which ECU i am working on, but it will get a UI and some usability improvements in the future. Think WiFi webpage UI where you don't have to install any software on your machine. (I know this will likely trigger members who don't think WiFi/Bluetooth is reliable enough for a flashing tool, but all the ECU communication stuff is done on the ESP32 in C and not up in Javascript) I might port it over to the meatpi wican module or make my own hardware that also supports VPW and other stuff. I know this is a barrier to entry for a lot of fellow members with their J2534 passthrough. If you want to take the kernel and implement the tool side in PCMHammer or something open source that is fine by me.
https://github.com/FL0WL0W/ESP32-ECU-Flasher
The Goal
My actual goal is to port over the rest of my EmbeddedIOServices repository so I can write applications to run on the ECM. This could pretty much be anything. I.E. CAN Translator, CAN Expander, Boost or Nitrous controller, Injector flow rate tester, IOT light switch, etc. My initial goal of course will be to get EFIGenie running. I have used EFIGenie for a few things already. It runs a CAN translator in my Mercedes to translate the car to L83. It runs a CAN expander in my Factor Five GTM to translate the E38 can messages to the analog gauges. It has even run an LS4 engine. There is also no reason it can't run any engine as long as you write the Crank/Cam decoder for it. Since the E78 hardware has a bunch of low side drivers, There is also no reason even the Inline 4 hardware couldn't run a V8 engine, or even more cylinders. Also the WiFi tool starts to make more sense because the EFIGenie configuration software is a web app. The entire suite can be packaged up into a single tool without having to install any software and can run on any device (Linux, Windows, Android, Iphone, etc.)
https://github.com/FL0WL0W/EmbeddedIOServices
https://github.com/FL0WL0W/EFIGenie
https://github.com/FL0WL0W/EFIGenieEditor
The Hurdles
- Implementing the rest of the EmbeddedIOServices is straight forward. The MPC reference manual is very thorough, and using AI should breeze through this task. (It already did for the CAN Service). Even though I am using AI to create the structure, I go through and make modifications and verify what it is doing is correct. It often gets confused or makes silly mistakes and needs a gentle nudge in the right direction. Especially to get it to write code that I am happy with as far as structure and implementation.
- eTPU is a somewhat complicated beast, but there are tools from NXP that make using it easier. The first iteration will not even use the eTPU. Proper interrupt priority setup should make software scheduling good enough. This is how most aftermarket ECUs operate and I have already demonstrated this works well on less capable microcontrollers. Verified through bench testing using an oscilloscope as well as actually running an engine.
- Figuring out exactly what the ASIC does. I have figured out enough to keep it happy, but knowing what all of the bits transferred over SPI do will be helpful in integrating all of the functions. I have some theories on what the ASIC does. From E92 we know it acts as an external watchdog. The rest of the bits I think are for either setting direction control for signals and/or enabling 5V reference supplies.
- MCU pinout. This will be figured out looking at the firmware as well as tracing out signals through the board. There are a ton of test points that make this task easier. Then it will be writing test software to toggle these pins to verify


