Sorry, you need to enable JavaScript to visit this website.

Cross Compiling for Ubuntu and Zedboard

Unsolved
2 posts / 0 new
badrobit's picture
badrobit
Junior(0)
Cross Compiling for Ubuntu and Zedboard

I am working with an application written in C++ that I have compiling and running on Ubuntu 16.04.2 and I want to add something that will let me compile and run the application on our Zedboard. I try to use CMake where possible and I have created this toolchain file: 
# This is a CMAKE file used to describe the toolchain required

# for cross compiling for the Zedboard with the Zynq 7020.

 

# TODO: find a better way to do this.

include(CMakeForceCompiler)

 

# Provide a system name and path to the compilers.

set(CMAKE_SYSTEM_NAME Linux)

set(CMAKE_C_COMPILER arm-linux-gnueabi-gcc)

set(CMAKE_CXX_COMPILER arm-linux-gnueabi-g++)

 

# Set the root directory for the ARM toolchain

set(CMAKE_FIND_ROOT_PATH "/usr/arm-linux-gnueabi")

 

# Set how the root path should be used.

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)

set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

 

The goal is to allow for faster development to build the program and copy it over to the Zedboard and run it as an application. When I build the program and link it I have no issues. I then copy it over to the Zedboard and try to run it using ./app and I get the following error: 

 

-sh: ./app: No such file or directory

 

I am hoping someone can point me to where I am doing something incorrect. I have added the CMake file I use to generate the make files below: 

 

cmake_minimum_required(VERSION 3.0)

project("App")

 

add_executable( app "app.cpp" )

 

 

zedhed's picture
zedhed
Moderator(25)
RE: Cross Compiling for Ubuntu and Zedboard

Hi badrobit,

Ubuntu is a pretty fully featured version of Linux and we typically don't see that getting run on ZedBoard.

Which version of Linux are you running on ZedBoard?

Regards,

-Kevin