Possible logic error in SCI bootloader template ?

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

Possible logic error in SCI bootloader template ?

1,650 Views
FTSolutions
Contributor III
I am building a custom bootloader using the example SCI bootloader application created by the processor expert/examples in CodeWarrior 5.6.1 for the MC56F8367 and MC56F8347 processors.  Examining the code, it appears that it waits for characters to arrive on the SCI interface, and reads in an S-Record with bootLoadSRecord().  It then
erases the flash and then enters a loop where it immediately reads in a second SRecord
with bootLoadSRecord() and writes that data to memory, but it has destroyed / lost whatever data was in the first S Record.  Depending on the format/type of the data in the first S-Record received, this could cause an error/problem, I think.  Has anyone encountered problems with this ?

Labels (1)
Tags (1)
0 Kudos
2 Replies

226 Views
trytohelp
NXP Employee
NXP Employee
Hi,
 
I don't know exactly the tool version used.
By default the bootloader will erase all the flash before to download the new application.
 
If you want to download several Srecord file we have a solution for that.
Please refer to the file attached.
Hope this will help you.
 
Pascal
 
Message Edited by t.dowe on 2009-10-15 05:42 PM
0 Kudos

226 Views
FTSolutions
Contributor III
I think that I have answered my own question - but this information may be of use to others so I mention it here..

The example bootloader created by the processor examples template makes a big assumption that the FIRST S Record downloaded to it is the HEADER (type S0 record),
which does not have any information that is needed or used to program flash.  So, as
long as the this first record downloaded is always a header record and not a data record, it should be OK that the example bootloader code just throws it away.  The Metrowerks tools appear to always create a header record in the output file, but for those who may use other tools, or who may have tools which post-process the output of the Metrowerks compiler should be aware of this. 


0 Kudos