diff --git a/build/Makefile b/build/Makefile index c4d5f3f..961653d 100644 --- a/build/Makefile +++ b/build/Makefile @@ -122,10 +122,14 @@ buildroot-clean: -docker container rm upsilon-buildroot ###### Execute - -OPENFPGALOADER=./openFPGALoader/build/openFPGALoader flash: - ${OPENFPGALOADER} -c digilent ../boot/digilent_arty.bit + if [ -d 'openFPGALoader' ]; then \ + OPENFPGALOADER=./openFPGALoader/build/openFPGALoader; \ + else \ + OPENFPGALOADER=openFPGALoader; \ + fi; \ + $$OPENFPGALOADER -c digilent ../boot/digilent_arty.bit + tftp: cd ../boot && py3tftp --host 192.168.2.100 -p 6969 -v diff --git a/doc/docker.md b/doc/docker.md index b9670f7..bf9f33c 100644 --- a/doc/docker.md +++ b/doc/docker.md @@ -109,8 +109,9 @@ launch the TFTP server. Keep this terminal open. ## Flash FPGA Plug in your FPGA into the USB slot. If you have installed openFPGALoader -by your package manager, run `make OPENFPGALOADER=openfpgaloader flash`. -If you installed it using `make openFPGALoader`, then just run `make flash`. +by your package manager, run `make flash`. If you compiled openFPGALoader using +`make openFPGALoader`, the makefile will automatically use this instance. Otherwise, +it will attempt to use the openFPGALoader version installed through the package manager. In a second you should see messages in the TFTP terminal. This means your controller is sucessfully connected to your computer.