GithubHelp home page GithubHelp logo

cmakemodules's Introduction

cmakeModules

This repository contains helpful CMake modules for a variety of Xilinx build flows.

Current release

The current release is meant to be used with the Xilinx Vitis 2022.1 tools.

There are two main toolchains:

(1) Vitis cross compiler toolchain (toolchain_vitis_crosscomp_arm.cmake)

(2) Clang cross compiler toolchain (toolchain_clang_crosscomp_arm.cmake)

The toolchains are invoked as most standard toolchains but with two additionally defined parameters (Arch, Sysroot).

$cmake .. -DCMAKE_TOOLCHAIN_FILE=<path to cmakeModules>/<target toolchain file> -DArch=<arm32|arm64> -DSysroot=<absoluate path to sysroot folder>

In both cases, the sysroot folder can be the default Vitis sysroot, a Petalinux generated sysroot or a standard Ubuntu-based sysroot like those built by PYNQ. In the case when you're working with more custom sysroots like Vitis or Petalinux, you should use the toolchain toolchain_clang_crosscomp_arm_petalinux.cmake which provides additional guidance to find the necessary libraries. Note that this file may need to be edited depending if you're using 2022.1 or an older tool version. See the toolchain_clang_crosscomp_arm_petalinux.cmake header for more information.

cmakemodules's People

Contributors

denolf avatar fifield avatar jackl-xilinx avatar mattsnow-amd avatar stephenneuendorffer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmakemodules's Issues

Compatible with Vitis 2020.2

Hi,

sorry if this is a dumb question, but will these Scripts be working with Vitis 2020.2? The commits are about 2 years old.
I am just getting up to speed working with the tools, but as I am very used to having CMake for all other C++ projects.

I'd prefer setting up projects with CMake, and then opt-in on Simulation and Hardware synthesis. Is this even possible?
Is there any documentation?
I feel that a CMake approach will be the only reasonable one, when integrating with more complex projects.

Sorry again for what seems like a beginner question.

unsafe for cross-compilation

I got

$ cmake -Bbuild -DCMAKE_TOOLCHAIN_FILE=/usr/lib/cmake/xilinx/toolchain_clang_crosscomp_arm.cmake
...
    /opt/Xilinx/Vitis/2022.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.real: warning: library search path "/lib/../lib64" is unsafe for cross-compilation
    /opt/Xilinx/Vitis/2022.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.real: warning: library search path "/usr/lib/../lib64" is unsafe for cross-compilation
    /opt/Xilinx/Vitis/2022.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.real: warning: library search path "/lib" is unsafe for cross-compilation
    /opt/Xilinx/Vitis/2022.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.real: warning: library search path "/usr/lib" is unsafe for cross-compilation
    /opt/Xilinx/Vitis/2022.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.real: /lib/../lib64/Scrt1.o: Relocations in generic ELF (EM: 62)
    /opt/Xilinx/Vitis/2022.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.real: /lib/../lib64/Scrt1.o: Relocations in generic ELF (EM: 62)
    /opt/Xilinx/Vitis/2022.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.real: /lib/../lib64/Scrt1.o: error adding symbols: file in wrong format

Perhaps CMAKE_FIND_ROOT_PATH_MODE_PROGRAM, CMAKE_FIND_ROOT_PATH_MODE_LIBRARY, CMAKE_FIND_ROOT_PATH_MODE_INCLUDE, CMAKE_FIND_ROOT_PATH_MODE_PACKAGE should be set correctly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.