cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

Anonymous
Not applicable

Good afternoon (o;

According to the "Bootloader and bootloadable datasheet" the application checksum is defined as:

"The basic summation checksum is computed by adding all the bytes (excluding the checksum) and then taking the 2’s complement ."

So for the SCB_Uart example it writes in the checksum field the byte 0x60...

But when I walk through the hex file and sum up all bytes I get "0x8F"...

Does "excluding the checksum" mean it includes the other meta fields at address 0x7FC0 as well like application length and so on?

0 Likes
1 Solution
Bob_Marlowe
Expert II

Bootloader datasheet says

Bootloadable Application Checksum:

This is the basic summation checksum that is computed by adding all the bytes of the bootloadable application image (excluding the metadata section)

Bob

View solution in original post

0 Likes
7 Replies
Bob_Marlowe
Expert II

I think it is not the .hex file checksum, but the checksum of the bytes in the programmed flash.

Bob

0 Likes
Anonymous
Not applicable

Well actually I did count only the payload inside the HEX file...so all of type "00" except the strange addresses referencing 0x90x0xxxx and so on..

0 Likes
Bob_Marlowe
Expert II

Bootloader datasheet says

Bootloadable Application Checksum:

This is the basic summation checksum that is computed by adding all the bytes of the bootloadable application image (excluding the metadata section)

Bob

View solution in original post

0 Likes
Anonymous
Not applicable

Well..this is exactly what I mentioned in the beginning...but to no joy (o;

0 Likes
Anonymous
Not applicable

Ah think I got it now...

Although you create a bootloadable file it includes the bootloader as well in the final HEX file...what a waste (o;

Nuc:psoc42xx me$ php checksum.php uart.hex

0F00:00100020110F0000CD100000CD10000008B5024B83F3088800F0DAF80010002010B572B68024E400221C0021264800F0A9FA221C0021254800F0A4FAEE22244B

...

...

7F80:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Final checksum: 160

Which then gives the expected final 0x60 value:

160 $ff xor 1 + hex. 00000060

0 Likes
Anonymous
Not applicable

Ah finally (o;

Was able to make a HEX file under Linux and program it successfully under Linux as well...at least the Blue LED stopped blinking (o;

So now onto debugging why my program doesn't run (o;

0 Likes
Anonymous
Not applicable

Just a quick update...

Patched the original cypress_linux_tools so I can also develop and flash on OS X 😉

0 Likes