TBLCF, mcf5208 and dBUG

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TBLCF, mcf5208 and dBUG

2,788 Views
Radiofid
Contributor I
I have a custom board on MCF5208 microcontroller. It has BDM port, so I have asseblied TBLCF cable for it (thanks Daniel Malik), and made a program to control it - unfortunately, TBLCF dynamic link library on Windows failed to work, so I ported it to Linux, fixed some errors and now it works.

Now I'm able to read and write internal SRAM, registers. But I have no idea how to load a dBUG (or other similar bootloader) into target board. Does anybody knows what should I do to write dBUG binary into flash or RAM (on my board there is SDRAM 4 mbytes module)? Or may be there some other way to load image?

Can somebody recommend some other bootloaders?

Thanks in advance!

Valery.
Labels (1)
0 Kudos
2 Replies

355 Views
Marcia
Contributor I
Oh boy, have you got a lot of work to do......
 
Basic premise is:
1) Write flash programming kernel (or use source code from DBUG, which contains a flash programming capability), not forgetting to modify the source to erase/program your selected type of flash on your target board.
2) Download kernel into RAM on your board using your TBLCF
3) Open DBUG.S19 (or whatever) on your PC, parse the file, and create chunks of binary image
4) Download the chunks using TBLCF into some buffer ram on your board
5) Run the flash programming kernel on the board, you'll set the program running with your TBLCF
6) After successful erasure and blankcheck, pass the kernel chunks of code to flash into memory
7) Repeat until done, then verify.
 
Two thoughts spring to mind:
1) Daniel appeared to be so thorough - was there not a program/erase feature as part of the package? That would seem to be a minimum requirement.
2) Did you buy a M5208EVB - that should have come with a P&E Micro MultiLink for the CF. Would work with CF Flasher.
 
Finally, there are bootloaders and bootloaders. DBUG seems pretty reliable and has adequate features for my needs. I don't recall what bootloader shipped with the M5208EVB, was it from Intec? Or Steriod Micros??
 
Bye for now,
 
Marcia 
0 Kudos

355 Views
Radiofid
Contributor I
In package that Daniel Malik created there wasn't any program/erase features, that can work "out-of-the-box" - there only DLL, which I have tried to make work with my application, but it causes errors in LibUSB. So, I have been forced to recompile it.

I have no ability to buy evaluation board - in my location there is no companies, that sell it, and I can't order it from foreign countries - it will be toooooooo long to wait it. And many problems with customs. This problems applies also for P&E cable.

I have used CFInit to generate SDRAM init code (and it has been the same as I calculated by myself). It seems to work fine, but SDRAM's content isn't changing, when i write it and right after that read it. The init SDRAM code from CFInit is much more shorter than sequence to init it, described in MCF5208 datasheet. Now I use this sequence for 128Mbit SDRAM (2Mx16x4):

SDCS0 = 0x4000_0017
SDCFG1 = 0x5121_1400
SDCFG2 = 0x97B7_0000
SDCR = 0xC004_2002
(then refresh sequence goes twice)
SDMR = 0x008D_0000
(then clearing MODE_EN bit in SDCR and sets REF bit)


Does anybody have an example of working code, i'd be very glad if you post it here.
Thanks in advance!

Valery.
0 Kudos