Running Optimization Flags for NiosV app and bsp - Running Optimization Flags for NiosV app and bsp
I am trying to condense my code to resolve a "can't place all RAM cells in design" compilation error and am new to the niosv processor. Is there a way to run optimization flags on both niosV application code along with bsp? I have looked through the niosv design handbook and I have been able to optimize my bsp by running niosv-bsp -c <path to settings.bsp> -qpf=<path to .qpf> --cmd="set_setting hal.make.cflags_optimization {-O2 -fno-tree-vectorize}" Is there a similar -O2 or -Os command that can be run using niosv-app? Or small c library support similar to niosii?
Replies:
Re: Running Optimization Flags for NiosV app and bsp
I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘ https://supporttickets.intel.com’ , view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.
Replies:
Re: Running Optimization Flags for NiosV app and bsp
Apologies for the thread hijack but I've been trying to respond to Fathulnaim on my own thread https://community.intel.com/t5/Nios-V-II-Embedded-Design-Suite/Debugger-wont-connect-to-NIOS-II-hello-world-on-Cyclone-GX/m-p/1544031#M52319 and I just can't. I'm so frustrated by the forum software and my problem isn't resolved. Please investigate why I can't post and please remove this post as I really, really don't like to hijack another user's thread.
Replies:
Re: Running Optimization Flags for NiosV app and bsp
Hi, This is from the NiosV Embedded Processor Design Handbook on page 81. This is from the NiosV Processor Software Developer Handbook on page 103. Thank you. Regards, Fathulnaim
Replies:
Re: Running Optimization Flags for NiosV app and bsp
Hi, It seems you need to download the latest version of the NiosV Embedded Processor Design Handbook to be able to see the part of the code footprint. Will attached below the part of the book which I refer to the downloaded version. https://www.intel.com/content/www/us/en/docs/programmable/726952/23-3/about-the-embedded-processor.html At the same time, you also can refer to the NiosV Processor Software Developer Handbook on this part. https://www.intel.com/content/www/us/en/docs/programmable/743810/23-3/reducing-code-footprint-in-embedded-systems.html
Replies:
Re: Running Optimization Flags for NiosV app and bsp
Hello, I have reviewed the NiosV embedded processor handbook and there is nothing in there about reducing code footprint or how to optimize (which is why I was referencing Nois II/added this post to the forum). Could you point me towards NiosV specific documentation on this topic? Thanks.
Replies:
Re: Running Optimization Flags for NiosV app and bsp
Hi, Yes, adding optimization on the bsp also optimizes the app code. Based on the link you provided above, it seems you referring to the NiosII handbook. For NiosV, you can get the information about the developing, debugging and optimizing embedded systems on the NiosV Embeded Processor Design Handbook which is on the below link. https://www.intel.com/content/www/us/en/docs/programmable/726952/23-3/about-the-embedded-processor.html
Replies:
Re: Running Optimization Flags for NiosV app and bsp
Hello, For more information, I looked at the sw/app/CMakeLists.txt and realized it does include "include(../bsp/toolchain.cmake)." Correct me if I am wrong, but this makes me believe that adding optimization on the bsp also optimizes the app code? I have tried adding additional flags according to the embedded design handbook. https://www.intel.com/content/www/us/en/docs/programmable/683689/current/reducing-the-code-footprint.html niosv-bsp -c <path to settings.bsp> -qpf=<path to .qpf> --cmd="set_setting hal.make.cflags_optimization {-Os}" --cmd="set_setting hal.enable_reduced_device_drivers" --cmd="set_setting hal.enable_lightweght_device_driver_api" (Note: it would not let me enable the small c library...) My application code is still rather large and I am curious if there is any additional flags or options for niosv
Replies:
Re: Running Optimization Flags for NiosV app and bsp
Hi, Greetings and welcome to Intel's forum. Please give me some time to check and get back to you with update. Thank you. Regards, Fathulnaim - 2023-11-08
external_document