Home/Support/Support Forum/verify/read firmware writed into rabbit
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

verify/read firmware writed into rabbit

0 votes
Hi, I want to know if exist some way to read or verify the version/checksum of the (.bin) program writed into the rabbit (RCM3720)???

for example: for PIC microcontroller we can use a universal programmer, select the device family and read, so we knows the checksum of the firmware writed in the chip.

I want to know how do this...

asked Jul 7, 2016 in Rabbit Software by arponcedeleon New to the Community (1 point)

Please log in or register to answer this question.

2 Answers

0 votes
This might provide a good starting point for code to accomplish your goal. I used it with an RCM2200 (and I believe RCM2260) back with Dynamic C 8.61.

The fs_checksum_x() function came from FS2.LIB. Note that it skips over the UserBlock which might be at the top of flash 1 (IIRC, the RCM2250/RCM2260 had two 256K flash chips).

This will only work on boards with parallel flash, where the entire flash space is mapped into physical memory. For Dynamic C 10.72, take a look at Samples/RemoteProgramUpdate/verify_firmware.c.
word getProgChecksum() { #define CHECK_BLOCK_SIZE 2048U unsigned long checkaddr, bytestogo; unsigned int checklen; FSchecksum checksum; checksum = 0; bytestogo = ( ((unsigned long) prog_param.HPA.aaa.a.base) << 12) + prog_param.HPA.aaa.a.addr; checkaddr = 0; while (bytestogo) { checklen = (bytestogo > CHECK_BLOCK_SIZE ? CHECK_BLOCK_SIZE : (unsigned int) bytestogo); fs_checksum_x(&checksum, checkaddr, checklen); checkaddr += checklen; // skip over userblock if (checkaddr == (0x40000 - MAX_USERBLOCK_SIZE)) checkaddr += MAX_USERBLOCK_SIZE; bytestogo -= checklen; } return checksum; }
answered Jul 7, 2016 by TomCollins Veteran of the Digi Community (1,209 points)
0 votes


Working fine.
answered Nov 26 by arponcedeleon New to the Community (1 point)
(sorry, accidentally flagged this message, it's a video demonstrating the code)
I cleared the flag Tom.  No worries!
Contact a Digi expert and get started today! Contact Us