Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Minimal downloading into Dallas Maxim DS89C450 ?

Status
Not open for further replies.

dxpwny

Advanced Member level 4
Full Member level 1
Joined
Jun 29, 2008
Messages
112
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Visit site
Activity points
2,480
I am working with a DS89C450 micro. I long ago wrote my own terminal program, which also has a built in downloader.

I got the MTK downloader, enabled debug, captured the commands it was sending, then wrote a function in my terminal program that does the same thing. I've used it for ages. Works fine.

Recently, I began work on another project that now has a large code file to download. I got cocky and thought I'd re-write my make file to create a minimal hex download file.

I compare the previous binary my compiler produced, to the one just produced. I then run the two bin files through a new program which only picks out the bytes that changed.

I end up with a smaller hex file to download.

I am sure my hex file is valid - I don't need any one to suggest I look at that, or to second guess my process. All set with that.

Now I wish to download a hex file which has only about 200 bytes - after I changed a few print statements in my code.

My original download algorithm sent the "K" command, followed by the "L" command. Now of course I don't want to erase the entire FLASH.

So, I removed the "K" and changed the "L" to a "LB". thinking that would do the trick based upon the LB command description of

"Load blind of internal flash memory—Loads standard Intel hex-formatted data into internal flash memory. This command functions in the same manner as the L command, except that the preprogramming assessment and post programming verification of the flash memory are not executed by the loader."

My download now doesn't work ... just hangs after the LB command.

Does anyone know if I am wrong on what I think the LB command does ?

Should it allow me to download a hex file representing only the bytes that changed in my most recent compile ... sort of "on top of" the already programmed FLASH in the micro ?

Thanks

- - - Updated - - -

OK ... little mistake. My download function now *appears* to run just has it had with the K and L commands ... no hanging ... AND ... I get the "G" response to all the hex I download.

Except upon reset, the code is not actually altered.

Hmmmmm.
 

Hi,

I'm not familiar with your controller, but I compare it with other flash devices.

Erasing a flash works in blocks or the entire chip.
Then all bits have the same state ( often : high).

This means a programming command can only clear the bits to low, but not to high again.

So a write without an erase before will be like a binary AND function of the previous memory content and the new value.


Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top