• 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 » C2000™ Microcontrollers » C2000 32-bit Microcontrollers Forum » How to load math libraries from flash into RAM after reset and power cycle?
Share
C2000™ Microcontrollers
  • Forums
  • Announcements
  • E2E Wiki
Options
  • Subscribe via RSS
C2000 Resources
  • Product Folder
  • C2000 Training Portal
  • C2000 Technical Training Catalog
  • C2000 Datasheets, App Notes, User Guides
  • C2000 Hardware Design Kits
  • controlSUITE for C2000 Software Library


  • InstaSPIN Resources
  • What is InstaSPIN?
  • Videos and Support


  • InstaSPIN-FOC and InstaSPIN-MOTION Resources
  • What is InstaSPIN-FOC?
  • What is InstaSPIN-MOTION?
  • InstaSPIN Simulation Tool
  • Product Folder: F28069F, F28068F, F28062F, F28068M, F28069M
  • User’s Guide
  • Technical User’s Manual
  • Tools
  • How to load math libraries from flash into RAM after reset and power cycle?

    How to load math libraries from flash into RAM after reset and power cycle?

    This question is answered
    Jeff Choate
    Posted by Jeff Choate
    on Apr 06 2012 17:38 PM
    Intellectual600 points

    Hello,

    I am fairly new to this, so please excuse any ignorant or seemingly stupid questions - I am still learning here (so be gentle!)  

    I have built an application on an F28335 eval kit.  I have built my system to boot from flash, and then I want to move a lot of the time critical routines into RAM.  I have managed to do that following the examples and documentation with no significant problems.

     However, as part of this, I also need to put the math libraries into RAM for quicker execution as well.  I have found the way to do that in the linker file is doing something like:

    .rts  { -lrts2800_fpu32.lib (.tex) }  >> RAML3,   PAGE = 0

    This works great for the initial running of the system, and everything runs fine when I start the application from the debugger.  However, when I power cycle the device, I would like it to immediately boot from flash, and begin running again (after re-initializing RAM properly).  However, that is not the case because of the math library.

    I move my own code sections into RAM using the memcopy command like is specified in the documentation - I do this as part of the init routine.  It looks something like this:

    (in linker file):

       ramfuncs            : LOAD = FLASHD, 
    RUN = RAML0,
    LOAD_START(_RamfuncsLoadStart),
    LOAD_END(_RamfuncsLoadEnd),
    RUN_START(_RamfuncsRunStart),
    PAGE = 0
    
    
    (in init code):
        memcpy(&RamfuncsRunStart,
    &RamfuncsLoadStart,
    &RamfuncsLoadEnd - &RamfuncsLoadStart);
    
    
    However, I cannot figure out how to move the library into RAM at run time in a similar manner.
    
    
    So my question is how would I affect the same copy from flash and into RAM after a reset or power cycle of the linked in library routines?   What is normally done about things
    like this?  If I leave the math library in flash and do not move it to RAM in the linker file, everything works splendidly and will come back after the power cycle.  I just cannot have
    the performance impact that this causes, so I need to move the libraries into RAM.
    
    
    Any help or suggestions would be greatly appreciated!  Thanks!
    
    
    -Jeff

    C2000 Flash boot RAM libraries
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Vishal_Coelho
      Posted by Vishal_Coelho
      on Apr 10 2012 10:11 AM
      Expert5855 points

      Hi Jeff,

      Im not sure(Im still looking) if there is a way to do this with the RTS library but if you are looking for faster math routines may I suggest using the FPUfastRTS library. You can find it in controlSUITE (www.ti.com/controlSUITE) under c:\ti\controlSUITE\libs\math\FPUfastRTS

      Regards,

      Vishal

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Paul Raine
      Posted by Paul Raine
      on May 15 2012 13:15 PM
      Intellectual310 points

      This post may help:-

      http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/183181/677051.aspx#677051

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jeff Choate
      Posted by Jeff Choate
      on May 15 2012 13:53 PM
      Verified Answer
      Verified by Jeff Choate
      Intellectual600 points

      Hi Paul,

      Thanks do much for the followup and suggestion.  I actually found that I could load the functions into RAM during the boot phase so that the copying and linking were unnecessary.

      I simply loaded in the file DSP28xxx_SectionCopy_nonBIOS.asm, and then during the code_start section in  DSP2833x_CodeStartBranch.asm,, instead of jumping directly to _c_int00 to start running, I call out to copy_sections, where I just copy the math directly to RAM.  After that I jump to _c_int00, and let it run from there.  Now there is no need for any subsequent copy, as it is all done during boot.

      Thanks for the suggestion though!

      -Jeff

      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