Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build.project_path to global properties #119

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1cd9892
Add build.project_path to global properties
robertinant Feb 23, 2016
cbfac02
Merge remote-tracking branch 'upstream/master'
robertinant Apr 5, 2016
c8802e6
Merge remote-tracking branch 'upstream/master'
robertinant May 9, 2016
d477124
Merge remote-tracking branch 'upstream/master'
robertinant May 18, 2016
1b55832
Merge remote-tracking branch 'upstream/master'
robertinant Sep 21, 2016
587d4ed
Merge remote-tracking branch 'upstream/master'
robertinant Dec 2, 2016
e2a088b
Merge remote-tracking branch 'upstream/master'
robertinant Jan 19, 2017
2f15b07
Merge remote-tracking branch 'upstream/master'
robertinant Feb 6, 2017
5338fd7
Merge remote-tracking branch 'upstream/master'
robertinant Mar 28, 2017
dc12b57
Merge branch 'master' of https://github.com/robertinant/arduino-builder
robertinant May 1, 2017
38fbf48
Merge remote-tracking branch 'upstream/master'
robertinant May 1, 2017
42a4197
Merge remote-tracking branch 'upstream/master'
robertinant Jun 26, 2017
95ebd3c
Crash work-around for EMT targets
robertinant Jul 17, 2017
33c223f
Merge remote-tracking branch 'upstream/master'
robertinant Oct 16, 2017
c13c265
Merge remote-tracking branch 'upstream/master'
robertinant Dec 14, 2017
e491803
Merge branch 'master' of https://github.com/robertinant/arduino-builder
robertinant Jan 15, 2018
f018c46
Merge remote-tracking branch 'upstream/master'
robertinant Jan 15, 2018
11c1c76
Merge branch 'master' of https://github.com/robertinant/arduino-builder
robertinant Jan 26, 2018
bc166b6
Merge remote-tracking branch 'upstream/master'
robertinant Mar 22, 2018
a891e65
Merge remote-tracking branch 'upstream/master'
robertinant Jul 17, 2018
ac4876e
Merge remote-tracking branch 'upstream/master'
robertinant Sep 4, 2018
161ae86
Merge remote-tracking branch 'upstream/master'
robertinant Sep 13, 2018
5f36fff
Merge branch 'master' of https://github.com/robertinant/arduino-builder
robertinant May 1, 2019
5c391e4
Merge remote-tracking branch 'upstream/master'
robertinant May 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const BUILD_PROPERTIES_BUILD_CORE_PATH = "build.core.path"
const BUILD_PROPERTIES_BUILD_MCU = "build.mcu"
const BUILD_PROPERTIES_BUILD_PATH = "build.path"
const BUILD_PROPERTIES_BUILD_PROJECT_NAME = "build.project_name"
const BUILD_PROPERTIES_BUILD_PROJECT_PATH = "build.project_path"
const BUILD_PROPERTIES_BUILD_SYSTEM_PATH = "build.system.path"
const BUILD_PROPERTIES_BUILD_VARIANT = "build.variant"
const BUILD_PROPERTIES_BUILD_VARIANT_PATH = "build.variant.path"
Expand Down
11 changes: 10 additions & 1 deletion container_find_includes.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,16 @@ func queueSourceFilesFromFolder(ctx *types.Context, queue *types.UniqueSourceFil
if err != nil {
return i18n.WrapError(err)
}
queue.Push(sourceFile)
/*
* hack: This is for Energia EMT targets to skip main.cpp
* When the cache file is build the first time, main.cpp is not there yet
* in the <build folder>/sketch.
* On a second run it is there and the cache mismatches that of what is on disk
* resulting in a pointer outside the cache array.
*/
if sourceFile.RelativePath != "main.cpp" {
queue.Push(sourceFile)
}
}

return nil
Expand Down
1 change: 1 addition & 0 deletions setup_build_properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func (s *SetupBuildProperties) Run(ctx *types.Context) error {
}
if ctx.Sketch != nil {
buildProperties[constants.BUILD_PROPERTIES_BUILD_PROJECT_NAME] = filepath.Base(ctx.Sketch.MainFile.Name)
buildProperties[constants.BUILD_PROPERTIES_BUILD_PROJECT_PATH] = filepath.Dir(ctx.Sketch.MainFile.Name)
}
buildProperties[constants.BUILD_PROPERTIES_BUILD_ARCH] = strings.ToUpper(targetPlatform.PlatformId)

Expand Down