- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We develop Nios code in a mixed-os environment using Nios 2 IDE version 9.0 sp2. Recently, I needed to debug some running code using attach mode on a windows laptop and could not get the debugger to recognize the addresses in the running binary (built on linux). After some experimentation, I discovered that the Windows and Linux editions of the same version create quite different binaries from identical code and project settings. As a sanity check, I verified that different Linux machines create identical binaries from identical code and that I was able to attach to binaries built by a different machine. I also noticed that the windows nios2-elf-gcc reports a different build from the linux nios2-elf-gcc (b111 vs b132, respectively).
Is there anything I can do to get the Win/Linux versions on the same page? It is desirable to debug using a laptop, and this situation makes it impossible to do it natively. Also, has this problem perhaps been addressed in newer versions of the Nios2 tools? Thanks for your help, -AJPLink Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How different are the object files?
I don't believe the gcc code has changed recently, so maybe you are passing different options to the compiler. However you may need to sort out how to copy the program you built on linux over to the laptop for debugging. (This relies on you being able to run the debugger without reruning the compiler.)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I never looked at the intermediate objects directly, so I don't know about the differences at that stage.
As for the completed elfs, it's kinda difficult to quantify how different they are but the windows debugger couldn't make heads or tails of any of the addresses it was getting from the running binary. I diffed the objdumps and noticed significant differences in the asm generated. The 9.0 nios build scripts don't show the full command when building each file. I used the same project files on both Windows and Linux though, so wouldn't it stand to reason that the nios build scripts would use the same settings? If there is any other info I can provide, let me know! Thanks :-)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page