Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Is there anyway to combine 2 .elf files together ?

Status
Not open for further replies.

beginner_EDA

Full Member level 4
Full Member level 4
Joined
Aug 14, 2013
Messages
191
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Visit site
Activity points
3,854
Hi,
For design UDP offload example, I have 2 .elf files (1 for Nichestack TCP/IP and 1 for application program like setting base addresses of MAC/IP/UDP) from NIOS II Eclipse.

I tried to combine both programs into 1 program and compiled to generate just 1 .elf file but unfortunately it doesn't work. What I did: I removed main() from application program and defined a header file for application program and include this header file both in application program and program for Nichestack TCP/IP containing main(). but unfortunately it doesn't work.

So, I decided lets them to be separate as it works fine.

Therefore, I am looking if there any way to combine these 2 generated .elf file together?

or is there any alternative for this problem?
 

Combining two ELFs that have an entrypoint defined like main() is not possible. The reason for this is that they were built as independent executables meant to run on their own and aside from main() don't export symbols for further linking, so you'd never be able to resolve functions calls.

I'm not familiar with the Nichestack code but most stacks' source code tree is structured in such a way as to be able to build a subset of the source as a library, or just a bunch of individual object files, for inclusion into another application.

- Jayson
 
  • Like
Reactions: dpaul

    dpaul

    Points: 2
    Helpful Answer Positive Rating
Hi Jayson,
Thanks for reply.
I would like to know, whether following is feasible or not:
My main aim is to program 3 files (1 .sof file and 2 .elf files mentioned above) permanently on Altera DE2-115 board. I can use following method for this purpose (by converting 2 .elf files and add both of them instead of just 1).

http://www.altera.com/support/kdb/solutions/rd04112006_450.html

but unfortunately I can't test now because the .sof generated in my case is "time limited" and can not be convert into .pof file due to licence issue. I will buy the licence when I am sure that it is working.

Could anybody please explain about the feasibility in this way?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top