• Announcements

    • bluehash

      Forum Upgrade   03/11/2017

      Hello Everyone, Thanks for being patient while the forums were being fixed and upgraded. Please see details and report issues in this thread. Thanks!

Search the Community

Showing results for tags 'optimization'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

  • Community Calendar

Found 2 results

  1. Here's a very interesting presentation about how modern compiler optimization may lead to unexpected results. This goes way beyond the failure of naive delay loops. http://www.eng.utah.edu/~cs5785/slides-f10/Dangerous+Optimizations.pdf If you ever relied on buffer indices wrapping around (integer overflow), this is a must read. There are many other scenarios discussed. For example I'm pretty sure I fell for this trap myself: volatile int buffer_ready; char buffer[BUF_SIZE]; void buffer_init() { for (size_t i = 0; i < BUF_SIZE; i++) buffer[i] = 0; buffer_ready = 1; } It probably works today. But it's a bug waiting to happen when I recompile with different optimization settings or a different compiler. (hint: buffer_ready=1 may be moved before the for loop because the loop does not affect any volatile location).
  2. Tiva/Stellaris programs were compiled with optimization -Os in Energia E0012. (Optimize for size). In Energia E0013 optimization is turned off for Tiva/Stellaris and CC3200. (-O0) How do I turn optimization back on in Energia E0013? I have been working on a Arduino/Energia library which has a timing critical interrupt handler. Of course there is the #pragma route to controlling optimization. But is there a way in the IDE, or in preferences.txt, is #pragma the preferred method. On a somewhat related note, are there any release notes for the new version (which might cover changes and how to handle them)? (e.g., where I could have found out about the change in optimization). I have looked around a bit and haven't found any kind of list of what is new. http://www.energia.nu/release.html only goes up through version 12. The readme on github doesn't even mention the CC3200 https://github.com/energia/Energia/blob/master/ReadMe.md After I had problems generating a listing in the new release I did discover that debugging information is turned off by default, and there is a new option for turning debugging information on/off (in File - Preferences). But haven't found anything similar for optimization. Thanks