Blown Chip & Elusive Serial Monitor BDM File

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

piledriver
Super MS/Extra'er
Posts: 1679
Joined: Tue Oct 27, 2009 6:24 am
Location: Van Alstyne, Texas

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by piledriver »

robs wrote:
kim_gulle wrote:So to eliminate the risk of ruining, if that's possible, another fine Freescale piece of hardware, is there any way i could get a hold of the proper serial monitor that is sure to do the trick?
Alternatively, can i dump it from another MS2 maybe? I've got a friend that has an MS2 ready for his project, not being used yet.
Use BDM to dump 0xf800-0xffff from your friend's MS2. Loading that onto your blank chip should do the trick.

Have fun,

Rob.
IIRC it's write only. (copy protection) but it's worth a try.
I think I tried reading it back for verification, not possible.(but I have slept since then)

If the mods to the freely distributed Motorola code are really as trivial as suggested, I again encourage B&G to release the modded code.

It's probably only going to hurt actual users, it may be legally required depending on the Moto licence (haven't looked), and the pirates have it already.
Always doing things the hard way, MS2 sequential w/ v1.01 mainboard, LS2 coils. 80 mile/day commuter status.
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by slow_hemi6 »

Not yet confirmed but apparently I have been getting around for almost 3 years without one. :lol:
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by racingmini_mtl »

slow_hemi6 wrote:Not yet confirmed but apparently I have been getting around for almost 3 years without one. :lol:
If you have uploaded new code through the serial port, you have the serial monitor on your CPU. And that wasn't put there from loading the B&G code.

I'm not saying this to be antagonistic but to prevent others from wasting their time.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
robs
Master MS/Extra'er
Posts: 564
Joined: Sun Jan 17, 2010 4:26 pm
Location: Sydney, Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by robs »

piledriver wrote: IIRC it's write only. (copy protection) but it's worth a try.
I think I tried reading it back for verification, not possible.(but I have slept since then)

If the mods to the freely distributed Motorola code are really as trivial as suggested, I again encourage B&G to release the modded code.

It's probably only going to hurt actual users, it may be legally required depending on the Moto licence (haven't looked), and the pirates have it already.
In both my MS's firmware (2006 or so) there's flash protection to prevent overwriting, but no use of flash security to prevent BDM reading. And this firmware is genuinely a handful of trivial instructions away from the Motorola code. Perhaps there has been an update to the firmware. I can only think this would be something to do with MS3 since (as slow_hemi6 has found) MS2 makes extremely little use of the boot monitor code; why change it?

Burning the 2006 ROM to a virgin chip goes easily enough. Reading it back is easy. Trying to rewrite it after that would need poking around in the manual to work out how to disable protection.

Have fun,

Rob.
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by jsmcortina »

The current MS2-family monitors allow the firmware loader to auto-detect the hardware in use. This has greatly reduced support from end-users loading the wrong code.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by slow_hemi6 »

If you have uploaded new code through the serial port, you have the serial monitor on your CPU
My thoughts exactly.
As of yet I haven't heard why my MS2 actually works? I know the MS shipped without a monitor, or a non working one. I know USBDM erased the chip. The only files in my codewarrior project are datapage.c, derivitive.h, main.c, Monitor_v2.920.abs.s19 and start12.c. How did that turn a useless brick into a working MS2?
I put a lot of effort into fixing the thing, I thought I understood how and why.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
jsmcortina
Site Admin
Posts: 39587
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by jsmcortina »

slow_hemi6 wrote:I know the MS shipped without a monitor, or a non working one.
Are you really sure? All MS2 boards should include the monitor pre-loaded on the chip unless there was a manufacturing error.

Blank replacement processors bought from Digikey or Mouser etc. are truly blank.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by slow_hemi6 »

Fairly sure James. I linked to my 2013 posting about it. http://www.msextra.com/forums/viewtopic ... 98#p361498
It just sat there with all 3 leds lit no mater what I did.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
piledriver
Super MS/Extra'er
Posts: 1679
Joined: Tue Oct 27, 2009 6:24 am
Location: Van Alstyne, Texas

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by piledriver »

