Hi,
We are working with IMX8M Mini based custom hardware.
when we are working with IMX8M Mini EVK, we build the toolchain and
for cross compiling and building our test application we sourced the following tools.
$ . /opt/fsl-imx-xwayland/4.9.51-mx8-ga/environment-setup-aarch64-poky-linux
our build is fine.
My question is IMX8M Mini is ARMv8 - 64bit arcchitecture.
We believe we can cross-compile and build our test application using aarch64-linux-gnu-gcc also.
we believe efficiency of the output file may vary.
considering the developmet hardware is IMX8M Mini based platform. Could you please suggest and recommend which cross compiler to use and why.
Thanks in Advance,
Sreedhar
已解决! 转到解答。
Hello,
Recent Linux BSP L4.19.35 supports the GCC 8.3 toolchain.
https://www.nxp.com/webapp/Download?colCode=L4.19.35_1.1.0_LINUX_DOCS
Generally it is possible to use different toolchains for simple applications, but using
the SDK approach is more preferable, since it provides proper environment for development.
Have a great day,
Yuri
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
Hi @sreedhar_appala @Yuri I am also working on iMX8M embedded board.
I have compiled the image and and cross compiling tool-chain for the same successfully using the bitbake meta-toolchain which has generated fsl-imx-xwayland-glibc-x86_64-meta-toolchain-aarch64-toolchain-4.14-sumo.sh to use for cross-compiling .c based project.
But I am not aware of how I can use it in makefile based project. Here is my simple make file which is generating .exe file for me.
# Compiler
CC = gcc
# Path to static library source (testlib.a)
LDFLAGS=-L../../testLIB/lib
LIBS=-lpthread
# C compiler flags (-c -Wall)
CFLAGS= -g -Wall
ifeq ($(OS),Windows_NT)
RM=cmd \/C del
else
RM=rm -f
endif
# Source files
SRCS = $(wildcard *.c)
# Object Files
OBJS = $(SRCS:.c=.o)
# Executable File
EXECUTABLE = targetImage.exe
.PHONY: depend clean
all: myprog
myprog: $(OBJS)
$(CC) $(CFLAGS) -o $(EXECUTABLE) $^ $(LDFLAGS) $(LIBS)
# Clean .o and .exe files form the respective directories
# make clean
clean:
$(RM) $(OBJS) $(EXECUTABLE)
# Read source files and create dependencies
depend: $(SRCS)
makedepend $(INCLUDES) $^
But now I want to update it to generate .exe which can be run on yocto board. Can you please guide my what I can I do to achieve the same Or if you can share me some examples or documents which I can refer to understand the same would be great help. Thanks in advance to both of you. Please let me know if I missed to add any other required info. I am very new to this and I am stuck with this step.
Hello,
Recent Linux BSP L4.19.35 supports the GCC 8.3 toolchain.
https://www.nxp.com/webapp/Download?colCode=L4.19.35_1.1.0_LINUX_DOCS
Generally it is possible to use different toolchains for simple applications, but using
the SDK approach is more preferable, since it provides proper environment for development.
Have a great day,
Yuri
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
Hi Yuri,
Thank you for the quick reply and details.
We are using linaro toolchain "gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu" earlier.
Do you have any benchmark details for the different tool chains atleast for the linaro based toolchains and SDK based environment.
My question is very generic, kindly let me know.
Thank you, Sreedhar