Flashing GM ECU with M2

There is an active effort right now to reflash GM’s 12200411 PCM via open-source software - this should work for a lot of GM V8 vehicles in the late 1900s and early 2000s. Most of the excitement is toward the end of this thread:

https://pcmhacking.net/forums/viewtopic.php?f=4&t=1566

The short version is that the kernel development and proof-of-concept app were done some time ago, but the app had some reliability and maintainability issues, and we’re now rewriting the app to address those problems.

I would love to get the Macchina M2 working with this project, but it’s not going to be a good option without support for high speed / 4x VPW communications. I don’t have the Arduino skills to make that happen, but I really hope someone else does… I’ll be very happy to add whatever is needed in the Windows app to support the M2.

I am a Computer Science Student. As I mentioned in the other thread you posted this in. I will be returning to this after a couple other projects this summer. My Semester ends last week of April and my time is likely to be very limited until then.

I do plan to work on J1850VPW, especially now that I have a tech 2. I have a couple other M2 Projects I need to knock out first but there is a currently working Library available for J1850VPW that doesn’t yet support the 4x mode. This is the first “additional” protocol I hope to add to M2RET with support for Lawicel 2.0 and ELM/STN. Somewhere along the way I also hope to build out the M2RET software to be able to link two M2’s together to double the number of ports available and add support for some interesting MIM type stuff.

I’m going to be working on getting our app working with an STN device this week (ScanTool SX, a simple USB-OBD2 device), so if the M2 supports the same protocol that would be fantastic.

I was a CS student once upon a time myself, so I can sympathize. Good luck with your finals. :slight_smile:

I have the same STN device sitting on the floor next to me.

So yes I plan to have it be compatible.

May be able to setup a special purpose program for now that might work too. Basically adding a touch screen HMI to the M2 and have a “programming” sketch. Or a headless one would work too since the M2 has buttons on it. I would like to see if I could get it to read the PCM in my truck. Will the same code allow you to connect to other modules on the network too such as the BCM?

I have a BCM out of a Trailblazer truck that I haven’t gotten working right yet that I could try pulling the BIN out of.

You should find the STN to be a much nicer device than the ELM.

The focus right now is on reflashing the PCM, but what we learn along the way might apply to other modules as well. I don’t even know whether the BCM uses the same CPU as the PCM - if they’re different, then a ton of additional work will be required to reflash it.

The code that exists on the PCM has only limited support for reflashing, so to read and write the full contents you have to upload custom code (a “kernel”) to the PCM’s RAM, tell then PCM to execute the kernel, and then communicate with the kernel and tell it to read or write the EEPROM. If the BCM uses a different CPU, or different EEPROM, etc, then someone will have to write a new kernel for it. Our app could perhaps be extended to work with the BCM (there code we’re writing to interface with various VPW devices could be re-used, for example) but writing a new kernel is a pretty big job on its own.

I am on a “hack this module” thread and one of the authors there mentioned that all of the GM modules were Motorola 68xxx based. And with GM liking to keep things simple I suspect that the modules all use the same base system. If I get the chance to look at the stuff I have with my Tech 2 hopefully I can figure out some of it.

Unfortunately those that did that work and wrote about them are MIA and are now offering paid services to do this so they don’t share that information if you can find them and try to ask them about it they just ignore you.

If any one is interested in working on improving the J1850 VPW code I’d be interested in speaking with you. I have an Arduino sketch that runs on the Mega 2560 and is capable of 4096 byte blocks, also have it in early stages of 4x mode as well. I know the code is not directly compatible but I’m sure it could be translated or converted to run on this if someone had the desire.

Here’s a quick video of the Arduino Mega reading the full bin file from an LS1 pcm with about 35 cents in parts for the entire Tx/Rx circuit.

I think I know which guys you’re talking about. :slight_smile: One of them definitely smelled money and went rogue, but one of them is reportedly just offline for an extended period due to his job, and we have his permission to use his stuff.

