Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12745 Discusiones

Running Optimization Flags for NiosV app and bsp

farah
Novato
2.761 Vistas

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?

0 kudos
1 Solución
wwanalim_intel
Empleados
2.600 Vistas

Hi,

 

This is from the NiosV Embedded Processor Design Handbook on page 81.

wwanalim_intel_0-1700022165286.png

 

This is from the NiosV Processor Software Developer Handbook on page 103.

wwanalim_intel_1-1700022228906.png

 

Thank you.

Regards,

 

Fathulnaim

 

Ver la solución en mensaje original publicado

8 Respuestas
wwanalim_intel
Empleados
2.713 Vistas

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


farah
Novato
2.702 Vistas

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

Oliver_I_Sedlacek
Nuevo Colaborador III
2.585 Vistas

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.

wwanalim_intel
Empleados
2.645 Vistas

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


farah
Novato
2.627 Vistas

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.

wwanalim_intel
Empleados
2.601 Vistas

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


wwanalim_intel
Empleados
2.601 Vistas

Hi,

 

This is from the NiosV Embedded Processor Design Handbook on page 81.

wwanalim_intel_0-1700022165286.png

 

This is from the NiosV Processor Software Developer Handbook on page 103.

wwanalim_intel_1-1700022228906.png

 

Thank you.

Regards,

 

Fathulnaim

 

wwanalim_intel
Empleados
2.547 Vistas


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.



Responder