Girisha SG
07/27/2010 9:06 AM
post60717
|
We are using QNX OS on ARM Cortex A8 processor and we would like to use RVDS tool chain OR ARM compiler provided by ARM,
can we run the executables generated by these on QNX ?
|
|
|
Ryan Mansfield(deleted)
07/27/2010 9:42 AM
post60724
|
On 10-07-27 09:06 AM, Girisha SG wrote:
> We are using QNX OS on ARM Cortex A8 processor and we would like to use RVDS tool chain OR ARM compiler provided by
ARM, can we run the executables generated by these on QNX ?
AFAIK QNX is not an officially supported target of RVDS.
However since RVCT is an EABI compiler and generates AAPCS compatible
object code it might be possible to link against our ARM EABI variant
(armle-v7). RVCT it is not compatible with our armle variant. We have
never tested interoperability of RVCT with our gcc arm toolchains so
there are no guarantees this will work. You would probably have the best
luck using RVCT to generate the object code and then use qcc/GNU ld to
link your executables/shared object.
To use RVCT to generate code compatible with the QNX EABI armv7le
distribution, you'd need to use the following options: -enum-is_int
--apcs=/interwork/softfp --gnu --wchar32
--library-interface=aeabi_clib90 -I$QNX_TARGET/usr/include/
-D__LITTLEENDIAN__ -D__ARM__ -D__QNXNTO__ (and possibility others).
Hope this helps.
Regards,
Ryan Mansfield
|
|
|
Girisha SG
07/28/2010 1:16 AM
post60837
|
Thanks for the reply
When I try to compile using the following command
armcc -enum-is_int --apcs=/interwork/softfp --gnu --wchar32 --library-interface=aeabi_clib90 -I$QNX_TARGET/usr/include/
-D__LITTLEENDIAN__ -D__ARM__ -D__QNXNTO__ --cpu=Cortex-A8 Test.c
I am getting the following error
Warning: C3910W: Old syntax, please use '-E'.
Fatal error: C3900U: Unrecognized option '-num-is_int'.
I am using QNX momentics version 6.4.1 and RVDS version 4.1
Please let me know
|
|
|
Girisha SG
07/28/2010 6:57 AM
post60844
|
1. I am able to compile the code using,
armcc --enum_is_int --apcs=/interwork/softfp --gnu --wchar32 --library-interface=aeabi_clib90 -I$QNX_TARGET/usr/include
/ -D__LITTLEENDIAN__ -D__ARM__ -D__QNXNTO__ --cpu=Cortex-A8 Test.c
2. But when I try to link using,
ntoarm-gcc -o Test.exe Test.o
3. I am getting the following error
C:\QNX641\host\win32\x86\usr\bin/ntoarm-ld.exe: Warning: Test.o: Unknown EABI object attribute 34
C:\QNX641\host\win32\x86\usr\bin/ntoarm-ld.exe: ERROR: Source object Test.o has EABI version 5, but target Test.exe has
EABI version 0
|
|
|
Girisha SG
07/28/2010 7:19 AM
post60848
|
> 1. I am able to compile the code using,
> armcc --enum_is_int --apcs=/interwork/softfp --gnu --wchar32 --library-
> interface=aeabi_clib90 -I$QNX_TARGET/usr/include/ -D__LITTLEENDIAN__ -D__ARM__
> -D__QNXNTO__ --cpu=Cortex-A8 Test.c
>
> 2. But when I try to link using,
> ntoarm-gcc -o Test.exe Test.o
>
> 3. I am getting the following error
> C:\QNX641\host\win32\x86\usr\bin/ntoarm-ld.exe: Warning: Test.o: Unknown EABI
> object attribute 34
> C:\QNX641\host\win32\x86\usr\bin/ntoarm-ld.exe: ERROR: Source object Test.o
> has EABI version 5, but target Test.exe has EABI version 0
>
4. If I use qcc,
qcc -o Test.exe Test.o
C:\QNX641\host\win32\x86\usr\bin\ntox86-ld: Test.o: Relocations in generic ELF (EM: 40)
C:\QNX641\host\win32\x86\usr\bin\ntox86-ld: Test.o: Relocations in generic ELF (EM: 40)
Test.o: could not read symbols: File in wrong format
cc: C:/QNX641/host/win32/x86/usr/bin/ntox86-ld caught signal 1
I am getting the above error,
Any insights ???
|
|
|
Rodney Dowdall(deleted)
07/28/2010 8:51 AM
post60864
|
You need to use the -V option to specify the architecture to build
for, so qcc -Vnto_armle. If you just run qcc -V you will see all the
architectures listed.
The default is to build for x86.
Rodney
On 07/28/2010 07:19 AM, Girisha SG wrote:
>> 1. I am able to compile the code using,
>> armcc --enum_is_int --apcs=/interwork/softfp --gnu --wchar32 --library-
>> interface=aeabi_clib90 -I$QNX_TARGET/usr/include/ -D__LITTLEENDIAN__ -D__ARM__
>> -D__QNXNTO__ --cpu=Cortex-A8 Test.c
>>
>> 2. But when I try to link using,
>> ntoarm-gcc -o Test.exe Test.o
>>
>> 3. I am getting the following error
>> C:\QNX641\host\win32\x86\usr\bin/ntoarm-ld.exe: Warning: Test.o: Unknown EABI
>> object attribute 34
>> C:\QNX641\host\win32\x86\usr\bin/ntoarm-ld.exe: ERROR: Source object Test.o
>> has EABI version 5, but target Test.exe has EABI version 0
>>
> 4. If I use qcc,
> qcc -o Test.exe Test.o
> C:\QNX641\host\win32\x86\usr\bin\ntox86-ld: Test.o: Relocations in generic ELF (EM: 40)
> C:\QNX641\host\win32\x86\usr\bin\ntox86-ld: Test.o: Relocations in generic ELF (EM: 40)
> Test.o: could not read symbols: File in wrong format
> cc: C:/QNX641/host/win32/x86/usr/bin/ntox86-ld caught signal 1
>
> I am getting the above error,
>
> Any insights ???
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post60848
>
--
*Rodney Dowdall**
**Crank Software Inc.**
**Office*: *613-595-1999*
*Online*: *www.cranksoftware.com* <http://www.cranksoftware.com/>
*Check out*: *Crank Software's Blog* <http://cranksoftware.com/blog/>
*There is a better way to build user interfaces for embedded devices.
Download a 30 day evaluation
<http://www.cranksoftware.com/products/eval.php> of Crank Storyboard
Suite today!*
|
|
|
Ryan Mansfield(deleted)
07/28/2010 8:52 AM
post60865
|
On 10-07-28 07:19 AM, Girisha SG wrote:
>> 1. I am able to compile the code using,
>> armcc --enum_is_int --apcs=/interwork/softfp --gnu --wchar32 --library-
>> interface=aeabi_clib90 -I$QNX_TARGET/usr/include/ -D__LITTLEENDIAN__ -D__ARM__
>> -D__QNXNTO__ --cpu=Cortex-A8 Test.c
>>
>> 2. But when I try to link using,
>> ntoarm-gcc -o Test.exe Test.o
>>
>> 3. I am getting the following error
>> C:\QNX641\host\win32\x86\usr\bin/ntoarm-ld.exe: Warning: Test.o: Unknown EABI
>> object attribute 34
>> C:\QNX641\host\win32\x86\usr\bin/ntoarm-ld.exe: ERROR: Source object Test.o
>> has EABI version 5, but target Test.exe has EABI version 0
You're using the armle variant from 6.4.1. I said in my previous email
you cannot use this variant. You can only use the armle-v7 EABI variant
(only available in 6.5.0)
> 4. If I use qcc,
> qcc -o Test.exe Test.o
> C:\QNX641\host\win32\x86\usr\bin\ntox86-ld: Test.o: Relocations in generic ELF (EM: 40)
> C:\QNX641\host\win32\x86\usr\bin\ntox86-ld: Test.o: Relocations in generic ELF (EM: 40)
> Test.o: could not read symbols: File in wrong format
> cc: C:/QNX641/host/win32/x86/usr/bin/ntox86-ld caught signal 1
You're using the x86 linker. You would need qcc -Vgcc_ntoarmv7le.
Regards,
Ryan Mansfield
|
|
|
Girisha SG
07/28/2010 8:59 AM
post60869
|
Thanks,
Now I am getting the following error ...
qcc -Vgcc_ntoarmle -o Test.exe Test.o
C:\QNX641\host\win32\x86\usr\bin\ntoarm-ld: Warning: Test.o: Unknown EABI object
attribute 34
C:\QNX641\host\win32\x86\usr\bin\ntoarm-ld: ERROR: Source object Test.o has EABI
version 5, but target Test.exe has EABI version 0
C:\QNX641\host\win32\x86\usr\bin\ntoarm-ld: failed to merge target specific data
of file Test.o
cc: C:/QNX641/host/win32/x86/usr/bin/ntoarm-ld caught signal 1
|
|
|
Ryan Mansfield(deleted)
07/28/2010 9:02 AM
post60872
|
On 10-07-28 08:59 AM, Girisha SG wrote:
> Thanks,
>
> Now I am getting the following error ...
>
> qcc -Vgcc_ntoarmle -o Test.exe Test.o
> C:\QNX641\host\win32\x86\usr\bin\ntoarm-ld: Warning: Test.o: Unknown EABI object
> attribute 34
> C:\QNX641\host\win32\x86\usr\bin\ntoarm-ld: ERROR: Source object Test.o has EABI
> version 5, but target Test.exe has EABI version 0
> C:\QNX641\host\win32\x86\usr\bin\ntoarm-ld: failed to merge target specific data
> of file Test.o
> cc: C:/QNX641/host/win32/x86/usr/bin/ntoarm-ld caught signal 1
You _cannot_ use the armle variant. They are ABI incompatible. You must
use the armle-v7 variant in 6.5.0. If you are stuck using 6.4.1, you
will have to use gcc.
Regards,
Ryan Mansfield
|
|
|
Girisha SG
07/28/2010 9:07 AM
post60876
|
I could not understand can you please elaborate a bit on the previous point
i.e. "You _cannot_ use the armle variant. They are ABI incompatible. You must use the armle-v7 variant in 6.5.0. If you
are stuck using 6.4.1, you will have to use gcc."
As you have explained earlier I have compiled the source using armcc compiler version 4.1 and then used qcc as linker ..
.
can you please explain the steps to compile using armcc and linking using qcc and running on QNX
I am using momentics 6.4.1
|
|
|
Ryan Mansfield(deleted)
07/28/2010 9:10 AM
post60877
|
On 10-07-28 09:07 AM, Girisha SG wrote:
> I could not understand can you please elaborate a bit on the previous point
> i.e. "You _cannot_ use the armle variant. They are ABI incompatible. You must use the armle-v7 variant in 6.5.0. If
you are stuck using 6.4.1, you will have to use gcc."
>
> As you have explained earlier I have compiled the source using armcc compiler version 4.1 and then used qcc as linker
...
>
> can you please explain the steps to compile using armcc and linking using qcc and running on QNX
>
> I am using momentics 6.4.1
No, it will not work with 6.4.1. The binaries generated from armcc are
not compatible with the 6.4.1 armle distribution. They will are only
compatible with the armle-v7 distribution available in 6.5.0.
Regards,
Ryan Mansfield
|
|
|
Girisha SG
08/11/2010 1:39 AM
post62591
|
I prefer using QNX momentics for doing the above steps i.e. using RVDS to generate ABI compatible binary and use qcc for
linking it and making a static/dynamic library, please can anyone guide me through the steps for the same ?
|
|
|
Girisha SG
07/28/2010 9:29 AM
post60882
|
I ran it using 6.5.0 and -Vgcc_ntoarmlev7 option and I am getting the warning
/opt/qnx650/host/linux/x86/usr/bin/ntoarm-ld: Warning: Test.o: Unknown EABI object attribute 34
|
|
|
Ryan Mansfield(deleted)
07/28/2010 9:34 AM
post60886
|
On 10-07-28 09:29 AM, Girisha SG wrote:
> I ran it using 6.5.0 and -Vgcc_ntoarmlev7 option and I am getting the warning
>
> /opt/qnx650/host/linux/x86/usr/bin/ntoarm-ld: Warning: Test.o: Unknown EABI object attribute 34
armcc is emitting an new attribute tag that ntoarmv7-ld does not
understand. You can ignore the warning.
Regards,
Ryan Mansfield
|
|
|
Girisha SG
07/28/2010 9:40 AM
post60889
|
Thanks for all your support ... Finally it did work on the target !!!
|
|
|
Girisha SG
07/29/2010 5:08 AM
post61008
|
When I have the below statement in the code
unsigned char src[40000] = {10, 20, 30, 40, 50, 60, 70, 80};
I am getting the following error
qcc -Vgcc_ntoarmlev7 -o testneon TestNeonSupport.o
/opt/qnx650/host/linux/x86/usr/bin/ntoarm-ld: Warning: TestNeonSupport.o: Unknown EABI object attribute 34
TestNeonSupport.o: In function `main':
TestNeonSupport.c:(.text+0xac): undefined reference to `__aeabi_memclr4'
/opt/qnx650/host/linux/x86/usr/bin/ntoarm-ld: testneon: hidden symbol `__aeabi_memclr4' isn't defined
/opt/qnx650/host/linux/x86/usr/bin/ntoarm-ld: final link failed: Nonrepresentable section on output
cc: /opt/qnx650/host/linux/x86/usr/bin/ntoarm-ld error 1
this seems to be because compiler tries to initialize the uninitialzed elements of array 'src' using `__aeabi_memclr4'
instruction and fails.
1. Is there any way to get out of this kind of situations ?
2. Is the EABI support is in the very primitive state ?
3. If (2) is yes when will it be fully supported ?
|
|
|
Ryan Mansfield(deleted)
07/29/2010 8:57 AM
post61025
|
On 10-07-29 05:08 AM, Girisha SG wrote:
> When I have the below statement in the code
>
> unsigned char src[40000] = {10, 20, 30, 40, 50, 60, 70, 80};
>
> I am getting the following error
>
> qcc -Vgcc_ntoarmlev7 -o testneon TestNeonSupport.o
> /opt/qnx650/host/linux/x86/usr/bin/ntoarm-ld: Warning: TestNeonSupport.o: Unknown EABI object attribute 34
> TestNeonSupport.o: In function `main':
> TestNeonSupport.c:(.text+0xac): undefined reference to `__aeabi_memclr4'
> /opt/qnx650/host/linux/x86/usr/bin/ntoarm-ld: testneon: hidden symbol `__aeabi_memclr4' isn't defined
> /opt/qnx650/host/linux/x86/usr/bin/ntoarm-ld: final link failed: Nonrepresentable section on output
> cc: /opt/qnx650/host/linux/x86/usr/bin/ntoarm-ld error 1
>
> this seems to be because compiler tries to initialize the uninitialzed elements of array 'src' using `__aeabi_memclr4'
instruction and fails.
>
> 1. Is there any way to get out of this kind of situations ?
Yes, you can add a definition of it in your application or create a
library. e.g.
#include <string.h>
void __aeabi_memclr (void *dest, size_t n) {
memset( dest, 0, n );
}
void __aeabi_memclr4 () __attribute__ ((alias ("__aeabi_memclr")));
void __aeabi_memclr8 () __attribute__ ((alias ("__aeabi_memclr")));
> 2. Is the EABI support is in the very primitive state ?
Our system libraries follow the AAPCS ABI. However,we do not fully
implement the separate C library for ARM ABI which is what RVCT is
expecting.
> 3. If (2) is yes when will it be fully supported ?
Possibly in a future release.
Regards,
Ryan Mansfield
|
|
|
Girisha SG
08/20/2010 7:54 AM
post63688
|
I saw that RVDS and GNU generated binary are inter operable for Linux using the EABI technique. From this I understand
that binary generated by RVCT and GCC are completely compatible through EABI.
Does the qcc compiler provided by QNX has same functionality as that of GCC running on Linux, so that RVDS generated
object file and qcc generated object files can be linked and can be run on QNX successfully without any isue ?
|
|
|
Andy Jin(deleted)
08/20/2010 8:19 AM
post63690
|
Please post your question to the "general-toolchain" forum. IDE forum is for the IDE not compiler questions.
Thanks.
-----Original Message-----
From: Girisha SG [mailto:community-noreply@qnx.com]
Sent: Fri 20/08/2010 7:54 AM
To: general-ide
Subject: Re: RVDS support for QNX
I saw that RVDS and GNU generated binary are inter operable for Linux using the EABI technique. From this I understand
that binary generated by RVCT and GCC are completely compatible through EABI.
Does the qcc compiler provided by QNX has same functionality as that of GCC running on Linux, so that RVDS generated
object file and qcc generated object files can be linked and can be run on QNX successfully without any isue ?
|
|
|
Girisha SG
09/02/2010 6:05 AM
post65618
|
This is an extension to the previous questions, I have couple of questions related to RVDS(specifically armcc) and QNX,
1. Can you share any document that covers the exact incompatibilities ?
2. If we badly need RVDS to generate EABI compliant code and link it using ld then what is the best and safe approach ?
3. If you have efficient approach please suggest us.
We are planning to use RVDS and momentics for our optimization project and hence before starting we want to be clear
with all the incompatibilities and solution to overcome them.
|
|
|
Ryan Mansfield(deleted)
09/02/2010 11:52 AM
post65698
|
On 10-09-02 06:05 AM, Girisha SG wrote:
> This is an extension to the previous questions, I have couple of questions related to RVDS(specifically armcc) and QNX
,
> 1. Can you share any document that covers the exact incompatibilities ?
> 2. If we badly need RVDS to generate EABI compliant code and link it using ld then what is the best and safe approach
?
> 3. If you have efficient approach please suggest us.
>
> We are planning to use RVDS and momentics for our optimization project and hence before starting we want to be clear
with all the incompatibilities and solution to overcome them.
Again, as I've explained in previous posts. There is no official support
for RVDS. We will try to assist but you need to understand you're on
your own.
Regards,
Ryan Mansfield
|
|
|
Girisha SG
09/09/2010 9:05 AM
post66526
|
I have compiled the project using RVCT and used suggested EABI technique but I am getting the errors as shown in the
attachment.
Many of the functions are in the user defined header files and I have included them while compiling using -I option and
remaing are from the standard header file and thease are also included while compiling. I am getting these errors from
qcc while linking the object files generated by RVCT.
How can I resolve this ???
|
|
|
Girisha SG
09/13/2010 3:52 AM
post66903
|
Error log with some more errors ...
|
|
|
Girisha SG
09/13/2010 9:26 AM
post66929
|
A. When I compile the sources using RVCT into 4 seperate libraries a, b, c and d (EABI compatible object files are used
for these library generation) and one main application program that uses these libraries, I am able to generte the
executable by statically linking these libraries but when I ran on the target I am getting the following error,
Process 307216 (test.exe) terminated SIGSEGV code=1 fltno=11 ip=00102098(test.exe@_btext+0x1664) ref=0007fff8
Memory fault
B. If I compile each of them as an application I am getting the following errors while linking using ntoarm-ld
1. ..\private\OSAL\QNX\debug_support.c:(.text+0x104): undefined reference to `__aeabi_stderr'
2. ..\private\OSAL\QNX\debug_support.c:(.text+0x124): undefined reference to `__aeabi_SIG_DFL'
3. ..\private\OSAL\QNX\debug_support.c:(.text+0x128): undefined reference to `__aeabi_SIGINT'
4. firC16D16Dec.o: In function `firC16D16DecCh2_32':
..\private\firC16D16Dec.c:(.text+0x5c0): undefined reference to `Overflow'
5. flpOperations.o: In function `db2linear_flp':
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\flpOperations.c:1: undefined reference to `powf'
6. flpOperations.o: In function `linear2db_flp':
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\flpOperations.c:1: undefined reference to `_FLog'
7. iirC16D16O1.o: In function `global_init_IirC16D16O1':
..\private\iirC16D16O1.c:(.text+0x224): undefined reference to `Overflow'
8. C:\QNX650\host\win32\x86\usr\bin\ntoarm-ld: Dwarf Error: Could not find abbrev number 5218.
9. C:\QNX650\host\win32\x86\usr\bin\ntoarm-ld: Dwarf Error: mangled line number section (bad file number).
10. iirC16D16O1S1.o: In function `iirC16D16O1HS1Ch2':
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\iirC16D16
O1S1.c:1: undefined reference to `L_msu_16_32'
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\iirC16D16
O1S1.c:1: undefined reference to `L_msu_16_32'
iirC16D16O1S1.o: In function `L_mac':
..\private\iirC16D16O1S1.c:(.text+0x66c): undefined reference to `Overflow'
iirC16D16O2.o: In function `L_mac':
..\private\iirC16D16O2.c:(.text+0x2b0): undefined reference to `Overflow'
iirC16D16O2S1.o: In function `L_mac':
..\private\iirC16D16O2S1.c:(.text+0x604): undefined reference to `Overflow'
iirC16D32O1.o: In function `iirC16D32O1':
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\iirC16D32
O1.c:1: undefined reference to `L_mult_16_32'
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\iirC16D32
O1.c:1: undefined reference to `L_mac_16_32'
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\iirC16D32
O1.c:1: undefined reference to `L_msu_16_32'
iirC16D32O1.o: In function `iirC16D32O1Ch2':
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\iirC16D32
O1.c:1: undefined reference to `L_mult_16_32'
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\iirC16D32
O1.c:1: undefined reference to `L_mult_16_32'
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\iirC16D32
O1.c:1: undefined reference to `L_mac_16_32'
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\iirC16D32
O1.c:1: undefined reference to `L_mac_16_32'
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\iirC16D32
O1.c:1: undefined reference to `L_msu_16_32'
F:\RealViewWorkspaces\Workspace\BasicSignalProcessing\Debug/..\private\iirC16D32
O1.c:1: undefined reference to `L_msu_16_32'
meanAryD16.o: In function `meanAryD16':
..\private\meanAryD16.c:(.text+0x200): undefined reference to `Overflow'
C:\QNX650\host\win32\x86\usr\bin\ntoarm-ld: libBasicSignalProcessing_g.exe: hidd
en symbol `powf' isn't defined
(Included the necessary header files while compiling)
11. mmixer.o: In function...
View Full Message
|
|
|
Girisha SG
09/14/2010 3:25 AM
post67109
|
I have created the libraries and built the final executable by linking them.
I am getting SIGSEGV and when I try to debug the executable from QNX momentics I am getting the following errors in the
debug window.
.gdbinit: No such file or directory.
MsgNak received - resending
Remote target is little-endian
attach 28688
[New pid 28688 tid 1]
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
0x0103a974 in ?? ()
Cannot access memory at address 0xe7c1099c
warning: Host file C:/QNX650/target/qnx6/armle-v7/lib/libc.so.3 does not match target file.
|
|
|
|