Skip to content

Commit 9f67d83

Browse files
authored
build: place generated ld script into build directory (#5043)
arduino-builder 1.3.25 (shipped with Arduino 1.8.5) forces full recompilation when any file in the core directory is modified. Avoid full recompilation by placing generated ld script into build directory, not source directory. Also fix an issue where git version description would not be generated if there were spaces in build path.
1 parent b657090 commit 9f67d83

20 files changed

+21
-21
lines changed

platform.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ compiler.elf2hex.extra_flags=
7474
## generate file with git version number
7575
## needs bash, git, and echo
7676
recipe.hooks.core.prebuild.1.pattern=bash -c "mkdir -p {build.path}/core && echo \#define ARDUINO_ESP8266_GIT_VER 0x`git --git-dir {runtime.platform.path}/.git rev-parse --short=8 HEAD 2>/dev/null || echo ffffffff` >{build.path}/core/core_version.h"
77-
recipe.hooks.core.prebuild.2.pattern=bash -c "mkdir -p {build.path}/core && echo \#define ARDUINO_ESP8266_GIT_DESC `cd {runtime.platform.path}; git describe --tags 2>/dev/null || echo unix-{version}` >>{build.path}/core/core_version.h"
77+
recipe.hooks.core.prebuild.2.pattern=bash -c "mkdir -p {build.path}/core && echo \#define ARDUINO_ESP8266_GIT_DESC `cd "{runtime.platform.path}"; git describe --tags 2>/dev/null || echo unix-{version}` >>{build.path}/core/core_version.h"
7878
## windows-compatible version without git
7979
recipe.hooks.core.prebuild.1.pattern.windows=cmd.exe /c mkdir {build.path}\core & (echo #define ARDUINO_ESP8266_GIT_VER 0x00000000 & echo #define ARDUINO_ESP8266_GIT_DESC win-{version} ) > {build.path}\core\core_version.h
8080
recipe.hooks.core.prebuild.2.pattern.windows=
8181

8282
## Build the app.ld linker file
83-
recipe.hooks.linking.prelink.1.pattern="{compiler.path}{compiler.c.cmd}" -CC -E -P {build.vtable_flags} "{runtime.platform.path}/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "{runtime.platform.path}/tools/sdk/ld/eagle.app.v6.common.ld"
83+
recipe.hooks.linking.prelink.1.pattern="{compiler.path}{compiler.c.cmd}" -CC -E -P {build.vtable_flags} "{runtime.platform.path}/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "{build.path}/eagle.app.v6.common.ld"
8484

8585
## Compile c files
8686
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.c.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {build.led} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"

tools/boards.txt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ def flash_size (size_bytes, display, optname, ld, desc, max_upload_size, spiffs_
11441144
print("PROVIDE ( _SPIFFS_page = 0x%X );" % page)
11451145
print("PROVIDE ( _SPIFFS_block = 0x%X );" % block)
11461146
print("")
1147-
print('INCLUDE "../ld/eagle.app.v6.common.ld"')
1147+
print('INCLUDE "eagle.app.v6.common.ld"')
11481148

11491149
if ldgen:
11501150
sys.stdout.close()

tools/sdk/ld/eagle.flash.16m.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x411FB000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x2000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.1m0.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ PROVIDE ( _SPIFFS_end = 0x402FB000 );
1515
PROVIDE ( _SPIFFS_page = 0x0 );
1616
PROVIDE ( _SPIFFS_block = 0x0 );
1717

18-
INCLUDE "../ld/eagle.app.v6.common.ld"
18+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.1m128.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x402FB000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x1000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.1m144.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x402FB000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x1000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.1m160.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x402FB000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x1000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.1m192.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x402FB000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x1000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.1m256.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x402FB000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x1000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.1m512.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x402FB000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x2000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.1m64.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x402FB000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x1000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.2m.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x403FB000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x2000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.4m.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x405FB000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x2000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.4m1m.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ PROVIDE ( _SPIFFS_end = 0x405FB000 );
1717
PROVIDE ( _SPIFFS_page = 0x100 );
1818
PROVIDE ( _SPIFFS_block = 0x2000 );
1919

20-
INCLUDE "../ld/eagle.app.v6.common.ld"
20+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.4m2m.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ PROVIDE ( _SPIFFS_end = 0x405FB000 );
1717
PROVIDE ( _SPIFFS_page = 0x100 );
1818
PROVIDE ( _SPIFFS_block = 0x2000 );
1919

20-
INCLUDE "../ld/eagle.app.v6.common.ld"
20+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.512k0.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ PROVIDE ( _SPIFFS_end = 0x4027B000 );
1515
PROVIDE ( _SPIFFS_page = 0x0 );
1616
PROVIDE ( _SPIFFS_block = 0x0 );
1717

18-
INCLUDE "../ld/eagle.app.v6.common.ld"
18+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.512k128.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x4027B000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x1000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.512k32.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x4027B000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x1000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.512k64.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x4027B000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x1000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

tools/sdk/ld/eagle.flash.8m.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ PROVIDE ( _SPIFFS_end = 0x409FB000 );
1616
PROVIDE ( _SPIFFS_page = 0x100 );
1717
PROVIDE ( _SPIFFS_block = 0x2000 );
1818

19-
INCLUDE "../ld/eagle.app.v6.common.ld"
19+
INCLUDE "eagle.app.v6.common.ld"

0 commit comments

Comments
 (0)