I’m intrigued by the idea of replacing my Corvette’s 512kb '0411 PCM with a slightly newer 1mb unit, so that’s something I’ll be looking into after we get reflashing working with the 0411. I’m a little worried that there might not be much free space left in the 0411 ROM (for things like per-gear throttle mapping, rev matched downshifting, really good speed-density, maybe boost control…), and it seems like a 1mb PCM swap is not too far-fetched. And thanks to PeteS I already have a 1mb PCM on my workbench.

@PeteS I can certainly look into how your code works and try to translate to the Due. Again, due to school constraints I may be limited in my time. Hard to ignore this and work on the other stuff first though. Especially if your available to ask how your doing stuff if I have questions. I by no means am an expert with the Due as I just got introduced to Arduino when I started tinkering with the M2 but not a bad way to learn something new… Are you 160plus on PCMHacking?

@NSFW As I said before, from what was said in another forum I am in, It was said all of the GM Modules were Motorola 68xxx based. From the chatter in that thread I strongly suspect that the code to load the BIN into the eprom of the modules is the same across all of the modules. I believe the difference between modules to really be the IO ports available, the memory in the units and the speed of the processor. Otherwise I expect the modules to pretty much work the same. Thus if you figure out how to read and write to the PCM, you also have a method of reading and writing to the BCM, ABS, AirBag and other modules. Personally I am more interested in the modules that don’t have utilities for them right now such as my trucks Door modules and the BCM. For the PCM I would be happy just getting HP Tuners. So to use a different PCM you just need to make sure the wiring is compatible and go that route.

I moved my own post from the J1850 thread to this one.

If any one is interested in working on improving the J1850 VPW code I’d be interested in speaking with you. I have an Arduino sketch that runs on the Mega 2560 and is capable of 4096 byte blocks, also have it in early stages of 4x mode as well. I know the code is not directly compatible but I’m sure it could be translated or converted to run on this. I’m willing to work 1 on 1 OR with a group of people who would be interested in porting the Mega code to work with the Macchina.

Here’s a quick video of the Arduino Mega reading the full bin file from an LS1 pcm with about 35 cents in parts for the entire Tx/Rx circuit.

More details can be found on Pcmhacking dot net Gearhead-Efi dot com or Ls1tech dot com if your just looking for an overview of what’s going on. The goal is to opensource Read/Write pcm flashing primarily targeted at LS Pcm’s but could be expanded on to work with others as well.

If you’d like to get involved and contribute to this project either on the Macchina side of things or the entire project as a hole feel free to get in contact with myself or Nsfw either here or on one of the other forums listed above.

We are not limiting our work to a single hardware solution like most would,we are bringing compatibility to as many devices as possible along the way. We would be glad to include the Macchina in our work if people here would like to help getting the J1850 VPW side of this up up to the task.

I am in… As I mentioned before my time is limited for about the next 5 weeks but I will do what I can.

Been talking to @PeteS through email last couple days and just realized the PCM from this Blazer I have is a 12200411… I will be hooking it up this weekend to my other lab board which has the IP and BCM on it from the same truck that I haven’t had luck getting to communicate yet.

Also getting the Mega so I can get the software you guys are running going at home. Pete apparently only lives about 20 miles south of where I work so I will probably give him my Macchina break out board and he is going to give me one of his boards to test with. Although I don’t know if that board is compatible with the 4x mode…

Hey @NSFW, check your PM’s. I would like to get your email and discuss some things privately if possible.

Rodney

Nice to see that @PeteS has gotten the 4x stuff working with the M2 interface board using the Mega. Shows it should fully work. Hopefully we can get this rolling for the M2 with the M2 processor board on it.

Rodney

Correct, the hardware is more then capable of reading in 4x with a vastly inferior processor to what the M2 uses. I was able to connect the Arduino Mega to the expansion board J 1850 Vpw lines and monitor a complete flash. The Mega sketch would need timing work to be able to transmit with the Macchina but rather then trying to rework timing on the Mega sketch I’ll just start looking into porting the sketch directly to the M2 processor.

1 Like