Skip to content

Commit

Permalink
Added information on how to vendorize X-HEEP into a project.
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanSapriza committed Mar 8, 2023
1 parent b74c67a commit 2d078fe
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions BuildingExternalSources.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,47 @@ The most seamless way of building sources from external directories begins with
│ ├── external.mk
│ └── ...
├── Makefile
├── util
│ └── vendor.py
└── ...

Where `BASE` is your repository's base directory, `esl_epfl_x_heep` is the vendorized `X-HEEP` repository and `my_app` is the name of the application you intend to build.

## Vendorizing X-HEEP
In order to vendorize X-HEEP create inside `BASE` a `hw/vendor` directory containing a file named `eslepfl_x_heep.vendor.hjson` containing:
```
// Copyright EPFL
// Licensed under the Solderpad Hardware License v2.1, see LICENSE.txt for details
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
{
name: "esl_epfl_x_heep",
target_dir: "esl_epfl_x_heep",
upstream: {
url: "https://github.com/esl-epfl/x-heep.git",
rev: "main",
},
patch_dir: "patches/esl_epfl_x_heep",
exclude_from_upstream: [
".github",
"ci",
]
}
```

The branch `main` can be replaced with an specific commit. This is the recommended operation to prevent accidental updates to an incompatible version.

In a directory `BASE/util` add the [vendor python script](https://github.com/lowRISC/opentitan/blob/master/util/vendor.py).

To vendorize or revendorize the X-HEEP repository inside a `BASE/hw/vendor/esl_epfl_x_heep/` folder run the following command from you `BASE`.
```
util/vendor.py --update hw/vendor/eslepfl_x_heep.vendor.hjson
```

## The BASE/sw/ folder

The `BASE/sw/` folder must comply with `X-HEEP` repository structure and therefore include an `applications`, `build`, `device` and `linker` folder.
Expand Down

1 comment on commit 2d078fe

@davideschiavone
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't also what @davidmallasen wrote in his guide ?

Please sign in to comment.