Codewarrior Target Tasks Checksum question

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

Codewarrior Target Tasks Checksum question

Jump to solution
1,004 Views
kriske
Contributor II

I want use Codewarrior Target Tasks Checksum function, but I have some question.

 

I have read CWCFUG file 3.11.2.3.3 Checksum actions and did the same. but it's show some issue.

 

Does have any document more details about the checksum function what are the difference between the file on Target and file on host?

 

And I use the checksum with Memory Range function, but it's show below issue.

 

 

fl::target -lc "MKL25_pwm_FLASH_OpenSDA"

fl::target -b 0x0 0xffffffff

fl::target -v off -l off

cmdwin::fl::device -d "FTFA_PFlash128S1RAM16" -o "32Kx32x1" -a 0x0 0x1ffff

cmdwin::fl::image -f "C:\\Users\\Kriske\\workspace\\MKL25_pwm\\FLASH\\MKL25_pwm.hex" -t "Auto Detect" -re off -oe on -o 0xffffffff

cmdwin::fl::checksum -dev

-------------------------

Error:  Couldn't write flash driver to target.  Flash Utility is Not Linked To Zero. Target Memeory Buffer Address0x00000000 Should Match First Address ( 0x1ffff000 of the Flash Utility Driver.

Error: Couldn't write flash driver to target.Flash Utility is Not Linked To Zero. Target Memeory Buffer Address0x00000000 Should M

atch First Address ( 0x1ffff000 of the Flash Utility Driver.

 

73679_73679.png0002.png

Labels (1)
Tags (2)
0 Kudos
1 Solution
697 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Kris,

The reason there is a difference between these options is because the File on Host and File on Target options compute the checksum over the flash section where the application was written and the Memory Range and Entire Flash options are computing the checksum over the entire flash.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

View solution in original post

0 Kudos
5 Replies
697 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Kris,

The error you get happens because of the Target RAM address and size set in the Target Task, I see you set the address to 0x0 and a size of 0xffffffff, please update the address to 0x1ffff000 and the size to 0x4000, after this change you should not get any error:

pastedImage_0.png

Regarding the "Compute Checksum Over" options, these options indicate over which file the checksum will be computed, the host file, the target file, the specified memory range or the entire flash memory. You can find more detailed information on the chapter 4.5.18 fl::checksum of the "CodeWarrior Development Studio Common Features Guide" document (C:\Freescale\CW MCU v10.6\MCU\Help\PDF\CodeWarrior Common Features Guide.pdf).

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
697 Views
kriske
Contributor II

Hi Carlos

Where is the explanation for “target on host”, “target on file” in this file?

The chapter 4.5.18 fl::checksum is a general info that is not for “checksum mechanism”.

BTW, the 3.11.2.3.3 Checksum actions just simple explanation the Checksum actions not more detail information about the “target on host”, “target on file”.

And I try the function, I see the Checksum have some difference, why it have the difference?

未命名.png

Kris

0 Kudos
697 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Kris,

The difference between the two options is the following:

File on Target: This option will calculate the checksum based on the MCU memory contents.

File on Host: This option will compute the checksum based on the corresponding binary file contents.

Both of the checksums should be the same, what I can think of is that the file that you are using as base to compute the checksum is not the same file that was programmed to the MCU and that is why you get a different checksum.

Here is a test I did, first I program the MCU, then I perform the file on target checksum and finally the file on host checksum:

pastedImage_0.png

Could you send me the MKL25_pwm.hex file so I can test it on my side?

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

0 Kudos
697 Views
kriske
Contributor II

Hi Carlos

I use the Kinetis Example Projects GPIO for KL25 to try checksum again.003.png

I try File on Target, File on Host, memory range and the entire flash memory function get information.

I see the File on Target and File on Host result is difference with memory range and the entire flash, Is it right?

Could you help to explain why it have different checksum result?

001.png

002.png

0 Kudos
698 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Kris,

The reason there is a difference between these options is because the File on Host and File on Target options compute the checksum over the flash section where the application was written and the Memory Range and Entire Flash options are computing the checksum over the entire flash.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

0 Kudos