• 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 » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » Looking for serial_flash_loader.bin source
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS
Helpful Stellaris® LM4F Series Links
  • LM4F Series
  • Stellaris PinMux Utility
  • Stellaris® LM4F120 LaunchPad
  • LM4F MCU Applications
  • LM4F MCU Video
  • ARM Cortex-M4F Whitepaper
  • Stellaris MCU Brochure
  • LM4F232 Eval Kit
  • Looking for serial_flash_loader.bin source

    Looking for serial_flash_loader.bin source

    This question is answered
    Glenn Stark
    Posted by Glenn Stark
    on Jun 09 2012 22:58 PM
    Prodigy30 points

    I would like the source code (project) for serial_flash_loader.bin.  Looked but could not find.  I would like to use the flash update in my code.

    Thanks!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Dave Wilson
      Posted by Dave Wilson
      on Jun 11 2012 09:33 AM
      Mastermind22830 points

      You don't mention which evaluation or development kit board you are working with (or which is closest to your own board project) but if you look in pretty much any StellarisWare release, you will find a directory called boot_loader that contains essentially the same code as is used in serial_flash_loader.bin (I'm assuming that you are talking about the flash loader that is installed on bare parts from the factory here). The boot_loader code contains more function and more customization options - it supports Ethernet, USB, serial and SSI update options via various switches - but does the same job.

      To see how to generate a boot loader image, look in the C:\StellarisWare\boards\<your-board> directory for examples named "boot_xxx" where "xxx" represents the communication type that is used in the firmware update. The "boot_serial" example will build a boot loader that accepts updates via the UART, for example. All these boot_xxx examples use the main source in C:\StellarisWare\boot_loader and customize the build via a file called bl_config.h which determines which boot_loader features to enable and sets parameters such as the base address of the downloaded application image.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Glenn Stark
      Posted by Glenn Stark
      on Jun 12 2012 09:38 AM
      Verified Answer
      Verified by Glenn Stark
      Prodigy30 points

      Thanks Dave,

      The board is lm3s2965, I used the top block of 64k flash as a flash updater for the other 3 blocks of 64k.  The main program in the lower blocks loads the SRAM with the new flash image (mine is <32k ALWAYS) and then calls the "ROM" in the top  of the flash.  ERASE-PROGRAM-VERIFY  and all is well.  

      I had a problem getting the long call to work, ended up just moving the address into the PC  to jump to the flash updater in high flash address.  Seems to always get a fault when the standard method is used.

      faults at the bx...

      asm("mov.w r4, #0x00030000");
      asm("mov lr, pc");
      asm("mov r15, r4");
      asm("bx r4");

      This works...

      asm("ldr r4, 0x30000");
      asm("mov r15, r4");

      one other way. faults also...

      ((void (*)(void))0x30000)();

      (using Crossworks RA)

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Glenn Stark
      Posted by Glenn Stark
      on Jun 12 2012 09:40 AM
      Prodigy30 points

      should have been

      faults at the bx...

      asm("mov.w r4, #0x00030000");
      asm("mov lr, pc");
      asm("bx r4");

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Dave Wilson
      Posted by Dave Wilson
      on Jun 12 2012 09:59 AM
      Suggested Answer
      Mastermind22830 points

      I strongly suspect the fault is because you are telling the Cortex-M3 to switch into ARM instruction mode. It doesn't support this so it gives up and faults on you. The "bx" instruction uses the least significant bit of the value in the register to indicate the target operating mode for the processor. If bit 0 is clear, it indicates ARM (32 bit instruction set) mode. If it is set, it indicates Thumb (16 bit instruction set) mode. I bet if you change your first line to "mov.w r4, #00030001" or add an instruction to set bit 0 of R4, this will start working.

      The reason your second example works is that your mov into pc (r15) doesn't bother checking bit 0 and trying to perform a mode switch the way bx does.

      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