This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cross-compiling and building a simple Hello world application for running on Heterogenous architecture

I am new to ARM

I would like to cross-compile a simple Hello world c++ code for Linux distribution in order to debug and run it on my Hardkernel ODROID-XU4 board. For this purpose I'm following this tutorial https://developer.arm.com/tools-and-software/embedded/legacy-tools/ds-5-development-studio/resources/tutorials/linux-application-debugging-using-ds-5, however, instead of using the built-in compiler, I have downloaded the latest linaro gcc toolchain from this page https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads, I have windows 7 sp1. when I followed the steps mentioned in the tutorial, when I buit the project I encountered the following errors

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
11:32:29 **** Incremental Build of configuration Debug for project Hello_world_cpp ****
make all
'Building file: ../Hello_wolrd.cpp'
'Invoking: GCC C++ Compiler 8.3.0 [arm-eabi]'
arm-eabi-g++.exe -mfpu=vfpv4 -O0 -g -Wall -marm -mfloat-abi=hard -MMD -MP -MF"Hello_wolrd.d" -MT"Hello_wolrd.o" -c -o "Hello_wolrd.o" "../Hello_wolrd.cpp"
'Finished building: ../Hello_wolrd.cpp'
' '
'Building target: Hello_world_cpp.axf'
'Invoking: GCC C++ Linker 8.3.0 [arm-eabi]'
arm-eabi-g++.exe -o "Hello_world_cpp.axf" ./Hello_wolrd.o
e:/programs/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/bin/../lib/gcc/arm-eabi/8.3.0/../../../../arm-eabi/bin/ld.exe: error: ./Hello_wolrd.o uses VFP register arguments, Hello_world_cpp.axf does not
e:/programs/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/bin/../lib/gcc/arm-eabi/8.3.0/../../../../arm-eabi/bin/ld.exe: failed to merge target specific data of file ./Hello_wolrd.o
e:/programs/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/bin/../lib/gcc/arm-eabi/8.3.0/../../../../arm-eabi/bin/ld.exe: e:/programs/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/bin/../lib/gcc/arm-eabi/8.3.0\libc.a(lib_a-exit.o): in function `exit':
/tmp/dgboter/bbs/dsggnu-vm-1-x86_64--mingw32-i686/buildbot/mingw32-i686--arm-eabi/build/src/newlib-cygwin/newlib/libc/stdlib/exit.c:64: undefined reference to `_exit'
e:/programs/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/bin/../lib/gcc/arm-eabi/8.3.0/../../../../arm-eabi/bin/ld.exe: e:/programs/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/bin/../lib/gcc/arm-eabi/8.3.0\libc.a(lib_a-abort.o): in function `abort':
/tmp/dgboter/bbs/dsggnu-vm-1-x86_64--mingw32-i686/buildbot/mingw32-i686--arm-eabi/build/src/newlib-cygwin/newlib/libc/stdlib/abort.c:59: undefined reference to `_exit'
e:/programs/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/bin/../lib/gcc/arm-eabi/8.3.0/../../../../arm-eabi/bin/ld.exe: e:/programs/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/bin/../lib/gcc/arm-eabi/8.3.0\libc.a(lib_a-signalr.o): in function `_kill_r':
/tmp/dgboter/bbs/dsggnu-vm-1-x86_64--mingw32-i686/buildbot/mingw32-i686--arm-eabi/build/src/newlib-cygwin/newlib/libc/reent/signalr.c:53: undefined reference to `_kill'
e:/programs/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/bin/../lib/gcc/arm-eabi/8.3.0/../../../../arm-eabi/bin/ld.exe: e:/programs/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/bin/../lib/gcc/arm-eabi/8.3.0\libc.a(lib_a-signalr.o): in function `_getpid_r':
/tmp/dgboter/bbs/dsggnu-vm-1-x86_64--mingw32-i686/buildbot/mingw32-i686--arm-eabi/build/src/newlib-cygwin/newlib/libc/reent/signalr.c:83: undefined reference to `_getpid'
e:/programs/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/bin/../lib/gcc/arm-eabi/8.3.0/../../../../arm-eabi/bin/ld.exe: e:/programs/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/gcc-arm-8.3-2019.03-i686-mingw32-arm-eabi/bin/../lib/gcc/arm-eabi/8.3.0\libc.a(lib_a-sbrkr.o): in function `_sbrk_r':
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

How can solve this problem and build the program correctly and are the flages I'm using during compilation correct ?

0