Skip to content

Commit 73a9459

Browse files
committed
Use prefix for include paths
1 parent 33ca4a4 commit 73a9459

File tree

7 files changed

+1343
-1346
lines changed

7 files changed

+1343
-1346
lines changed

mbed-os-to-arduino

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ echo -e "{\n\"macros\": [\n\"MBED_HEAP_STATS_ENABLED=1\",\n\"MBED_STACK_STATS_EN
1414
mbed compile -v | grep "Macros:" > $BOARDNAME.macros.txt
1515
cat $BOARDNAME.macros.txt | cut -f2 -d":" > $ARDUINOCORE/defines.txt
1616
echo " -DMBED_NO_GLOBAL_USING_DIRECTIVE=1" >> $ARDUINOCORE/defines.txt
17-
xargs -n 1 < ./BUILD/$BOARDNAME/GCC_ARM/.include* | sed -e 's#./mbed-os#{build.core.path}/mbed#g' | sed -e 's#-I/.*$##' | tac > $ARDUINOCORE/includes.txt
17+
xargs -n 1 < ./BUILD/$BOARDNAME/GCC_ARM/.include* | sed -e 's#-I./mbed-os#-iwithprefixbefore/mbed#g' | sed '/^-I./ d' | tac > $ARDUINOCORE/includes.txt
1818

1919
#TODO: remove -I{build.core.path}/mbed/drivers from includes.txt (name clashing with libraries)
2020

platform.txt

+2-5
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,11 @@ build.zip.pattern={recipe.size.pattern}
6565
# Linux compile patterns
6666
# -----------------------
6767

68-
## Prepare include file
69-
recipe.hooks.prebuild.1.pattern="{runtime.tools.expand-property-map.path}" -in "{compiler.mbed.includes}" -out "{build.path}/preprocess/includes.txt"
70-
7168
## Compile c files
72-
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {compiler.c.extra_flags} "-I{build.core.path}/api/deprecated" {includes} "@{build.path}/preprocess/includes.txt" -o "{object_file}" "{source_file}"
69+
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {compiler.c.extra_flags} "-I{build.core.path}/api/deprecated" {includes} "-iprefix{build.core.path}" @{compiler.mbed.includes} -o "{object_file}" "{source_file}"
7370

7471
## Compile c++ files
75-
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {compiler.cpp.extra_flags} "-I{build.core.path}/api/deprecated" {includes} "@{build.path}/preprocess/includes.txt" "{source_file}" -o "{object_file}"
72+
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {compiler.cpp.extra_flags} "-I{build.core.path}/api/deprecated" {includes} "-iprefix{build.core.path}" @{compiler.mbed.includes} "{source_file}" -o "{object_file}"
7673

7774
## Create archives
7875
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"

variants/DISCO_F429ZI/includes.txt

+237-237
Large diffs are not rendered by default.

variants/ENVIE_M4/includes.txt

+261-261
Large diffs are not rendered by default.

variants/MBED_CONNECT_ODIN/includes.txt

+278-278
Large diffs are not rendered by default.

variants/NRF52840_DK/includes.txt

+325-325
Large diffs are not rendered by default.

variants/NUCLEO_H743ZI/includes.txt

+239-239
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)