When I first started playing with Ms2, ~3.03u timeframe, the firmware loading code wasn't terribly robust, and you could easily end up with a brick that wouldn't be detected nor obviously flash.

Loading the B&G firmware, using the jumper and B&G loader, then reloading msextra would get things back to sanity.
(all ancient history now, the loader seems quite bulletproof for the last few years)
I suspect that's what you did, effectively.

It would be interesting to see the source for that modified moto monitor, as it by definition isn't B&Gs code...
Always doing things the hard way, MS2 sequential w/ v1.01 mainboard, LS2 coils. 80 mile/day commuter status.
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by slow_hemi6 »

I wish. It was totally unresponsive to the boot jumper as well.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
kim_gulle
Helpful MS/Extra'er
Posts: 88
Joined: Wed May 25, 2011 12:30 pm

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by kim_gulle »

robs wrote:
kim_gulle wrote:So to eliminate the risk of ruining, if that's possible, another fine Freescale piece of hardware, is there any way i could get a hold of the proper serial monitor that is sure to do the trick?
Alternatively, can i dump it from another MS2 maybe? I've got a friend that has an MS2 ready for his project, not being used yet.
Use BDM to dump 0xf800-0xffff from your friend's MS2. Loading that onto your blank chip should do the trick.

Have fun,

Rob.

I'll try this then. If i remember correctly, the "mon.s19" file that was previously posted in this thread some time ago, was dumped from someone's MS2.
kim_gulle
Helpful MS/Extra'er
Posts: 88
Joined: Wed May 25, 2011 12:30 pm

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by kim_gulle »

Ok, so i have recieved the BDM interface and i'm trying to dump the serial monitor from my friend's MS2 using the program USBDM Memory Dump. But i think i'm doing something wrong since i am not really getting any results from reading the memory. I just get a window that appears real quick and then disappears again just as quick. No errors or anything. If i unplug the BDM cable from the MS2 i get an error saying "enabling BDM interface on target failed" so i guess the BDM do communicate with the CPU at least. I've also tried using both "Flat" and "Paged" options in the "Memory Options" section. I've attached an image of the program with the current settings i am using. I have also tried not using the memory range options, but still the same result.
DaveEFI
Super MS/Extra'er
Posts: 4175
Joined: Sun Apr 15, 2012 12:55 am
Location: SW London, UK

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by DaveEFI »

Ages ago, I checked an MS2 with a faulty injector circuit while the owner waited. Turned out to be the daughter board. He wanted it fixed there and then, so I fitted a new one and transferred over his MSQ etc. He didn't want the faulty board back, so I decided to have a go at fixing it in some spare time. (I'm not really into fixing SM stuff)

I bought a new processor from the cheapest UK source, and the loader cable which IIRC came with software or instructions on how to use. I can't remember how, but I did manage to get the thing to load extra code eventually, and it seemed ok on my Stim. Sadly, I'd damaged the PCB when removing the processor, and although I patched it, it remains in my spares box. The 'you never know' one. But I did learn one thing - leave such repairs to the pros. :D
Rover SD1 3.5 EFI
MS2 V3
EDIS
Tech Edge O2
London UK.
robs
Master MS/Extra'er
Posts: 564
Joined: Sun Jan 17, 2010 4:26 pm
Location: Sydney, Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by robs »

Perhaps trying with CodeWarrior is worth a go -- Freescale's product ought to give you helpful messages. As I recall, HiWave (the debugger) was able to both dump and burn chunks of flash. Flat model should be all you need. Perhaps your friend's MS has security enabled?? I don't know whether newer firmware was distributed with security enabled. If so, (1) I'd expect CodeWarrior to tell you, and (2) dumping its contents would need a user-mode program to send it through the serial port rather than BDM. Not terribly hard, but not a great joy either.

Have fun,

Rob.
kim_gulle
Helpful MS/Extra'er
Posts: 88
Joined: Wed May 25, 2011 12:30 pm

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by kim_gulle »

