Compiling in docker container for connectCore8x

Hi…we’re trying to compile our c++ app in a docker container. Our ultimate goal is to automate our build process using AWS’s codepipeline and codebuild services. But, before we move our build script to the cloud, we’re trying to build a basic hello world app locally.

We’re using the following image for our container: digidotcom/dey:dey-3.2-r3. Our SOM is connectCore8x.

Inside the container is a hello_world directory with the following two files:
hello-world.c and a Makefile. These files came from this page.

Following this page, our build script sets up the ccimx8x-sbc-pro environment with the following lines:

mkdir -p ${HOME}/workspace/ccimx8x-sbc-pro
$ cd ${HOME}/workspace/ccimx8x-sbc-pro
$ source /usr/local/dey-3.2/ -p ccimx8x-sbc-pro
# from here we cd into our hello_world dir and run make
cd hello_world

While our build script doesn’t produce any errors, we noticed that the hello-world.o executable doesn’t run (it throws an error) on the our connectCore8x. But, it does run successfully on our local PC. This tells me that the make command is not picking up any environment variables/setting that allow our hello-world app to compile for connectCore’s arm64 architecture. Is make the wrong way to compile our app? Are we missing some steps? What is the correct way to go about building our app in a docker container?

Any assistance would be very helpful!

it sounds like you are compiling on host for host architecture. What do you get if you run command:
file hello_world
i bet you will see x86_64
you need to install an SDK/toolchain for cc8x and run a script that sets it up

Documented here: