PCMHammer P04

ironduke
Posts: 598
Joined: Thu Feb 13, 2020 11:32 pm
cars: Mainly GM trucks, a Cruze and an Equinox for dailys..

Re: PCMHammer P04

Post by ironduke »

Instead of having one kernel to read AND write can there be separate kernels? One pushed to the ecu to read, then another to write? Would this save significant space?
User avatar
Gampy
Posts: 2333
Joined: Sat Dec 15, 2018 7:38 am

Re: PCMHammer P04

Post by Gampy »

Unfortunately that doesn't make the Write Kernel small enough ... There is only about 250 bytes difference between a Write Kernel and a Read/Write Kernel.

If we need to break it up, we will need to break it into at least 2 parts, AMD and Intel, but most likely into 3 parts, Read, AMD Write, Intel Write.

However, with the latest change, the AMD P04 now seems to work using a full Kernel, still having write issues with the Intel P04, even with just an Intel Kernel.

-Enjoy
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
antus
Site Admin
Posts: 8292
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: PCMHammer P04

Post by antus »

Are you moving the stack in the loader or the kernel? There might still be a piece of ram we need to avoid because something is writing in to the flash kernel. If it worked before, it sounds like this is the cause. So we might need to map out what works and what breaks and do some load address tuning still. This may be what you are doing already. Its the approach I started on the P08 last night before my brain turned to mush after a long day job and I realised that trying to modify this code in that state was probably going to end up in a brick on my only P08 so I aborted (at least it has BDM provided the flash isn't damaged, but still, might re-visit in lunch break today).

Comparing one of the commercial kernels its 2.65kb and loading and running on the P04, so a 650 byte loader and a 1900 byte kernel should be possible.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Tazzi
Posts: 3459
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: PCMHammer P04

Post by Tazzi »

Mmmm, that memory size limit doesn't sound right.
Id have to dig out my old P04 stuff, but I feel like the issue was the data needed to be uploaded in 1 chunk, not multiple.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
antus
Site Admin
Posts: 8292
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: PCMHammer P04

Post by antus »

We are way past that tazzi, the loader is small enough to upload with any of the supported interfaces and supports 36/80 so that we can upload the kernel in chunks. It has been working fine for quite a time now for reads. https://github.com/LegacyNsfw/PcmHacks/ ... s/Loader.S
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Tazzi
Posts: 3459
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: PCMHammer P04

Post by Tazzi »

antus wrote:We are way past that tazzi, the loader is small enough to upload with any of the supported interfaces and supports 36/80 so that we can upload the kernel in chunks. It has been working fine for quite a time now for reads. https://github.com/LegacyNsfw/PcmHacks/ ... s/Loader.S
Oh my bad! Didn't realize that one!
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
Gampy
Posts: 2333
Joined: Sat Dec 15, 2018 7:38 am

Re: PCMHammer P04

Post by Gampy »

Yes, the same code has worked, I am trying various addresses, to no avail ... Moving stack in Loader.

The Write is failing, BDM shows a clean erase, it's odd, I've used this same code before, have done many writes, have posted an image of it's completion ... Same code!

-Enjoy
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
Tazzi
Posts: 3459
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: PCMHammer P04

Post by Tazzi »

Gampy wrote:Yes, the same code has worked, I am trying various addresses, to no avail ... Moving stack in Loader.

The Write is failing, BDM shows a clean erase, it's odd, I've used this same code before, have done many writes, have posted an image of it's completion ... Same code!

-Enjoy
Give more time after the erase to when writing.
If its intel based, if you are switching the 12v on and off between erase and then writing, this will also cause problems.

I found adding a nop loop after enabling/disabling 12v for intel flashes was critical to be able to erase and write without issues.

Some intel flashes are a bit slower then others, could be due to age or whatever, so try increasing time from enabling this bit to see if it helps.

Please note I Have not looked over the code base to verify whats being done here.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
antus
Site Admin
Posts: 8292
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: PCMHammer P04

Post by antus »

There is a loop here, it could be tweaked, but its working several other platforms as is. https://github.com/LegacyNsfw/PcmHacks/ ... nel.S#L677
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
darkman5001
Posts: 215
Joined: Sat Dec 18, 2021 8:15 am
cars: 2004 Suburban, 2001 Tahoe, 2002 Envoy, 2006 Envoy, 2003 Lincoln LS
Location: New Jersey, USA

Re: PCMHammer P04

Post by darkman5001 »

Gampy wrote:I have not actually ripped one apart, but I don't think they are potted, I think the cover is just glued.

I think Darkman5000 posted a pic in the P12 thread.

Edit: I think (my brain is getting pretty foggy) the P12 and the E40 share BDM ... I have E40 BDM Pinout.

-Enjoy

The E40 and the P12 have a different board layout so the exact BDM diagram won't work. Tried that along time ago. They look so similar however if you try tracing it, it is totally different.
Post Reply