building firmware on windows machine

77 views
Skip to first unread message

aamir.ali.k...@gmail.com

unread,
Jul 28, 2016, 3:43:37 AM7/28/16
to FPGALink Users
I am trying to build firmware on windows machine i am already build fx2lib library and examples using sdcc .  and  now trying  to buil fx2 firmware  i am using fx2lib on root directry  c:\fx2lib  and c:\common for common include so change makefile command as 

TARGET := firmware
FX2LIBDIR := c:\fx2lib
LIBS := -L$(FX2LIBDIR)/lib fx2.lib
INCS := -I sdcc -I$(FX2LIBDIR)/include -I c:\common

but when i build firmware using make i got error try is not command i have added directory structure as mentioned and set windows environment  variable to msys/bin dir  . what  is meaning of following line in make file . i am new to shell scripting .

BRANCH := $(shell TRY=$(CURDIR); BRANCH=dev; while [ "$${TRY}" != "$(ROOT)" -a "$${TRY}" != "/" ]; do if [ -e "$${TRY}/.branch" ]; then BRANCH=$$(cat "$${TRY}/.branch"); break; fi; TRY=$$(dirname $${TRY}); done; echo $${BRANCH})
is there is simple make file which only build  firmware with no shell scripting .thanks

Chris McClelland

unread,
Jul 28, 2016, 4:01:01 AM7/28/16
to FPGALink Users
You do not need to rebuild the firmware in order to use FPGALink. You only need to build the firmware if you want to develop FPGALink itself further. I wouldn't recommend anyone trying to develop the FX2 firmware further. It's quite stable now, and programming the FX2 is not a pleasant experience. But if you *really* want to build it, you can do so as follows:

a) Install SDCC (I have version 3.4.0)

b) Install the build infrastructure (i.e steps 1 - 5 from one of the quickstarts[1]). Since you're only building firmware, you *may* be able to skip installation of the Windows SDK (i.e step 1), meaning you only need to choose the Python installation when you run c:\makestuff\setup.exe in step 5. But I haven't tried this without the Windows SDK installed so YMMV.

c) Now you should be able to do this:

cd $HOME/libs
msget.sh makestuff/libfpgalink/20151220
cd libfpgalink
make fx2lib
make -C firmware/fx2

Chris

[1] e.g https://gist.github.com/makestuff/9870450#file-nexys3-howto-L39-L60
Reply all
Reply to author
Forward
0 new messages