Quantcast
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: calaculating CRC checksum over all of code space

Well shame on you for "lifting" code from an IAR App note - if you were a BLE Stack codelifter, you would have saved some time and trouble (I know - but you didn't know where to shop in all of that code).

Check this out:

C:\Texas Instruments\BLE-CC254x-1.2.1\Projects\ble\SBL\app\sbl_exec.c

As you will see, all of that messy stuff with MEMCTR and FMAP and whatever other 8051 register dragons need to be slain is nicely and neatly all done for you with the HalFlashRead(). You will also see how to control the areas that IAR adds to the CRC with the linker file for this:

C:\Texas Instruments\BLE-CC254x-1.2.1\Projects\ble\common\cc2540\cc254x_f256_sbl.xcl

Remember - you cannot include things like the OSAL SNV pages in the CRC or it will never match - the BLE stack is changing values in it even if your Application code is not.

 

 

 


Viewing all articles
Browse latest Browse all 116964

Trending Articles