https://github.com/micro-ros/micro_ros_vitis_component
https://github.com/micro-ros/micro_ros_vitis_component
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/micro-ros/micro_ros_vitis_component
- Owner: micro-ROS
- Created: 2024-02-15T11:08:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-28T10:18:11.000Z (almost 2 years ago)
- Last Synced: 2024-06-28T11:38:55.135Z (almost 2 years ago)
- Language: Shell
- Size: 32.2 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# micro-ROS for AMD Vitis
This package eases the integration of [micro-ROS](https://micro.ros.org/) in a [AMD Vitis](https://www.xilinx.com/products/design-tools/vitis.html). This components targets building the micro-ROS library for different targets or architectures supported by AMD Vitis.
- [micro-ROS for AMD Vitis](#micro-ros-for-amd-vitis)
- [Supported targets](#supported-targets)
- [General Configuration](#general-configuration)
- [MicroBlaze Configuration](#microblaze-configuration)
- [Prerequisites](#prerequisites)
- [Building the micro-ROS library](#building-the-micro-ros-library)
- [Configuring micro-ROS library memory](#configuring-micro-ros-library-memory)
- [Adding custom packages to the micro-ROS build](#adding-custom-packages-to-the-micro-ros-build)
## Supported targets
| Target | `MICROROS_TARGET` |
| ---------- | ------------------ |
| MicroBlaze | `VITIS_MICROBLAZE` |
| Cortex R5 | `VITIS_CORTEX_R5` |
### General Configuration
All targets allow the following CLI arguments:
- `-f`: Force clean and build, even if the library is already built.
### MicroBlaze Configuration
The MicroBlaze platform allows to configure the following parameters:
- `-mbig-endian`: Enable big-endian mode.
- `-64bits`: Build for MicroBlaze 64 bits (default is 32 bits).
## Prerequisites
- [AMD Vitis](https://www.xilinx.com/products/design-tools/vitis.html) installed.
- Valid compiler for the target architecture installed and available in the `PATH`.
- The following Python packages installed:
```bash
pip3 install colcon-common-extensions catkin_pkg lark-parser empy
```
- The following packages installed in the system:
```bash
sudo apt install rsync
```
## Building the micro-ROS library
Note - If Vitis SDK environment was sourced, the PATH will need to be adjusted.
```bash
export PATH="/usr/bin":$PATH
```
In order to generate the micro-ROS library for a specific target, the following command must be executed:
```bash
MICROROS_TARGET= ./build_micro_ros_library.sh
```
Where `` is the target architecture to build the micro-ROS library for, as specified in the [Supported targets](#supported-targets) section.
## Configuring micro-ROS library memory
As explained in the [micro-ROS documentation](https://docs.vulcanexus.org/en/latest/rst/tutorials/micro/memory_management/memory_management.html) some of the micro-ROS memory is statically allocated at compile time.
This means that the memory configuration must be adjusted to the specific target architecture.
In order to tune the memory configuration, `colcon.meta` file must be edited according to the fit application requirements.
## Adding custom packages to the micro-ROS build
In order to include a custom package in the micro-ROS build, just copy the package folder into `library_generation/extra_packages` folder. The build system will automatically detect the package and build it along with the micro-ROS library.
Note that a library rebuild is needed to include the package, this can be achieved by deleting the `libmicroros` generated folder and building your project afterwards.