robs wrote:Perhaps trying with CodeWarrior is worth a go -- Freescale's product ought to give you helpful messages. As I recall, HiWave (the debugger) was able to both dump and burn chunks of flash. Flat model should be all you need. Perhaps your friend's MS has security enabled?? I don't know whether newer firmware was distributed with security enabled. If so, (1) I'd expect CodeWarrior to tell you, and (2) dumping its contents would need a user-mode program to send it through the serial port rather than BDM. Not terribly hard, but not a great joy either.

Have fun,

Rob.

I thought that program was codewarrior? At least it came with the tools i downloaded here: http://www.nxp.com/products/software-an ... ALEDITIONS

I downloaded the "Special Edition: CodeWarrior for HCS12(X) Microcontrollers (Classic) v5.2" package and installed it.

Just a quick question, the .S19 file i have attached, is that the required serial monitor or is it something completely different that will not work?
robs
Master MS/Extra'er
Posts: 564
Joined: Sun Jan 17, 2010 4:26 pm
Location: Sydney, Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by robs »

That S19 is definitely not it, though it does overlap the protected f800-ffff address space. Looks like it's from a completely different project.

Try using hiwave within the CodeWarrior suite. It has well integrated flash tools.

I'm a bit suspicious that there's something wrong with your USBDM installation -- either the firmware on the module itself, or the installation of the libraries/driver on your PC. Perhaps, rather than messing with your friend's MS, first make sure you can talk to yours. Take a snippet out of the standard S19 file (just a few lines mapped at around 0xc000 say), and try burning that to your new chip and reading it back. Until you've got that working there's no hope of getting the monitor copied off your friend's MS.

Have fun,

Rob.
kim_gulle
Helpful MS/Extra'er
Posts: 88
Joined: Wed May 25, 2011 12:30 pm

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by kim_gulle »

robs wrote:That S19 is definitely not it, though it does overlap the protected f800-ffff address space. Looks like it's from a completely different project.

Try using hiwave within the CodeWarrior suite. It has well integrated flash tools.

I'm a bit suspicious that there's something wrong with your USBDM installation -- either the firmware on the module itself, or the installation of the libraries/driver on your PC. Perhaps, rather than messing with your friend's MS, first make sure you can talk to yours. Take a snippet out of the standard S19 file (just a few lines mapped at around 0xc000 say), and try burning that to your new chip and reading it back. Until you've got that working there's no hope of getting the monitor copied off your friend's MS.

Have fun,

Rob.

Ok so i used HiWave and i think i got it out. Check the file i am posting. I used the command "SAVE 0xF800..0xFFFF monitor.s19" and i got this file. I guess the scrap data (FF FF FF FF) that's located before the actual hex data is not supposed to be there when flashing it to the new chip? It's easy though trimming it down and saving it to a new S19 file with only the actual data from the F800-FFFF range.
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by slow_hemi6 »

I managed to get a look at mine this afternoon as well. I could view it through Hi Wave and I definitely have data from f800 to ffff. Mine has the same first 15 or so bytes but after that it is a bit different to what you have posted.
USBDM memory dump was useless for me too.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by racingmini_mtl »

slow_hemi6 wrote:... and I definitely have data from f800 to ffff...
Which is another proof that you did not just load the B&G code s19 file and that you are not using normally a chip without a serial monitor.

This is not meant as a personal attack (you may simply have forgotten what you actually did to get back to a working setup) but I want to dispel once and for all this idea that you can get back to a working MS2/Extra setup simply by loading the B&G s19 file on a blank CPU with a BDM.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
kim_gulle
Helpful MS/Extra'er
Posts: 88
Joined: Wed May 25, 2011 12:30 pm

Re: Blown Chip & Elusive Serial Monitor BDM File

Post by kim_gulle »

racingmini_mtl wrote:
slow_hemi6 wrote:... and I definitely have data from f800 to ffff...
Which is another proof that you did not just load the B&G code s19 file and that you are not using normally a chip without a serial monitor.

This is not meant as a personal attack (you may simply have forgotten what you actually did to get back to a working setup) but I want to dispel once and for all this idea that you can get back to a working MS2/Extra setup simply by loading the B&G s19 file on a blank CPU with a BDM.

Jean
Sooo... do i have the correct data?
Post Reply