MS2 extra ohjelmointi tyhjä siru

Keskustelu piirilevyistä, niiden ominaisuuksista, kokoamisesta ja testaamisesta.

Moderator: Masi_K

Post Reply
Tzepesh
Megasquirt aloittelija
Posts: 6
Joined: Sat Aug 24, 2013 11:39

MS2 extra ohjelmointi tyhjä siru

Post by Tzepesh »

Hei kaikki. Pyydän anteeksi minun kieli, käytän Google Translate. Olen rakentaa ms 2 ylimääräistä. Olen lukenut kaikki noin kierteet, mutta en ole varma, ymmärrän oikein. Tarvitsen askel askeleelta kuvaus miten ohjelma tyhjä siru.
Olen PE micro-USB BDM Multilink (USB-ML-12E) ja CodeWarrior.
Mitä olen ymmärtänyt: käyttää BDM kirjoittaa bootloader, sitten sarjakaapeli ja firmware kuormaimen alkuperäisestä ms 2 ylimääräistä.
Minulla ei ole bootloader-tiedosto. Olen CodeWarrior hankkeen bootloader Freescale sivuston, AN2548, mutta en tiedä miten muuttaa sitä. Olen laitteiston insinööri ja tiedämme hyvin vähän ohjelmointia.
Antakaa minulle askel askeleelta kuvaus siitä, mitä tehdä, ja tarvittavat tiedostot.
kiitos
Benkku
Megajumala
Posts: 1070
Joined: Sat Apr 16, 2005 18:06
Location: Riihimäki

Re: MS2 extra ohjelmointi tyhjä siru

Post by Benkku »

Googlen kääntämä 'suomi' on aivan hirveää.

Bespoke Motorola/Freescale processor contains monitor code 'as standard'.

So in single chip mode, one should load the MS2Extra bootloader code first, and then proceed normally with firmware update procedure.

Datasheet
1.5.1.3 Special Single-Chip Mode
This mode is used for debugging single-chip operation, boot-strapping, or security related operations. The background debug module BDM is active in this mode. The CPU executes a monitor program located in an on-chip ROM. BDM firmware is waiting for additional serial commands through the BKGD pin. There is no external bus after reset in this mode.

Certain MS2Extra release version packages, contain bootloader code in S19 format - for example now obsolete version 3.2.1.
Current 3.2.5 and previous 3.2.4 versions do not contain bootloader. Processors are now delivered in bootloader preprogrammed and serially differentiated - hence to prevent unauthorized usage of code in hardware other than licensed. Current software packages include MS2Extra loader application, which handles firmware loading.

As what comes to 'needed files', you should download beforementioned package version, from MSExtra site.
http://www.msextra.com/doc/auth.php?f=m ... es/release
and
'click here to confirm you are using licensed hardware and download your file'

Package S19 filename, which you should load is self explanatory.
Tzepesh
Megasquirt aloittelija
Posts: 6
Joined: Sat Aug 24, 2013 11:39

Re: MS2 extra ohjelmointi tyhjä siru

Post by Tzepesh »

Thank you for your support Benkku. I have downloaded the old firmware archives and found the bootstrap file. Now everything should be easy. I think a command like
"C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.3\prog\hiwave.exe" C:\Projects\Freescale\slider_hsc08\bin\Project.abs.s19 -Target=HCS08ICDCYCLMULT -CHIPMODE=9S08JM60
should write the S19 file to processor through P&E BDM (as found on the freescale forum). Now I have to complete the schematic, layout and produce the PCB. Back to work!
Tzepesh
Megasquirt aloittelija
Posts: 6
Joined: Sat Aug 24, 2013 11:39

Re: MS2 extra ohjelmointi tyhjä siru

Post by Tzepesh »

I have read a bit more and found this thread http://www.msextra.com/forums/viewtopic ... 91&t=42483
So, it seems that serial monitor must be burnt first using BDM (mon .s19), and then there might be two solutions: 1. install firmware 3. 2.1 which writes bootstrap first, and then writes firmware, or 2. also write bootstrap .s19 using BDM and them use firmware downloader for firmware.
Benkku
Megajumala
Posts: 1070
Joined: Sat Apr 16, 2005 18:06
Location: Riihimäki

Re: MS2 extra ohjelmointi tyhjä siru

Post by Benkku »

Monitor code is included in the CPU ROM already.
Tzepesh
Megasquirt aloittelija
Posts: 6
Joined: Sat Aug 24, 2013 11:39

Re: MS2 extra ohjelmointi tyhjä siru

Post by Tzepesh »

If the serial monitor is already on the chip, wouldn't it work to write the files from 3. 2.1 firmware (bootstrap and firmware) through serial using the loader from the same archive, and then use the firmware loader for the latest version? Doesn't the bootstrap remain in flash? Or is it necessary to write the bootstrap through BDM and then just use that latest firmware loader?
I have read that the microcontrollers do not have serial monitor on them, and this is why it is needed for accessing the serial interface for normal firmware, otherwise serial interface can not be accessed at all and not even the bootstrap can be written with the loader from 3. 2.1 . Do the bootstrap contain the configurations for activating the serial interface?

As I said, please excuse my lack of knowledge, reading about so many programs that must be in the flash really messes everything in my head and I also want to understand how all these softwares interact...
Benkku
Megajumala
Posts: 1070
Joined: Sat Apr 16, 2005 18:06
Location: Riihimäki

Re: MS2 extra ohjelmointi tyhjä siru

Post by Benkku »

Tzepesh wrote:I have read that the microcontrollers do not have serial monitor on them...
From where you did read that? I read that bespoked processor do contain serial monitor in ROM. See my post above, where i refered 'about the serial monitor' - for more information - read the linked Datasheet.

... and yes, it should program the 3.2.1 version bootstrap code to flash flawlessy.
Tzepesh
Megasquirt aloittelija
Posts: 6
Joined: Sat Aug 24, 2013 11:39

Re: MS2 extra ohjelmointi tyhjä siru

Post by Tzepesh »

for example, here http://www.msextra.com/forums/viewtopic ... 91&t=42483 at post 3 is said that the monitor from the freescale application note might not be good.
Here http://www.msextra.com/forums/viewtopic ... 01&t=27536 also is a discussion regarding the bootloader and serial monitor.
And here https://community.freescale.com/thread/66791 one more discussion on the freescale forum.

I believe the datasheet from your post above refers to another family of microcontrollers (mc9s12XDP512), not the one used on ms 2 (c64).

anyway, from the link in my post above the serial monitor file can be downloaded and used if missing, and then use the files from the older archive and everything should work.
Benkku
Megajumala
Posts: 1070
Joined: Sat Apr 16, 2005 18:06
Location: Riihimäki

Re: MS2 extra ohjelmointi tyhjä siru

Post by Benkku »

Standard serial monitor is perfectly capable of burning MS2 bootstrap code.
http://www.noicedebugger.com/help/an2548monitor.htm

<clip>
I believe the datasheet from your post above refers to another family of microcontrollers (mc9s12XDP512), not the one used on ms 2 (c64).
</clip>

Yes, it's for the newer XGate version, but otherwise should cover all 'memory' versions of bespoke 9S12 processor type ie. 512/384/256/128/64-Kbyte Flash
Tzepesh
Megasquirt aloittelija
Posts: 6
Joined: Sat Aug 24, 2013 11:39

Re: MS2 extra ohjelmointi tyhjä siru

Post by Tzepesh »

Interesting what you say. so BDM would not be necessary at all. Thank you for the explanation!
Post Reply