Help with llvm/clang compiler for Snitch Cluster simulation (-mcpu=snitch Issue)
#1
Hello, everyone!

I've been trying to simulate a Snitch cluster, and I'm currently facing an issue while compiling software to execute with snitch_cluster.vsim. Specifically, the clang compiler doesn't seem to recognize the -mcpu=snitch option.

This leads me to believe that my llvm for PULP platform build wasn't successful. Here's an overview of what I've done so far:
  1. I cloned the LLVM repository at https://github.com/pulp-platform/llvm-project 
  2. Built LLVM and clang with the following options:

    Code:
    cmake \
        -DCMAKE_BUILD_TYPE="Release" -DLLVM_ENABLE_ASSERTIONS=ON \
        -DCMAKE_INSTALL_PREFIX=${INSTALLPREFIX} \
        -DLLVM_ENABLE_PROJECTS="clang" \
        -DLLVM_TARGETS_TO_BUILD="RISCV" \
        -DLLVM_DEFAULT_TARGET_TRIPLE="riscv32-unknown-elf" \
        -DLLVM_APPEND_VC_REV=OFF \
        -G "Unix Makefiles" ../llvm

  3. Updated my PATH to include the /build/bin directory, the build itself and clang seems to be working properly.

However, when I try to use the -mcpu=snitch flag during my Snitch cluster make all, I get the following error message:

clang-12: warning: argument unused during compilation: '-mcpu=snitch' [-Wunused-command-line-argument]
as well as others indicating that Snitch related clang builtins are not working properly.

Could someone guide me on the correct steps for building LLVM and Clang to include support for the Snitch cluster?

Any help or advice would be greatly appreciated!
Thanks in advance!
Reply


Messages In This Thread
Help with llvm/clang compiler for Snitch Cluster simulation (-mcpu=snitch Issue) - by ThomasMuyal - 01-23-2025, 06:28 PM

Forum Jump:


Users browsing this thread: 5 Guest(s)