Skip to content

Commit

Permalink
Merge pull request #47 from BU-Tools/release2.0.1
Browse files Browse the repository at this point in the history
Release2.0.1
  • Loading branch information
dgastler authored Dec 6, 2022
2 parents 64e9015 + 17adfa5 commit 5836054
Show file tree
Hide file tree
Showing 2 changed files with 271 additions and 186 deletions.
59 changes: 50 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Electronics Design Facility.
It makes use of plug-in libraries for interacting with different pieces of
hardware.
Instructions on how to add plug-ins can be found on the BUTool wiki
http://gauss.bu.edu/redmine/projects/butool/wiki/BUTool_Wiki
https://bu-edf.gitlab.io/BUTool/



Expand All @@ -16,18 +16,58 @@ http://gauss.bu.edu/redmine/projects/butool/wiki/BUTool_Wiki

### Ubuntu packages required for build
```
$ sudo apt install libboost-regex-dev build-essential zlib1g-dev libreadline-dev libboost-dev libboost-program-options-dev libncurses5-dev
$ sudo apt install libboost-regex-dev build-essential zlib1g-dev libreadline-dev libboost-dev libboost-program-options-dev libncurses5-dev
```

## Build instructions for local build
After checking out the BUTool source:
```Bash
$ cp mk/Makefile.local ./Makefile
$ make
$ source env.sh
$ BUTool.exe
## Build Instructions

`BUTool` can be built either standalone, or together with all other plugins using the parent `ApolloTool`
repository [here](https://github.com/apollo-lhc/ApolloTool). Both methods use `make` as the build tool.

### Building With ApolloTool

Clone the `ApolloTool` repository recursively, with all the plugins and `BUTool` included:

```
git clone --recursive https://github.com/apollo-lhc/ApolloTool.git
```

Please refer to the build instructions [here](https://apollo-lhc.gitlab.io/Software/apollo-tool/) to build and
install the project.

### Building Standalone

`BUTool` can be built standalone on a computer where plugins are already installed under `/opt/BUTool`.
To do this, clone the BUTool source code from git. Do a recursive clone so that the `BUException`
sub-module is also cloned under the path `external/BUException`.

```
git clone --recursive https://github.com/BU-Tools/BUTool.git
```

Once the repo is cloned, the following commands can be executed to build `BUTool`, and install it under `/opt/BUTool`:

```
cd BUTool/
# Do the build
make RUNTIME_LDPATH=/opt/BUTool COMPILETIME_ROOT=--sysroot=/ LIBRARY_BUEXCEPTION_PATH=/opt/BUTool
# Install it under /opt/BUTool
make install RUNTIME_LDPATH=/opt/BUTool COMPILETIME_ROOT=--sysroot=/ LIBRARY_BUEXCEPTION_PATH=/opt/BUTool INSTALL_PATH=/opt/BUTool
```

Note that `RUNTIME_LDPATH` is set to `/opt/BUTool` such that at runtime (when `BUTool` is launched), the linker looks for libraries under the path `/opt/BUTool/lib`.

`INSTALL_PATH` is set to `/opt/BUTool` for the target install location, if this variable is not specified, the default install location is `./install`. Note that if the install location is different, `LD_LIBRARY_PATH` must be modified with the paths that have the `.so` library files.

After this is done, you can simply run `BUTool` with an ApolloSM device attached as usual:

```
BUTool.exe -a
```

**Note about linting:** By default, `make` will attempt to run `clang-tidy` linter. If you want to disable it, just put `LINTER=:` before each `make` command shown above.

## Adding plugins
It is recommended to check out plugins into the plugins/ directory.
Expand All @@ -48,6 +88,7 @@ You can also specify common variables and cross-dependencies for plugins by modi
To build only BUTool, call:
> $ make self
To build only plugins, call:
> $ make plugin
Expand Down
Loading

0 comments on commit 5836054

Please sign in to comment.