Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8120345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:08:16+00:00 2026-06-06T05:08:16+00:00

I am writing an algorithm using opencv library on an embedded processor (NIOS 2)

  • 0

I am writing an algorithm using opencv library on an embedded processor (NIOS 2) , in order to port the library to be compiled on nios :

1 – I removed highgui and all functions that deals with IO operations .

2 – I took the remaining files (which are many) and added them to a new eclipse project along with my main.cpp.

3 – I can compile the code and run it fine but the main problem is that the output file which will be downloaded to the embedded processor (.elf file) is too large ~20 MBs with no optimization and ~6 MBs with optimization level 3.

Are there any tips to compile only the needed files in this large project and skip other files that I don’t call in my code ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:08:19+00:00Added an answer on June 6, 2026 at 5:08 am

    The linker already strips out things that simply can’t be called, assuming you are building a normal executable binary with a main().

    If you know certain files aren’t used at all, then remove them from the project. Any errors that result should tell you how they actually could be called, and you need to remove the code paths that could lead there.

    You might use -Os to optimize for size rather than -O3, but I don’t know how much difference there is on the NIOS platform, where (unless things have changed radically) optimization for size is always essential.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a parallel evolutionary algorithm library using C++, MPI and CUDA. I need
I am writing an algorithm to represent regression trees, using pydot module (an interface
I am writing a unification algorithm in F# for use with AST transformations using
I am writing a paper and implemented an algorithm using OpenMP. Since Visual Studio
I'm writing an encoding/decoding .COM program using Huffman algorithm for dos 8086 (16-bit tasm
I need a help in writing the algorithm remove nodes Bezier curve. Using cubic
I'm writing an algorithm that iterates over a list of points, calculates the distance
I am writing an algorithm to count the number of bars have passed since
I'm writing a search algorithm in C++, and one of the things I need
Lets say I am writing Dijkstra's Algorithm , and I have a priority queue

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.