Code::Blocks Forums

User forums => Help => Topic started by: metcenger on February 16, 2016, 08:47:51 am

Title: how to configure C::B for cross compiling to Linux-ARM from Windows?
Post by: metcenger on February 16, 2016, 08:47:51 am
Hello!
I want to work in a Windows and compile code for ARM-Linux.
1. Is it possible?
2. I dowloaded compiler gcc-linaro-4.9-2015.02-3-i686-mingw32_arm-linux-gnueabihf. Correct?
3. When I made empty project and configure C::B like on foto, I have mistake.
Can you help me to start with C:B?
(http://s017.radikal.ru/i420/1602/43/0d06368284a0t.jpg) (http://radikal.ru/fp/16abc6a5c47a45b9a4be2ef25a7de80b)
Title: Re: how to configure C::B for cross compiling to Linux-ARM from Windows?
Post by: stahta01 on February 16, 2016, 03:18:30 pm
http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)

Post a full build log.
Do NOT post images or link to images as the "build log"

Edit: The CB Arm Wizard is NOT a good way to create a Embedded Linux Arm CB Project!!

Tim S.
Title: Re: how to configure C::B for cross compiling to Linux-ARM from Windows?
Post by: metcenger on February 17, 2016, 07:54:43 am

-------------- Clean: Debug in tst2 (compiler: GNU GCC Compiler for ARM)---------------

Cleaned "tst2 - Debug"

-------------- Build: Debug in tst2 (compiler: GNU GCC Compiler for ARM)---------------

arm-linux-gnueabihf-gcc.exe -Wall -g -std=c99 -ID:\arman_work\CodeBlocks\test -c adau_fw_loader.c -o obj\Debug\adau_fw_loader.o
arm-linux-gnueabihf-gcc.exe  -o bin\Debug\tst2.exe obj\Debug\adau_fw_loader.o   
d:\arman_work\compiler_linaro\gcc-linaro-4.9-2015.02-3-i686-mingw32_arm-linux-gnueabihf\bin\../arm-linux-gnueabihf/libc/lib/libc.so.6: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 1 second(s))
1 error(s), 0 warning(s) (0 minute(s), 1 second(s))


Possible that I use not a correct compiller. Because I installed C::B on the Linux and use another Linaro for ARM-Linux Compiller and at this case all work correct.
Title: Re: how to configure C::B for cross compiling to Linux-ARM from Windows?
Post by: stahta01 on February 20, 2016, 06:13:35 pm
Edit: I am using Windows 7 32 bit for Testing.

Please post your CB config for "GNU GCC Compiler for ARM"

Note: I have never used the Linaro_Toolchain_arm-linux-gnueabihf compiler.

Compiler Installation Directory: C:\Program Files\Linaro_Toolchain_arm-linux-gnueabihf

Installed using linaro-toolchain-2015.02-3-arm-linux-gnueabihf.exe

CB Used: 16.01 SVN 10695

CB Compiler Edited: "GNU GCC Compiler for ARM"
C Compiler:             arm-linux-gnueabihf-gcc.exe
C++ Compiler:           arm-linux-gnueabihf-g++.exe
Linker Dynamic Libs:    arm-linux-gnueabihf-g++.exe  Edit2: Or arm-linux-gnueabihf-gcc.exe if only doing C.
Linker Static Libs:     arm-linux-gnueabihf-ar.exe

These locations are blank for me.
Linker Settings
Search Directories
Additional Paths


main.c
Code
#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Hello world!\n");
    return 0;
}

Code
-------------- Clean: Debug in testArm4c (compiler: GNU GCC Compiler for ARM)---------------

Cleaned "testArm4c - Debug"

-------------- Build: Debug in testArm4c (compiler: GNU GCC Compiler for ARM)---------------

arm-linux-gnueabihf-gcc.exe -Wall -std=c99 -g  -c main.c -o obj\Debug\main.o
arm-linux-gnueabihf-g++.exe  -o bin\Debug\testArm4c.exe obj\Debug\main.o   
Output file is bin\Debug\testArm4c.exe with size 10.30 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))

Tim S.