Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

osiTypes.h : #Target endianness not specified

Hello,
I'm developping drivers for a PCI-6025E board on Qnx Momentics developpement suite 6.3. I'm trying to compile from a custom makefile.
I'm getting errors during compilation about the endianness of the target system.
The QNX developpement suite is running on WinXP and the board is on a  x86 platform target machine, the errors I'm getting are like this one and they concerns all the files including osiTypes.h :
 

make -k EXTRA_SUFFIXES=cpp all --file=U:/PFE/monprojet/QMakefile10494.tmp

QCC -g osiBus.cpp

In file included from osiBus.h:9,

from osiBus.cpp:10:

osiTypes.h:102: #error target endianness not specified

cc: C:/QNX630/host/win32/x86/usr/lib/gcc-lib/ntox86/2.95.3/cpp0 caught signal 33

make: *** [osiBus.o] Error 1

Any help or guidance will be welcomed.
Thank you.
0 Kudos
Message 1 of 17
(9,940 Views)

Hi hamza-

The comment directly above that line says:

/*
In your build project define
kLittleEndian=1
or
kBigEndian=1
to specify your platform's endianness
*/

You need to specify (in your OS Interface makefile) the endian-ness of your architecture by adding a define for one of the above-mentioned .

Hopefully this helps-

Tom W
National Instruments
0 Kudos
Message 2 of 17
(9,936 Views)

Thank you Tom for your answer,

I tried to do what you told me but it didn't work.

That's what I added at the beginning of the makefile :

ifndef

kLittleEndian

define kLittleEndian=1

endef

endif

But I still have the same errors. I think it's the correct way to define a constant, if it's the case can you please show me how?

Thank you.

0 Kudos
Message 3 of 17
(9,920 Views)

Hi hamza-

You need to pass the option as a compiler flag.  This section works well in the NI QNX OSinterface makefile:

#
# Compiler variales
#

CXX := g++
INCLUDE_FLAG := -I
CXX_OUTPUT_FLAG:= -o

CXXFLAGS += -c -DkLittleEndian=1
CXX_INCLUDES +=

Please give this a try and let me know if you're still having problems.

Thanks-

Tom W
National Instruments
0 Kudos
Message 4 of 17
(9,914 Views)

Hello Tom,

I added the line into my makefile and it seems that the problem is solved. Now I'm getting other errors that I don't understand.

Here they are :

make -k EXTRA_SUFFIXES=cpp all --file=U:/PFE/monprojet/QMakefile24539.tmp

QCC -g -o osiBus.cpp

cc: no files to process

make: *** [osiBus.o] Error 1

QCC -g -o tSTC.cpp

cc: no files to process

make: *** [tSTC.o] Error 1

QCC -g -o tESEries.cpp

cc: no files to process

make: *** [tESeries.o] Error 1

make: Target `all' not remade because of errors.

I joined the makefile to this message so you can have a close look at it and maybe you help about this.

Thank you for support.

Hamza

0 Kudos
Message 5 of 17
(9,907 Views)

Hi,

I'm also a beginner user of qnx momentics ide. When i first used it, the error "target endianness is not specified" appeared to me too. 

I don't change anything in the make file.   I give some try finally, i learned that it's because of project properties setting.

I opened the Project Properties--Qnx C/C++ Project---Compiler options window and write kLittleEndian=1 in the definition box. Perhaps your version and project type may be different from ours but there should be a similar adjustment.

Hope this help

0 Kudos
Message 6 of 17
(9,891 Views)
Thank you eesen for your help.
I did what you told me but without success. I added kLittleEndian=1 in the compiler definitions but I still got the same errors.
Do I have to change anythings in the osiTypes.h file or I should not modify it? Until now I didn't modify any of the provided NI files.
I have another question : In the makfile, do I have to use QCC or g++ for the compiler? I'm working with g++ to create the executable files and QCC to generate the objects file (I'm getting errors when I call g++ to generate objects files).
Thank you for your help.
0 Kudos
Message 7 of 17
(9,880 Views)

Hi hamza-

Your compiler and linker should most likely match- this might explain why QCC can not find the object files it requires (judging by the error messages you posted previously).  I would try setting them both to QCC and see if you have better luck.

Tom W
National Instruments
0 Kudos
Message 8 of 17
(9,875 Views)
did you write -lang-c++ to linker options?
0 Kudos
Message 9 of 17
(9,871 Views)
Thank you for your support guys,
 
I still got all the problems I was discussing before :
For the errors concerning the target endianness, I added in the compiler difinitions kLitlleEndian=1 but it didn't resolve the problem, I still got the same error.
But the error concerning the command for the compiler end the linker is gone, I'm using now QCC for both of them.
I commented the error message in osiTypes.h about the endianness just to see further compilation results. I compiled then I got the following errors about some missing files. here are the errors :

QCC -O osiBus.cpp

osiBus.cpp: In method `u32 iBus::get(unsigned int, unsigned int, tStatus * = 0)':

osiBus.cpp:31: `_isPCI' undeclared (first use this function)

osiBus.cpp:31: (Each undeclared identifier is reported only once

osiBus.cpp:31: for each function it appears in.)

osiBus.cpp: At top level:

osiBus.cpp:41: syntax error before `::'

osiBus.cpp:44: ANSI C++ forbids declaration `_physicalAddress' with no type

osiBus.cpp:45: ANSI C++ forbids declaration `_size' with no type

osiBus.cpp:46: parse error before `}'

cc: C:/QNX630/host/win32/x86/usr/lib/gcc-lib/ntox86/2.95.3/cc1plus caught signal 33

make: *** [osiBus.o] Error 1

The osiBus.cpp is the same file I downloaded from NI site. Looking at errors I think I should link some other header files. I added the path for all the includes I need for the project in the linker tab from project settings and still got the same errors. I copied the files in the same directory than the project and it worked but still got the same errors.

I need a list of all files that are necessary to build a project for developping drivers in QNX.

I was looking for the files concerning the DMA but I didn't find. Can you please tell me which one?

Tom, is the makefile I joined to my last message correct?

Thank you for your support, I need it too much.

 

0 Kudos
Message 10 of 17
(9,858 Views)