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.