Hi,
I am a new TI Sitara user for an embedded project. I have installed Sitara Linux SDK, which has the Linaro Toolchain. I want to use NE10 simply for DSP algorithm. Thus, it needs to set variable
GNULINUX_PLATFORM? (But I do not know how to set it)
It is not directly for Android. Excuse me for this non-Android question because I cannot find other appropriate forum for that.
After export the path:
SDK_INSTALL_DIR=$HOME/ti-sdk-am335x-evm-06.00.00.00
export PATH="$SDK_INSTALL_DIR/linux-devkit/sysroots/i686-arago-linux/usr/bin:$PATH"
the toolchain is verified that I can run it by:
But I still cannot build the NE10 library, please see the below message. I am new to GCC environment. Could you give me more detail information on Cmake or something other modification needed?
Regards,
........................
robert@robert-M5100:~/projectNe10-Ne10-4167142/build$ make
[ 1%] Building C object modules/CMakeFiles/NE10.dir/math/NE10_abs.c.o
cc1: error: unrecognized command line option ‘-mthumb-interwork’
cc1: error: unrecognized command line option ‘-mthumb’
cc1: error: unrecognized command line option ‘-mfpu=vfp3’
/home/robert/projectNe10-Ne10-4167142/modules/math/NE10_abs.c:1:0: error: bad value (armv7-a) for -march= switch
make[2]: *** [modules/CMakeFiles/NE10.dir/math/NE10_abs.c.o] Error 1
make[1]: *** [modules/CMakeFiles/NE10.dir/all] Error 2
make: *** [all] Error 2
robert@robert-M5100:~/projectNe10-Ne10-4167142/build$ cmake -DCMAKE_TOOLCHAIN_FILE=../config.cmake ..
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_TOOLCHAIN_FILE
-- Build files have been written to: /home/robert/projectNe10-Ne10-4167142/build
robert@robert-M5100:~/projectNe10-Ne10-4167142/build$
Hello, ARM experts:
I find more information about my question. I notice that TI Sitara uses
arm-linux-gnueabihf-gcc version 4.7.3
while on this website NE10 is compiled by
arm-linux-gnueabi-gcc version 4.6
I do not know whether there will be problem if compiling NE10 library mixed using 4.6 version arm-linux-gnueabi-gcc, later this library with TI Sitara 4.7.3 for application compiling.
I would like to use TI Sitara 4.7.3 for the application because I have to use the hardware emulator for the application debug later. Then, if the above mixed using library and application not allowed, how to modify the make NE10 library configuration file for the TI used arm-linux-gnueabihf-gcc compiler?
What is your suggestion for my problem?
Thanks in advance.
BTW, I work on NE10 in Ubuntu 12.04 LTS now.
I am still trying to compile NE10 library. First of all, I think Ubuntu/Linaro gcc 4.7.3 toolchain works in Ubuntu 12.04 LTS. Now, I want to use Android Emulator to simplify problems without considering any TI tool here. I want to generate NE10 library for the general Android use in the post.
When I run
arm-linux-gnueabi-gcc
it looks for input file. I think the Linaro Toolchain works now. cMake also works after installed it.
CMakeBuilding.txt under folder Home/projectNe10-Ne10-4167142/doc says that
make
I do not know what I should modify in GNUlinux_config.cmake to generate the library. (Or, I can use GNUlinux_config.cmake directly?)
When I run the above commands, it says:
robert@robert-M5100:~/projectNe10-Ne10-4167142/build$ cmake -DCMAKE_TOOLCHAIN_FILE=../GNUlinux_config.cmake ..-- Configuring done-- Generating doneCMake Warning: Manually-specified variables were not used by the project:
Is the above right considering the warning? What causes the warning?
When I continue to run "make", it has errors:
What is wrong in the library building? Could you help me?
I notice that in link:Ne10 Library Getting Started says
$cmake -DCMAKE_TOOLCHAIN_FILE=../config.cmake ..
but I cannot see config.cmake file there.
There is a file under folder Home/projectNe10-Ne10-4167142/ named GNUlinux_config.cmake. But, I do not know what I should/must to modify to use Ubuntu Linaro toolchain.
Thanks,
Hello yangzhang and zyu
Good morning, could you please help ruwan2 with his Ne10 questions?
Thank you.
Best Regards,
Ben
Thanks for taking care of my problems.
I propose my new discoveries first.
After some time testing, I suspect that the make calls the wrong gcc for unknown reasons. I have the following version number for gcc and
arm-linux-gnueabi-gcc.
If my suspect is correct, I do not know how to remove the wrong arm-linux-gnueabi-gcc. Then, where and how to install the correct arm-linux-gnueabi-gcc?
robert@robert-M5100:~/projectNe10-Ne10-4167142$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
robert@robert-M5100:~/projectNe10-Ne10-4167142$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
cmake version is 2.8.7. Is it OK?
Maybe there are some other things wrong. Please point it out if you know.
Hi
I think you need to modify the "GNUlinux_config.cmake" according to your toolchain.
Currently the hard float support has been added into Ne10 library.
Take hard float Linaro gcc 4.8 as an example, you need to do:
1. modify the "GNUlinux_config.cmake"
set(GNULINUX_PLATFORM ON)
set(CMAKE_C_COMPILER arm-linux-gnueabi-gcc) ===>>>set(CMAKE_C_COMPILER \your_toolchain_path\arm-linux-gnueabihf-gcc) set(CMAKE_CXX_COMPILER arm-linux-gnueabi-g++) ===>>>set(CMAKE_CXX_COMPILER \your_toolchain_path\arm-linux-gnueabihf-g++)
set(CMAKE_ASM_COMPILER arm-linux-gnueabi-as)===>>>set(CMAKE_ASM_COMPILER \your_toolchain_path\arm-linux-gnueabihf-as)
find_program(CMAKE_AR NAMES "arm-linux-gnueabi-ar") ===>>>find_program(CMAKE_AR NAMES "\your_toolchain_path\arm-linux-gnueabihf-ar") mark_as_advanced(CMAKE_AR)
find_program(CMAKE_RANLIB NAMES "arm-linux-gnueabi-ranlib") ===>>>find_program(CMAKE_RANLIB NAMES "\your_toolchain_path\arm-linux-gnueabihf-ranlib")
mark_as_advanced(CMAKE_RANLIB)
2. build Ne10 with cmake
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../GNUlinux_config.cmake ..
Note: if you are building for Android, you need to add -DNE10_ARM_HARD_FLOAT=ON
then the Ne10 library is built