- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Solved! Go to Solution.
- Labels:
-
PSoC 4 Architecture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think it is not the .hex file checksum, but the checksum of the bytes in the programmed flash.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well..this is exactly what I mentioned in the beginning...but to no joy (o;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just a quick update...
Patched the original cypress_linux_tools so I can also develop and flash on OS X 😉