You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/06/27 22:33:48 UTC
incubator-mynewt-newt git commit: newt build;
add defines for name of BSP and name of APP being compiled.
Repository: incubator-mynewt-newt
Updated Branches:
refs/heads/develop e9b63a794 -> ad1489e20
newt build; add defines for name of BSP and name of APP being compiled.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/ad1489e2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/ad1489e2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/ad1489e2
Branch: refs/heads/develop
Commit: ad1489e20f9572da3091534c6abb3afb07018f53
Parents: e9b63a7
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Jun 27 15:32:58 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Jun 27 15:32:58 2016 -0700
----------------------------------------------------------------------
newt/builder/build.go | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/ad1489e2/newt/builder/build.go
----------------------------------------------------------------------
diff --git a/newt/builder/build.go b/newt/builder/build.go
index 0044d6a..d8a1e0a 100644
--- a/newt/builder/build.go
+++ b/newt/builder/build.go
@@ -377,8 +377,14 @@ func (b *Builder) PrepBuild() error {
if err != nil {
return err
}
- // Define a cpp symbol indicating the BSP architecture.
+ // Define a cpp symbol indicating the BSP architecture, name of the BSP and app.
bspCi.Cflags = append(bspCi.Cflags, "-DARCH_"+b.Bsp.Arch)
+ bspCi.Cflags = append(bspCi.Cflags,
+ "-DBSP_NAME=\""+filepath.Base(b.Bsp.Name())+"\"");
+ if appPkg != nil {
+ bspCi.Cflags = append(bspCi.Cflags,
+ "-DAPP_NAME=\""+filepath.Base(appPkg.Name())+"\"");
+ }
baseCi.AddCompilerInfo(bspCi)
// Target flags.