- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I've been working with NIOS2 for few months now I use std_1c20 (from now on I am going to use self developed NIOS board). For NIOS2 environment I am using uClinux-dist-test 20060511, kernel 2.6.16, uClibc 0.9.27, gcc 3.4.6, binutils 2.15. I have build gcc (3.4.6 c++) NIOS2 compiler from build root environment and NIOS2 patches from nioswiki.jot.com (many thanks). Now the problem I have is that I am working on a uClibc mixed C and C++ application with POSIX ptread. For stdio/file IO I've been using C functions and not c++ stdio. Application builds correctly, but when I try to run it I get something like this in console:SIGSEGV
and BINFMT_FLAT: reference 0x680000 to shared library 53, killing maindemo!
in dmesg Application is definitely statically build so I don't know why I am getting error with shared library. I have checked that application is linked statical with nios2-linux-uclibc-nm. I've also checked: the stack, FLT header, rebuild gcc/g++ few times nothing helped http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif I have also successfully build an a little bit complex hello world using same libraries and it works but main application is not working. Otherwise the main application works on i686 Gentoo Linux. The reasons I thought of for my application not working are: - mixing C/C++ code in the same file (few people from Ecos suggest full C/C++ code separation) - bug in code not detectable on i386 arch (might be possible) - gcc (g++) compiler/linker ? Another question is there a debugger like strace or gdb I could use? Any kind of help or comments would be very appreciated. Uros
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The current Nios2 c++ compiler from our buildroot does not work. It can compile, but crashs when calling a c++ class function. But I am not a c++ user, and didn't know c++ function calling well, so I can not resolve it. I wonder if there are problems in memory allocation.
I know Microtronix's had resolved the problem and sell the c++ compiler. I think it should be GPL, but I didn't have access to them. Maybe you can try to get the compiler or source from them. Otherwise, you may trace the code of a c++ function call. Good luck, Hippo- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Many thanks Hippo for the fast answer, so I will probably tray Microtronix's compiler and I'll see.
Uros
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page