Updated makefile to automatically select the right openFPGALoader

This commit is contained in:
Adam Mooers 2023-08-16 15:49:44 -04:00
parent 2a97f0a197
commit e0c3bedcee
2 changed files with 10 additions and 5 deletions

View File

@ -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

View File

@ -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.