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.
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?
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.
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.