Skip to content

Xilinx/foc-motor-ctrl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FOC Motor Control App

Docs License

This repository provides a field oriented control based motor control library and application interface to use it. This library provides both C++ interface as well as Python interface.

Build Instructions

  1. Install build prerequisites:
  • IIO library and python binding
    sudo apt install cmake python3-dev python3-pybind11 libiio-dev
  • Lely core libraries
    sudo add-apt-repository ppa:lely/ppa
    sudo apt-get update
    
    sudo apt-get install liblely-coapp-dev liblely-co-tools python3-dcf-tools
    sudo apt-get install pkg-config
  1. Clone the repo into workspace:

    git clone https://github.com/Xilinx/foc-motor-ctrl.git
    cd foc-motor-ctrl
  2. Configure the build:

    mkdir -p build
    cd build/
    cmake -DCMAKE_INSTALL_PREFIX=/opt/xilinx/xlnx-app-kd240-foc-motor-ctrl -DBUILD_DASHBOARD_APP=ON -DBUILD_CANOPEN_APP=ON ..

    Project specific configuration options

    Options Possible Values Default Description
    BUILD_TEST ON, OFF OFF Choose to build and install test applications for the library.
    BUILD_DASHBOARD_APP ON, OFF OFF Choose to build and install dashboard applications.
    BUILD_CMDLINE_APP ON, OFF OFF Choose to build and install command line applications.
    BUILD_CANOPEN_APP ON, OFF OFF Choose to build and install canopen applications.

    Other useful cmake configurations

    Options Possible Values Default Description
    CMAKE_INSTALL_PREFIX install location /usr/local Provide custom install location.
    SKIP_POST_INSTALL ON, OFF OFF Skip the post install that can be handled by packaging system.
  3. Build the libraries, applications and tests.

    make
    
  4. Install the libraries, applications and tests.

    sudo make install
    

    With above configurations, the libraries are installed in /opt/xilinx/xlnx-app-kd240-foc-motor-ctrl/lib.

Run the Application

For detailed instructions on how to deploy and run the application, please refer to the FOC Motor Control Application Deployment Page.

License

Copyright (C) 2023-2025, Advanced Micro Devices, Inc.
SPDX-License-Identifier: MIT