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

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby piledriver » Sun Feb 28, 2016 3:12 pm

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.
piledriver
Super MS/Extra'er
 
Posts: 1640
Joined: Tue Oct 27, 2009 6:24 am
Location: Van Alstyne, Texas

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby slow_hemi6 » Sun Feb 28, 2016 3:19 pm

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
User avatar
slow_hemi6
Super MS/Extra'er
 
Posts: 4120
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby racingmini_mtl » Sun Feb 28, 2016 5:02 pm

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
racingmini_mtl
Super MS/Extra'er
 
Posts: 8041
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby robs » Sun Feb 28, 2016 5:13 pm

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.
robs
Master MS/Extra'er
 
Posts: 518
Joined: Sun Jan 17, 2010 4:26 pm
Location: Sydney, Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby jsmcortina » Sun Feb 28, 2016 5:32 pm

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 supply, repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 34069
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby slow_hemi6 » Sun Feb 28, 2016 5:53 pm

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
User avatar
slow_hemi6
Super MS/Extra'er
 
Posts: 4120
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby jsmcortina » Sun Feb 28, 2016 5:59 pm

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 supply, repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 34069
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby slow_hemi6 » Sun Feb 28, 2016 6:02 pm

Fairly sure James. I linked to my 2013 posting about it. http://www.msextra.com/forums/viewtopic.php?p=361498#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
User avatar
slow_hemi6
Super MS/Extra'er
 
Posts: 4120
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby piledriver » Sun Feb 28, 2016 8:25 pm

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.
piledriver
Super MS/Extra'er
 
Posts: 1640
Joined: Tue Oct 27, 2009 6:24 am
Location: Van Alstyne, Texas

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby slow_hemi6 » Sun Feb 28, 2016 9:14 pm

I wish. It was totally unresponsive to the boot jumper as well.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
User avatar
slow_hemi6
Super MS/Extra'er
 
Posts: 4120
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby kim_gulle » Mon Feb 29, 2016 1:08 am

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: 79
Joined: Wed May 25, 2011 12:30 pm

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby kim_gulle » Sat Mar 05, 2016 1:59 am

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.
kim_gulle
Helpful MS/Extra'er
 
Posts: 79
Joined: Wed May 25, 2011 12:30 pm

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby DaveEFI » Sat Mar 05, 2016 5:21 am

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.
DaveEFI
Super MS/Extra'er
 
Posts: 2800
Joined: Sun Apr 15, 2012 12:55 am

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby robs » Sat Mar 05, 2016 9:25 pm

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.
robs
Master MS/Extra'er
 
Posts: 518
Joined: Sun Jan 17, 2010 4:26 pm
Location: Sydney, Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby kim_gulle » Sun Mar 06, 2016 1:53 am

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?
kim_gulle
Helpful MS/Extra'er
 
Posts: 79
Joined: Wed May 25, 2011 12:30 pm

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby robs » Sun Mar 06, 2016 3:45 pm

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.
robs
Master MS/Extra'er
 
Posts: 518
Joined: Sun Jan 17, 2010 4:26 pm
Location: Sydney, Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby kim_gulle » Mon Mar 07, 2016 2:35 am

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.
kim_gulle
Helpful MS/Extra'er
 
Posts: 79
Joined: Wed May 25, 2011 12:30 pm

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby slow_hemi6 » Mon Mar 07, 2016 5:32 am

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
User avatar
slow_hemi6
Super MS/Extra'er
 
Posts: 4120
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby racingmini_mtl » Mon Mar 07, 2016 9:18 am

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
racingmini_mtl
Super MS/Extra'er
 
Posts: 8041
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada

Re: Blown Chip & Elusive Serial Monitor BDM File

Postby kim_gulle » Mon Mar 07, 2016 11:06 am

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?
kim_gulle
Helpful MS/Extra'er
 
Posts: 79
Joined: Wed May 25, 2011 12:30 pm

PreviousNext

Return to MS2/Extra Development

Who is online

Users browsing this forum: No registered users and 1 guest