update some documentation about the Dockerfile
This commit is contained in:
parent
b0040d8699
commit
c1e09e3927
36
BUILDING.md
36
BUILDING.md
@ -3,7 +3,41 @@
|
||||
All of this is assumed to be on a linux system. Eventually I'll probably make or
|
||||
use some dockerfile or nix flake that has all this installed already.
|
||||
|
||||
## Toolchain Installation
|
||||
The recommended dev flow if you want to make changes is to use VSCode with remote containers,
|
||||
it's the easiest way to get the toolchain up and running, and to fix the issues encountered
|
||||
with migen.
|
||||
|
||||
*Note: I currently do not know how to run the dev container with --privileged, so you'll need
|
||||
to flash by manually running it*
|
||||
|
||||
Recommended extensions:
|
||||
|
||||
- Pylance
|
||||
- rust-analyzer
|
||||
|
||||
## Building with docker
|
||||
|
||||
Easiest way is to build and use the docker container:
|
||||
|
||||
```
|
||||
docker build -r arvp_sonar:latest ./
|
||||
# Privileged lets you access USB devices inside the container
|
||||
docker run --privileged --rm -it -v /path/to/repository:/code arvp_sonar:latest
|
||||
|
||||
# These commands are run inside the container
|
||||
cd /code/gateware
|
||||
python3 litex_main.py --build # Build the bitstream
|
||||
|
||||
# To write to the flash storage
|
||||
# TODO not sure how to use this command
|
||||
ecpdap write
|
||||
# To program the FPGA once
|
||||
ecpdap program build/sonar/gateware/sonar.bit --freq 10M
|
||||
```
|
||||
|
||||
This will generate a bitstream in `gateware/build/sonar
|
||||
|
||||
## Toolchain Manual Installation
|
||||
|
||||
### Trellis and FPGA toolchain
|
||||
|
||||
|
@ -33,6 +33,8 @@ COPY migen.patch /litex/migen/migen.patch
|
||||
RUN cd /litex/migen && git apply /litex/migen/migen.patch
|
||||
RUN pip install --editable /litex/migen
|
||||
|
||||
# TODO remove unnecessary tools
|
||||
|
||||
# Delete package cache to keep size small
|
||||
RUN apt-get clean
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user