Skip to content

Commit 1fae11a

Browse files
committed
2 parents 823fb8f + dac7ae7 commit 1fae11a

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ script:
3939
- echo -e "travis_fold:start:platformio_test_env_prepare"
4040
- pip install -U https://github.com/platformio/platformio/archive/develop.zip
4141
- platformio platform install https://github.com/platformio/platform-espressif32.git#feature/stage
42-
- sed -i 's/https:\/\/github\.com\/espressif\/arduino-esp32\.git/*/' ~/.platformio/platforms/espressif32_stage/platform.json
42+
- sed -i 's/https:\/\/github\.com\/espressif\/arduino-esp32\.git/*/' ~/.platformio/platforms/espressif32/platform.json
4343
- ln -s $TRAVIS_BUILD_DIR ~/.platformio/packages/framework-arduinoespressif32
4444
- echo -e "travis_fold:end:platformio_test_env_prepare"
4545
- echo -e "travis_fold:start:platformio_test"

tools/platformio-build.py

+14-11
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,19 @@
3636

3737
env.Prepend(
3838
CPPDEFINES=[
39-
("ARDUINO", 10610),
40-
"ARDUINO_ARCH_ESP32"
39+
("ARDUINO", 10805),
40+
"ARDUINO_ARCH_ESP32",
41+
("ARDUINO_BOARD", '\\"%s\\"' % env.BoardConfig().get("name").replace('"', ""))
4142
],
4243

4344
CFLAGS=["-Wno-old-style-declaration"],
4445

4546
CCFLAGS=[
4647
"-Wno-error=deprecated-declarations",
48+
"-Wno-error=unused-function",
4749
"-Wno-unused-parameter",
48-
"-Wno-sign-compare"
50+
"-Wno-sign-compare",
51+
"-fstack-protector"
4952
],
5053

5154
CPPPATH=[
@@ -115,7 +118,7 @@ def _get_board_flash_mode(env):
115118

116119
env.Append(
117120
__get_board_flash_mode=_get_board_flash_mode,
118-
121+
119122
LIBSOURCE_DIRS=[
120123
join(FRAMEWORK_DIR, "libraries")
121124
],
@@ -130,9 +133,9 @@ def _get_board_flash_mode(env):
130133
],
131134

132135
UPLOADERFLAGS=[
133-
"0x1000", '"%s"' % join(FRAMEWORK_DIR, "tools", "sdk", "bin", "bootloader_${BOARD_FLASH_MODE}_${__get_board_f_flash(__env__)}.bin"),
134-
"0x8000", '"%s"' % join("$BUILD_DIR", "partitions.bin"),
135-
"0xe000", '"%s"' % join(FRAMEWORK_DIR, "tools", "partitions", "boot_app0.bin"),
136+
"0x1000", join(FRAMEWORK_DIR, "tools", "sdk", "bin", "bootloader_${BOARD_FLASH_MODE}_${__get_board_f_flash(__env__)}.bin"),
137+
"0x8000", join("$BUILD_DIR", "partitions.bin"),
138+
"0xe000", join(FRAMEWORK_DIR, "tools", "partitions", "boot_app0.bin"),
136139
"0x10000"
137140
]
138141
)
@@ -174,11 +177,11 @@ def _get_board_flash_mode(env):
174177
#
175178
# Generate partition table
176179
#
177-
178180
partition_table = env.Command(
179181
join("$BUILD_DIR", "partitions.bin"),
180-
join(FRAMEWORK_DIR, "tools", "partitions", "default.csv"),
181-
env.VerboseAction('"$PYTHONEXE" "%s" -q $SOURCE $TARGET' %
182-
join(FRAMEWORK_DIR, "tools", "gen_esp32part.py"),
182+
join(FRAMEWORK_DIR, "tools", "partitions",
183+
"%s.csv" % env.BoardConfig().get("build.partitions", "default")),
184+
env.VerboseAction('"$PYTHONEXE" "%s" -q $SOURCE $TARGET' % join(
185+
FRAMEWORK_DIR, "tools", "gen_esp32part.py"),
183186
"Generating partitions $TARGET"))
184187
env.Depends("$BUILD_DIR/$PROGNAME$PROGSUFFIX", partition_table)

0 commit comments

Comments
 (0)