• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » Tiva™ ARM® Microcontrollers » Tiva™ ARM® C Series Microcontrollers Forum » Firmware checksum
Share
Tiva™ ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS

Firmware checksum

Firmware checksum

This question is answered
Simon Thome
Posted by Simon Thome
on Mar 08 2012 05:24 AM
Intellectual545 points

Hi there,

I would like to implement a checksum into my firmware to verify the integrity of code prior to executing my main application, either using a simply byte sum or CRC checksum. Are there any tools available to calculate this checksum and inject it into a set location into Flash, after the applications has been compiled?

I would like to use this with Code Composer and the LM4F232H5QC.

thanks.

Stellaris Flash Code Composer Studio StellarisWare
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Stellaris Miles
    Posted by Stellaris Miles
    on Mar 11 2012 16:53 PM
    Verified Answer
    Verified by Simon Thome
    Intellectual1775 points

    Simon,

    I see from a post in the Code-Gen Tools forum that CGT can calculate CRC's across a single section.  That post was with regard to another processor but I'm guessing there is symmetry across CPU's (I apologize I don't have my tools available at the moment) but I'm not 100% positive.

    If the CRC over a single section is inadequate then it should be easy enough to reserve 4 bytes via your linker script and write a quick utility to calculate a CRC on your binary output. 

    --
    Miles

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Simon Thome
    Posted by Simon Thome
    on Mar 12 2012 03:38 AM
    Intellectual545 points

    Thanks Miles.

    I will require the entire Flash to have a checksum. I can ask our PC software guys to write me an app to do this.

    It would be a nice feature to add to CCS, I know IAR has one - it was a little tricky to setup and doesn't work well with software breakpoints, but once it's done its very handy.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Torsten Chase
    Posted by Torsten Chase
    on May 02 2012 13:06 PM
    Prodigy90 points

    Hello Miles,

    just to pick up on the post from you (11Mar12 4:53PM) - what you suggest in your second paragraph is exactly what I am trying to do:

    1. Reserve 4 bytes at the beginning of my code image preferably immediately following the intvect section.

    2. Use an external tool to calculate the CRC of the image (again, not including the intvects) and store it in the area that I reserved in (1).

    I have noticed however, that reserving the 4 dummy bytes using my linker script is trickier than I thought (compiler always wants to take it out because the four bytes aren't actually used in the code...

    I have looked through the TI documentation and web sites but I cannot find a good way to do this. Could you help?

    Thanks!

    TC

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • BrandonAzbell
    Posted by BrandonAzbell
    on May 19 2012 08:48 AM
    Guru55165 points

    Connecting this thread to another related one.

    http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/p/186296/672904.aspx#672904

    Brandon

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use