- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the easiest way with NIOS II EDS 10.1sp1 to setup the auto-generated Makefile to optimize a single file? By default the project has optimization turned off, but I'd like to enable it on a single file to check the performance.
I've tried using the optimize attribute directive, but that is getting ignored. Same with a gcc# pragma. Is there a way to do this without having to roll the file into a library? Thanks.Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Personally I'd use -O2 (or -O3) all the time, unless I really suspect a compiler bug.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm doing a lot of debugging, so I don't want to optimize the entire project yet. I just want to optimize one file so I can determine how the optimization level affects the performance of one of the functions. Is there a way to do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Assuming you don't want to be writing your own makefiles I'm guessing this would work:
1) Compile the code you want optimized as a library with -O2/3 and other flags 2) Associate the compiled library to your project 3) Compile the entire project using -O0 There might be other ways to do this..... this seemed like the simplest way to me.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to do that right now, but the SBT doesn't give me the option to set the optimization flags with the library. Either I'm doing something wrong, or the "New Library" path does not following the documentation at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well that was weird. Now the library is showing up like I would have expected all along. Now I can see if the optimization of this file will help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have never created a library in the GUI but if that doesn't work you can always do that from the command line.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page