mirror of
https://github.com/espressif/openthread.git
synced 2026-08-09 04:07:47 +00:00
Separate build output based on target. (#1482)
This commit is contained in:
+28
-28
@@ -54,35 +54,35 @@ set -x
|
||||
git clean -xfd || die
|
||||
./bootstrap || die
|
||||
COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-cc2538 || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-ftd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/cc2538/bin/arm-none-eabi-ot-cli-ftd || die
|
||||
arm-none-eabi-size output/cc2538/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/cc2538/bin/arm-none-eabi-ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/cc2538/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
|
||||
git checkout -- . || die
|
||||
git clean -xfd || die
|
||||
./bootstrap || die
|
||||
COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-da15000 || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-ftd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/da15000/bin/arm-none-eabi-ot-cli-ftd || die
|
||||
arm-none-eabi-size output/da15000/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/da15000/bin/arm-none-eabi-ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/da15000/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
|
||||
git checkout -- . || die
|
||||
git clean -xfd || die
|
||||
./bootstrap || die
|
||||
COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-nrf52840 || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-ftd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/arm-none-eabi-ot-cli-ftd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/arm-none-eabi-ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
|
||||
git checkout -- . || die
|
||||
git clean -xfd || die
|
||||
./bootstrap || die
|
||||
make -f examples/Makefile-cc2650 || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/cc2650/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/cc2650/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
}
|
||||
|
||||
[ $BUILD_TARGET != arm-gcc54 ] || {
|
||||
@@ -92,35 +92,35 @@ set -x
|
||||
git clean -xfd || die
|
||||
./bootstrap || die
|
||||
COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-cc2538 || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-ftd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/cc2538/bin/arm-none-eabi-ot-cli-ftd || die
|
||||
arm-none-eabi-size output/cc2538/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/cc2538/bin/arm-none-eabi-ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/cc2538/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
|
||||
git checkout -- . || die
|
||||
git clean -xfd || die
|
||||
./bootstrap || die
|
||||
COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-da15000 || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-ftd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/da15000/bin/arm-none-eabi-ot-cli-ftd || die
|
||||
arm-none-eabi-size output/da15000/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/da15000/bin/arm-none-eabi-ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/da15000/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
|
||||
git checkout -- . || die
|
||||
git clean -xfd || die
|
||||
./bootstrap || die
|
||||
COMMISSIONER=1 JOINER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DNS_CLIENT=1 make -f examples/Makefile-nrf52840 || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-ftd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/arm-none-eabi-ot-cli-ftd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/arm-none-eabi-ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
|
||||
git checkout -- . || die
|
||||
git clean -xfd || die
|
||||
./bootstrap || die
|
||||
make -f examples/Makefile-cc2650 || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/cc2650/bin/arm-none-eabi-ot-cli-mtd || die
|
||||
arm-none-eabi-size output/cc2650/bin/arm-none-eabi-ot-ncp-mtd || die
|
||||
}
|
||||
|
||||
[ $BUILD_TARGET != posix ] || {
|
||||
|
||||
+13
-12
@@ -130,11 +130,11 @@ ResultPath = output
|
||||
TopResultDir = $(ResultPath)
|
||||
AbsTopResultDir = $(PWD)/$(TopResultDir)
|
||||
|
||||
TargetTuple = arm-none-eabi
|
||||
TargetTuple = cc2538
|
||||
|
||||
ARCHS = cortex-m3
|
||||
|
||||
TopTargetLibDir = $(TopResultDir)/$(if $(1),$(1)-,)$(TargetTuple)/lib
|
||||
TopTargetLibDir = $(TopResultDir)/$(TargetTuple)/lib
|
||||
|
||||
ifndef BuildJobs
|
||||
BuildJobs := $(shell getconf _NPROCESSORS_ONLN)
|
||||
@@ -149,13 +149,14 @@ JOBSFLAG := -j$(BuildJobs)
|
||||
# arch - The architecture to configure.
|
||||
#
|
||||
define configure-arch
|
||||
$(ECHO) " CONFIG $(1)-$(TargetTuple)..."
|
||||
(cd $(BuildPath)/$(1)-$(TargetTuple) && $(AbsTopSourceDir)/configure \
|
||||
$(ECHO) " CONFIG $(TargetTuple)..."
|
||||
(cd $(BuildPath)/$(TargetTuple) && $(AbsTopSourceDir)/configure \
|
||||
INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
|
||||
CPP="$(CPP)" CC="$(CC)" CXX="$(CXX)" OBJC="$(OBJC)" OBJCXX="$(OBJCXX)" AR="$(AR)" RANLIB="$(RANLIB)" NM="$(NM)" STRIP="$(STRIP)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
|
||||
--host=arm-none-eabi \
|
||||
--target=arm-none-eabi \
|
||||
--prefix=/ \
|
||||
--exec-prefix=/$(TargetTuple) \
|
||||
$(configure_OPTIONS))
|
||||
endef # configure-arch
|
||||
|
||||
@@ -168,8 +169,8 @@ endef # configure-arch
|
||||
# arch - The architecture to build.
|
||||
#
|
||||
define build-arch
|
||||
$(ECHO) " BUILD $(1)-$(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1)-$(TargetTuple) --no-print-directory \
|
||||
$(ECHO) " BUILD $(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(TargetTuple) --no-print-directory \
|
||||
all
|
||||
endef # build-arch
|
||||
|
||||
@@ -182,8 +183,8 @@ endef # build-arch
|
||||
# arch - The architecture to stage.
|
||||
#
|
||||
define stage-arch
|
||||
$(ECHO) " STAGE $(1)-$(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1)-$(TargetTuple) --no-print-directory \
|
||||
$(ECHO) " STAGE $(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(TargetTuple) --no-print-directory \
|
||||
DESTDIR=$(AbsTopResultDir) \
|
||||
install
|
||||
endef # stage-arch
|
||||
@@ -200,17 +201,17 @@ define ARCH_template
|
||||
CONFIGURE_TARGETS += configure-$(1)
|
||||
BUILD_TARGETS += do-build-$(1)
|
||||
STAGE_TARGETS += stage-$(1)
|
||||
BUILD_DIRS += $(BuildPath)/$(1)-$(TargetTuple)
|
||||
DIRECTORIES += $(BuildPath)/$(1)-$(TargetTuple)
|
||||
BUILD_DIRS += $(BuildPath)/$(TargetTuple)
|
||||
DIRECTORIES += $(BuildPath)/$(TargetTuple)
|
||||
|
||||
configure-$(1): target_CPPFLAGS=$($(1)_target_CPPFLAGS)
|
||||
configure-$(1): target_CFLAGS=$($(1)_target_CFLAGS)
|
||||
configure-$(1): target_CXXFLAGS=$($(1)_target_CXXFLAGS)
|
||||
configure-$(1): target_LDFLAGS=$($(1)_target_LDFLAGS)
|
||||
|
||||
configure-$(1): $(BuildPath)/$(1)-$(TargetTuple)/config.status
|
||||
configure-$(1): $(BuildPath)/$(TargetTuple)/config.status
|
||||
|
||||
$(BuildPath)/$(1)-$(TargetTuple)/config.status: | $(BuildPath)/$(1)-$(TargetTuple)
|
||||
$(BuildPath)/$(TargetTuple)/config.status: | $(BuildPath)/$(TargetTuple)
|
||||
$$(call configure-arch,$(1))
|
||||
|
||||
do-build-$(1): configure-$(1)
|
||||
|
||||
+13
-12
@@ -119,11 +119,11 @@ ResultPath = output
|
||||
TopResultDir = $(ResultPath)
|
||||
AbsTopResultDir = $(PWD)/$(TopResultDir)
|
||||
|
||||
TargetTuple = arm-none-eabi
|
||||
TargetTuple = cc2650
|
||||
|
||||
ARCHS = cortex-m3
|
||||
|
||||
TopTargetLibDir = $(TopResultDir)/$(if $(1),$(1)-,)$(TargetTuple)/lib
|
||||
TopTargetLibDir = $(TopResultDir)/$(TargetTuple)/lib
|
||||
|
||||
ifndef BuildJobs
|
||||
BuildJobs := $(shell getconf _NPROCESSORS_ONLN)
|
||||
@@ -138,13 +138,14 @@ JOBSFLAG := -j$(BuildJobs)
|
||||
# arch - The architecture to configure.
|
||||
#
|
||||
define configure-arch
|
||||
$(ECHO) " CONFIG $(1)-$(TargetTuple)..."
|
||||
(cd $(BuildPath)/$(1)-$(TargetTuple) && $(AbsTopSourceDir)/configure \
|
||||
$(ECHO) " CONFIG $(TargetTuple)..."
|
||||
(cd $(BuildPath)/$(TargetTuple) && $(AbsTopSourceDir)/configure \
|
||||
INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
|
||||
CPP="$(CPP)" CC="$(CC)" CXX="$(CXX)" OBJC="$(OBJC)" OBJCXX="$(OBJCXX)" AR="$(AR)" RANLIB="$(RANLIB)" NM="$(NM)" STRIP="$(STRIP)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
|
||||
--host=arm-none-eabi \
|
||||
--target=arm-none-eabi \
|
||||
--prefix=/ \
|
||||
--exec-prefix=/$(TargetTuple) \
|
||||
$(configure_OPTIONS))
|
||||
endef # configure-arch
|
||||
|
||||
@@ -157,8 +158,8 @@ endef # configure-arch
|
||||
# arch - The architecture to build.
|
||||
#
|
||||
define build-arch
|
||||
$(ECHO) " BUILD $(1)-$(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1)-$(TargetTuple) --no-print-directory \
|
||||
$(ECHO) " BUILD $(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(TargetTuple) --no-print-directory \
|
||||
all
|
||||
endef # build-arch
|
||||
|
||||
@@ -171,8 +172,8 @@ endef # build-arch
|
||||
# arch - The architecture to stage.
|
||||
#
|
||||
define stage-arch
|
||||
$(ECHO) " STAGE $(1)-$(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1)-$(TargetTuple) --no-print-directory \
|
||||
$(ECHO) " STAGE $(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(TargetTuple) --no-print-directory \
|
||||
DESTDIR=$(AbsTopResultDir) \
|
||||
install
|
||||
endef # stage-arch
|
||||
@@ -189,17 +190,17 @@ define ARCH_template
|
||||
CONFIGURE_TARGETS += configure-$(1)
|
||||
BUILD_TARGETS += do-build-$(1)
|
||||
STAGE_TARGETS += stage-$(1)
|
||||
BUILD_DIRS += $(BuildPath)/$(1)-$(TargetTuple)
|
||||
DIRECTORIES += $(BuildPath)/$(1)-$(TargetTuple)
|
||||
BUILD_DIRS += $(BuildPath)/$(TargetTuple)
|
||||
DIRECTORIES += $(BuildPath)/$(TargetTuple)
|
||||
|
||||
configure-$(1): target_CPPFLAGS=$($(1)_target_CPPFLAGS)
|
||||
configure-$(1): target_CFLAGS=$($(1)_target_CFLAGS)
|
||||
configure-$(1): target_CXXFLAGS=$($(1)_target_CXXFLAGS)
|
||||
configure-$(1): target_LDFLAGS=$($(1)_target_LDFLAGS)
|
||||
|
||||
configure-$(1): $(BuildPath)/$(1)-$(TargetTuple)/config.status
|
||||
configure-$(1): $(BuildPath)/$(TargetTuple)/config.status
|
||||
|
||||
$(BuildPath)/$(1)-$(TargetTuple)/config.status: | $(BuildPath)/$(1)-$(TargetTuple)
|
||||
$(BuildPath)/$(TargetTuple)/config.status: | $(BuildPath)/$(TargetTuple)
|
||||
$$(call configure-arch,$(1))
|
||||
|
||||
do-build-$(1): configure-$(1)
|
||||
|
||||
+13
-12
@@ -129,11 +129,11 @@ ResultPath = output
|
||||
TopResultDir = $(ResultPath)
|
||||
AbsTopResultDir = $(PWD)/$(TopResultDir)
|
||||
|
||||
TargetTuple = arm-none-eabi
|
||||
TargetTuple = da15000
|
||||
|
||||
ARCHS = cortex-m0
|
||||
|
||||
TopTargetLibDir = $(TopResultDir)/$(if $(1),$(1)-,)$(TargetTuple)/lib
|
||||
TopTargetLibDir = $(TopResultDir)/$(TargetTuple)/lib
|
||||
|
||||
ifndef BuildJobs
|
||||
BuildJobs := $(shell getconf _NPROCESSORS_ONLN)
|
||||
@@ -148,13 +148,14 @@ JOBSFLAG := -j$(BuildJobs)
|
||||
# arch - The architecture to configure.
|
||||
#
|
||||
define configure-arch
|
||||
$(ECHO) " CONFIG $(1)-$(TargetTuple)..."
|
||||
(cd $(BuildPath)/$(1)-$(TargetTuple) && $(AbsTopSourceDir)/configure \
|
||||
$(ECHO) " CONFIG $(TargetTuple)..."
|
||||
(cd $(BuildPath)/$(TargetTuple) && $(AbsTopSourceDir)/configure \
|
||||
INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
|
||||
CPP="$(CPP)" CC="$(CC)" CXX="$(CXX)" OBJC="$(OBJC)" OBJCXX="$(OBJCXX)" AR="$(AR)" RANLIB="$(RANLIB)" NM="$(NM)" STRIP="$(STRIP)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
|
||||
--host=arm-none-eabi \
|
||||
--target=arm-none-eabi \
|
||||
--prefix=/ \
|
||||
--exec-prefix=/$(TargetTuple) \
|
||||
$(configure_OPTIONS))
|
||||
endef # configure-arch
|
||||
|
||||
@@ -167,8 +168,8 @@ endef # configure-arch
|
||||
# arch - The architecture to build.
|
||||
#
|
||||
define build-arch
|
||||
$(ECHO) " BUILD $(1)-$(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1)-$(TargetTuple) --no-print-directory \
|
||||
$(ECHO) " BUILD $(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(TargetTuple) --no-print-directory \
|
||||
all
|
||||
endef # build-arch
|
||||
|
||||
@@ -181,8 +182,8 @@ endef # build-arch
|
||||
# arch - The architecture to stage.
|
||||
#
|
||||
define stage-arch
|
||||
$(ECHO) " STAGE $(1)-$(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1)-$(TargetTuple) --no-print-directory \
|
||||
$(ECHO) " STAGE $(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(TargetTuple) --no-print-directory \
|
||||
DESTDIR=$(AbsTopResultDir) \
|
||||
install
|
||||
endef # stage-arch
|
||||
@@ -199,17 +200,17 @@ define ARCH_template
|
||||
CONFIGURE_TARGETS += configure-$(1)
|
||||
BUILD_TARGETS += do-build-$(1)
|
||||
STAGE_TARGETS += stage-$(1)
|
||||
BUILD_DIRS += $(BuildPath)/$(1)-$(TargetTuple)
|
||||
DIRECTORIES += $(BuildPath)/$(1)-$(TargetTuple)
|
||||
BUILD_DIRS += $(BuildPath)/$(TargetTuple)
|
||||
DIRECTORIES += $(BuildPath)/$(TargetTuple)
|
||||
|
||||
configure-$(1): target_CPPFLAGS=$($(1)_target_CPPFLAGS)
|
||||
configure-$(1): target_CFLAGS=$($(1)_target_CFLAGS)
|
||||
configure-$(1): target_CXXFLAGS=$($(1)_target_CXXFLAGS)
|
||||
configure-$(1): target_LDFLAGS=$($(1)_target_LDFLAGS)
|
||||
|
||||
configure-$(1): $(BuildPath)/$(1)-$(TargetTuple)/config.status
|
||||
configure-$(1): $(BuildPath)/$(TargetTuple)/config.status
|
||||
|
||||
$(BuildPath)/$(1)-$(TargetTuple)/config.status: | $(BuildPath)/$(1)-$(TargetTuple)
|
||||
$(BuildPath)/$(TargetTuple)/config.status: | $(BuildPath)/$(TargetTuple)
|
||||
$$(call configure-arch,$(1))
|
||||
|
||||
do-build-$(1): configure-$(1)
|
||||
|
||||
+13
-12
@@ -183,11 +183,11 @@ ResultPath = output
|
||||
TopResultDir = $(ResultPath)
|
||||
AbsTopResultDir = $(PWD)/$(TopResultDir)
|
||||
|
||||
TargetTuple = arm-none-eabi
|
||||
TargetTuple = nrf52840
|
||||
|
||||
ARCHS = cortex-m4
|
||||
|
||||
TopTargetLibDir = $(TopResultDir)/$(if $(1),$(1)-,)$(TargetTuple)/lib
|
||||
TopTargetLibDir = $(TopResultDir)/$(TargetTuple)/lib
|
||||
|
||||
ifndef BuildJobs
|
||||
BuildJobs := $(shell getconf _NPROCESSORS_ONLN)
|
||||
@@ -202,13 +202,14 @@ JOBSFLAG := -j$(BuildJobs)
|
||||
# arch - The architecture to configure.
|
||||
#
|
||||
define configure-arch
|
||||
$(ECHO) " CONFIG $(1)-$(TargetTuple)..."
|
||||
(cd $(BuildPath)/$(1)-$(TargetTuple) && $(AbsTopSourceDir)/configure \
|
||||
$(ECHO) " CONFIG $(TargetTuple)..."
|
||||
(cd $(BuildPath)/$(TargetTuple) && $(AbsTopSourceDir)/configure \
|
||||
INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
|
||||
CPP="$(CPP)" CC="$(CC)" CXX="$(CXX)" CCAS="$(CCAS)" OBJC="$(OBJC)" OBJCXX="$(OBJCXX)" AR="$(AR)" RANLIB="$(RANLIB)" NM="$(NM)" STRIP="$(STRIP)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CCASFLAGS="$(CCASFLAGS)" LDFLAGS="$(LDFLAGS)" \
|
||||
--host=arm-none-eabi \
|
||||
--target=arm-none-eabi \
|
||||
--prefix=/ \
|
||||
--exec-prefix=/$(TargetTuple) \
|
||||
$(configure_OPTIONS))
|
||||
endef # configure-arch
|
||||
|
||||
@@ -221,8 +222,8 @@ endef # configure-arch
|
||||
# arch - The architecture to build.
|
||||
#
|
||||
define build-arch
|
||||
$(ECHO) " BUILD $(1)-$(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1)-$(TargetTuple) --no-print-directory \
|
||||
$(ECHO) " BUILD $(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(TargetTuple) --no-print-directory \
|
||||
all
|
||||
endef # build-arch
|
||||
|
||||
@@ -235,8 +236,8 @@ endef # build-arch
|
||||
# arch - The architecture to stage.
|
||||
#
|
||||
define stage-arch
|
||||
$(ECHO) " STAGE $(1)-$(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(1)-$(TargetTuple) --no-print-directory \
|
||||
$(ECHO) " STAGE $(TargetTuple)"
|
||||
$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(TargetTuple) --no-print-directory \
|
||||
DESTDIR=$(AbsTopResultDir) \
|
||||
install
|
||||
endef # stage-arch
|
||||
@@ -253,8 +254,8 @@ define ARCH_template
|
||||
CONFIGURE_TARGETS += configure-$(1)
|
||||
BUILD_TARGETS += do-build-$(1)
|
||||
STAGE_TARGETS += stage-$(1)
|
||||
BUILD_DIRS += $(BuildPath)/$(1)-$(TargetTuple)
|
||||
DIRECTORIES += $(BuildPath)/$(1)-$(TargetTuple)
|
||||
BUILD_DIRS += $(BuildPath)/$(TargetTuple)
|
||||
DIRECTORIES += $(BuildPath)/$(TargetTuple)
|
||||
|
||||
configure-$(1): target_CPPFLAGS=$($(1)_target_CPPFLAGS)
|
||||
configure-$(1): target_CFLAGS=$($(1)_target_CFLAGS)
|
||||
@@ -262,9 +263,9 @@ configure-$(1): target_CXXFLAGS=$($(1)_target_CXXFLAGS)
|
||||
configure-$(1): target_LDFLAGS=$($(1)_target_LDFLAGS)
|
||||
configure-$(1): target_CCASFLAGS=$($(1)_target_CCASFLAGS)
|
||||
|
||||
configure-$(1): $(BuildPath)/$(1)-$(TargetTuple)/config.status
|
||||
configure-$(1): $(BuildPath)/$(TargetTuple)/config.status
|
||||
|
||||
$(BuildPath)/$(1)-$(TargetTuple)/config.status: | $(BuildPath)/$(1)-$(TargetTuple)
|
||||
$(BuildPath)/$(TargetTuple)/config.status: | $(BuildPath)/$(TargetTuple)
|
||||
$$(call configure-arch,$(1))
|
||||
|
||||
do-build-$(1): configure-$(1)
|
||||
|
||||
@@ -25,7 +25,7 @@ $ make -f examples/Makefile-cc2538
|
||||
```
|
||||
|
||||
After a successful build, the `elf` files are found in
|
||||
`<path-to-openthread>/output/bin`. You can convert them to `bin`
|
||||
`<path-to-openthread>/output/cc2538/bin`. You can convert them to `bin`
|
||||
files using `arm-none-eabi-objcopy`:
|
||||
```bash
|
||||
$ arm-none-eabi-objcopy -O binary arm-none-eabi-ot-cli-ftd arm-none-eabi-ot-cli-ftd.bin
|
||||
|
||||
@@ -61,19 +61,19 @@ $ make -f examples/Makefile-cc2650
|
||||
## Flash Binaries
|
||||
|
||||
If the build completed successfully, the `elf` files may be found in
|
||||
`<path-to-openthread>/output/bin`.
|
||||
`<path-to-openthread>/output/cc2650/bin`.
|
||||
|
||||
To flash the images with [Flash Programmer 2][ti-flash-programmer-2], the files
|
||||
must have the `*.elf` extension.
|
||||
```bash
|
||||
$ cd <path-to-openthread>/output/bin
|
||||
$ cd <path-to-openthread>/output/cc2650/bin
|
||||
$ cp arm-none-eabi-ot-cli arm-none-eabi-ot-cli.elf
|
||||
```
|
||||
|
||||
To load the images with the [serial bootloader][ti-cc2650-bootloader], the
|
||||
images must be converted to `bin`. This is done using `arm-none-eabi-objcopy`
|
||||
```bash
|
||||
$ cd <path-to-openthread>/output/bin
|
||||
$ cd <path-to-openthread>/output/cc2650/bin
|
||||
$ arm-none-eabi-objcopy -O binary arm-none-eabi-ot-cli arm-none-eabi-ot-cli.bin
|
||||
```
|
||||
The [cc2538-bsl.py script][cc2538-bsl-tool] provides a convenient method
|
||||
|
||||
@@ -38,7 +38,7 @@ Flash Binaries:
|
||||
2. Return to previous terminal window and execute a command in order to flash the board:
|
||||
|
||||
```bash
|
||||
$ ./cli_programmer gdbserver write_qspi_exec ../../../output/bin/arm-none-eabi-ot-cli-ftd.bin
|
||||
$ ./cli_programmer gdbserver write_qspi_exec ../../../output/da15000/bin/arm-none-eabi-ot-cli-ftd.bin
|
||||
```
|
||||
|
||||
## Interact:
|
||||
|
||||
@@ -23,7 +23,7 @@ $ make -f examples/Makefile-nrf52840
|
||||
```
|
||||
|
||||
After a successful build, the `elf` files can be found in
|
||||
`<path-to-openthread>/output/bin`. You can convert them to `hex`
|
||||
`<path-to-openthread>/output/nrf52840/bin`. You can convert them to `hex`
|
||||
files using `arm-none-eabi-objcopy`:
|
||||
```bash
|
||||
$ arm-none-eabi-objcopy -O ihex arm-none-eabi-ot-cli-ftd arm-none-eabi-ot-cli-ftd.hex
|
||||
@@ -37,7 +37,7 @@ part of the [nRF5x Command Line Tools][nRF5x-Command-Line-Tools].
|
||||
[nRF5x-Command-Line-Tools]: https://www.nordicsemi.com/eng/Products/nRF52840#Downloads
|
||||
|
||||
```bash
|
||||
$ nrfjprog -f nrf52 --chiperase --program output/bin/arm-none-eabi-ot-cli-ftd.hex
|
||||
$ nrfjprog -f nrf52 --chiperase --program output/nrf52840/bin/arm-none-eabi-ot-cli-ftd.hex
|
||||
$ nrfjprog -f nrf52 -r
|
||||
```
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
arm-none-eabi-objcopy -O binary ../../../output/bin/arm-none-eabi-ot-cli-ftd ../../../output/bin/arm-none-eabi-ot-cli-ftd.bin
|
||||
arm-none-eabi-objcopy -O binary ../../../output/da15000/bin/arm-none-eabi-ot-cli-ftd ../../../output/da15000/bin/arm-none-eabi-ot-cli-ftd.bin
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user