File tree Expand file tree Collapse file tree 2 files changed +39
-2
lines changed
Expand file tree Collapse file tree 2 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,21 @@ AC_ARG_ENABLE([firmware],
5555 has8051=`sdcc --version 2>&1 | grep "mcs51"`
5656 if test "$has8051" == "" ;then
5757 AC_MSG_ERROR ( "Installed SDCC doesn't support 8051 so can't built for EZUSB" )
58+ else
59+ SDCC_MAJOR=`sdcc -v |grep -Po "(\d+?\.\d+?\.\d+?)"|cut -d. -f1`
60+ SDCC_MINOR=`sdcc -v |grep -Po "(\d+?\.\d+?\.\d+?)"|cut -d. -f2`
61+ SDCC_REV=`sdcc -v |grep -Po "(\d+?\.\d+?\.\d+?)"|cut -d. -f3`
62+
63+ if test "$SDCC_MAJOR" == 3 ;then
64+ if test "$SDCC_MINOR" -ge 8 ;then
65+ AC_MSG_NOTICE ( SDCC 3.8 or greater detected )
66+ AC_CONFIG_COMMANDS[ git -C fx2lib checkout master]
67+ AC_CONFIG_COMMANDS[ patch -d fx2lib -p1 <fx2lib_master.patch -sN]
68+ else
69+ AC_MSG_NOTICE ( pre-3.8 SDCC detected )
70+ AC_CONFIG_COMMANDS[ patch -d fx2lib -p1 <fx2lib.patch -sN]
71+ fi
72+ fi
5873 fi
5974 fi
6075
@@ -69,8 +84,6 @@ AS_IF([test "x$enable_tools" != "xno"], [
6984 AC_CONFIG_FILES ( [ tools/Makefile] )
7085] )
7186
72- AC_CONFIG_COMMANDS[ patch -d fx2lib -p1 <fx2lib.patch -sN]
73-
7487AC_SUBST ( SMB_CONF_DIRS )
7588
7689AC_CONFIG_FILES ( [ lib/Makefile
Original file line number Diff line number Diff line change 1+ diff --git a/lib/fx2.mk b/lib/fx2.mk
2+ index 501040f..359a698 100644
3+ --- a/lib/fx2.mk
4+ +++ b/lib/fx2.mk
5+ @@ -41,15 +41,15 @@ VID?=0x04b4
6+ PID?=0x8613
7+
8+ INCLUDES?=""
9+ - DSCR_AREA?=-Wl"-b DSCR_AREA=0x3e00"
10+ - INT2JT?=-Wl"-b INT2JT=0x3f00"
11+ + DSCR_AREA?=-Wl"-b DSCR_AREA=0x1e00"
12+ + INT2JT?=-Wl"-b INT2JT=0x1f00"
13+ CC=sdcc
14+ # these are pretty good settings for most firmwares.
15+ # Have to be careful with memory locations for
16+ # firmwares that require more xram etc.
17+ - CODE_SIZE?=--code-size 0x3c00
18+ + CODE_SIZE?=--code-size 0x1c00
19+ XRAM_SIZE?=--xram-size 0x0200
20+ - XRAM_LOC?=--xram-loc 0x3c00
21+ + XRAM_LOC?=--xram-loc 0x1c00
22+ BUILDDIR?=build
23+
24+ FX2LIBDIR?=$(dir $(lastword $(MAKEFILE_LIST)))../
You can’t perform that action at this time.
0 commit comments