Skip to content

Commit

Permalink
build: export flashing and debugging info, when present
Browse files Browse the repository at this point in the history
Zephyr supports the flash and debug targets via per-board information
in Makefile.board files.

It is sometimes convenient to know this information when inspecting
the build artifacts or doing exotic builds, so include it in the file
generated by outputexports. The information in Makefile.board provides
what is needed.

Therefore, ensure that Makefile.board, when present, is included by
the generated Makefile.export. This gives users of Makefile.export
access to variables like FLASH_SCRIPT, PYOCD_TARGET, etc. (These users
need to cope with these variables being undefined if not given in
Makefile.board, or if Makefile.board does not exist for a target.)

While we're here, don't export INSTALLKERNEL. That's Linux-specific
and otherwise unused; the Zephyr equivalent is FLASH_SCRIPT and its
associated variables.

Signed-off-by: Marti Bolivar <[email protected]>
  • Loading branch information
Marti Bolivar authored and galak committed Jul 25, 2017
1 parent 45eac21 commit 497f8fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ exports += VERSION_MAJOR VERSION_MINOR PATCHLEVEL VERSION_RESERVED EXTRAVERSION
exports += KERNELRELEASE KERNELVERSION
exports += ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC CXX
exports += CPP AR NM STRIP OBJCOPY OBJDUMP GDB
exports += MAKE AWK INSTALLKERNEL PERL PYTHON
exports += MAKE AWK PERL PYTHON
exports += HOSTCXX HOSTCXXFLAGS CHECK CHECKFLAGS

exports += KBUILD_CPPFLAGS NOSTDINC_FLAGS ZEPHYRINCLUDE OBJCOPYFLAGS LDFLAGS
Expand All @@ -435,7 +435,8 @@ define filechk_Makefile.export
echo "BOARD=$(BOARD)"; \
echo; \
$(foreach e,$(exports),echo $(e)=$($(e));) echo; \
echo "include $(O)/include/config/auto.conf";)
echo "include $(O)/include/config/auto.conf"; \
echo "-include $(srctree)/boards/$(ARCH)/$(BOARD_NAME)/Makefile.board";)
endef

# Files to ignore in find ... statements
Expand Down

0 comments on commit 497f8fd

Please sign in to comment.