Skip to content

Commit

Permalink
v1.0.4
Browse files Browse the repository at this point in the history
* Support newer Mbed-CLI version 1.8.3
        * this fixes a Makefile breakage for folks running the
          newer version.
        * the older version 1.2.2 placed the output files in
          a different path, thus breaking the Makefile

* Support minimum version of Python 2.7.12
        * this fixes a build breakage issue due to an upstream
          component with an unversioned dependency
  • Loading branch information
costanic committed Jan 24, 2019
2 parents 6264826 + c158529 commit ce85a4b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ifeq (${DEBUG}, )
BOOTLOADER_BUILD_PROFILE:=tiny.json
else
BUILD_PROFILE:=mbed-os/tools/profiles/debug.json
BOOTLOADER_BUILD_PROFILE:=tiny.json
endif

# Capture the GIT version that we are building from. Later in the compile
Expand Down Expand Up @@ -79,8 +80,16 @@ ifeq (${MBED_TOOLCHAIN},)
MBED_TOOLCHAIN:=${DEFAULT_TOOLCHAIN}
endif

# Specifies the path to the directory containing build output files
MBED_BUILD_DIR:=./BUILD/${MBED_TARGET}/${MBED_TOOLCHAIN}
# Specifies the path to the directory containing build output files.
# When building with mbed-cli 1.8.x, build profiles are appended to
# target build directory names in upper case letters.
# Example:
# ./BUILD/UBLOX_EVK_ODIN_W2/GCC_ARM/ becomes
# ./BUILD/UBLOX_EVK_ODIN_W2/GCC_ARM-RELEASE/
MBED_TOOLCHAIN_EXTENSION=-$(shell basename ${BUILD_PROFILE} .json | awk '{print toupper($$0)}')
BOOTLDR_TOOLCHAIN_EXTENSION=-$(shell basename ${BOOTLOADER_BUILD_PROFILE} .json | awk '{print toupper($$0)}')
MBED_BUILD_DIR:=./BUILD/${MBED_TARGET}/${MBED_TOOLCHAIN}${MBED_TOOLCHAIN_EXTENSION}
BOOTLDR_BUILD_DIR:=./BUILD/${MBED_TARGET}/${MBED_TOOLCHAIN}${BOOTLDR_TOOLCHAIN_EXTENSION}

# Maximum size for the bootloader. Any larger than this and it will
# overflow into the next partition and potentially overwrite other
Expand Down Expand Up @@ -141,7 +150,7 @@ define Build/Bootloader/Compile
endef

define Build/Bootloader/CheckSize
@blsize=$(shell tail -n 1 ${BOOTLDR_DIR}/${MBED_BUILD_DIR}/${BOOTLDR_DIR}_map.csv | awk -F',' '{ print $$NF }'); \
@blsize=$(shell tail -n 1 ${BOOTLDR_DIR}/${BOOTLDR_BUILD_DIR}/${BOOTLDR_PROG}_map.csv | awk -F',' '{ print $$NF }'); \
max=$(shell printf "%d" ${1}); \
if [ "$${blsize}" -gt "$${max}" ]; then \
echo "bootloader size $${blsize} is too big. max=$${max}"; \
Expand All @@ -162,7 +171,7 @@ ${PROG_BIN}: prepare ${SRCS} ${HDRS}

${BOOTLDR_BIN}: prepare
@$(call Build/Bootloader/Compile)
cp ${BOOTLDR_DIR}/${MBED_BUILD_DIR}/${BOOTLDR_PROG}.bin $@
cp ${BOOTLDR_DIR}/${BOOTLDR_BUILD_DIR}/${BOOTLDR_PROG}.bin $@

.PHONY: stats
stats:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To build this project, you need to install the following:
sudo apt-get install gcc-arm-embedded
```

3. Python 2.7 and pip.
3. Python 2.7.12+ and pip 9.0.3.

On a Mac, pip and virtualenv are not preinstalled. Here is how to install them:

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mbed-cli==1.2.2
mbed-cli==1.8.3
git+ssh://[email protected]/ARMmbed/[email protected]
git+ssh://[email protected]/ARMmbed/mbed-cloud-update-cli.git

0 comments on commit ce85a4b

Please sign in to comment.