pic32-harmony: more path rewrites to fix command line compile of generated examples

This commit is contained in:
Matthias Ringwald 2018-01-04 21:15:06 +01:00
parent ac8561b956
commit cafe0b8236

View File

@ -100,6 +100,7 @@ for file in os.listdir(examples_embedded):
template = template.replace("<itemPath>../../../example/spp_and_le_counter.c", "<itemPath>../../../../framework/btstack/example/" + example + ".c")
template = template.replace(">../../../../driver", ">../../../../framework/driver")
template = template.replace(">../../../../system", ">../../../../framework/system")
template = template.replace(">../../../../../bin/framework/peripheral", ">../../../../bin/framework/peripheral")
template = template.replace(">../../../chipset", ">../../../../framework/btstack/chipset")
template = template.replace(">../../../platform", ">../../../../framework/btstack/platform")
template = template.replace(">../../../3rd-party", ">../../../../framework/btstack/3rd-party")
@ -112,6 +113,25 @@ for file in os.listdir(examples_embedded):
template = template.replace(";../../../src", ";../../../../framework/btstack/src")
template = template.replace(";../../../3rd-party", ";../../../../framework/btstack/3rd-party")
template = template.replace(";../src", ";../../../../framework/btstack/port/pic32-harmony/src")
template = template.replace(">../../../../../bin/framework/peripheral", ">../../../../bin/framework/peripheral")
template = template.replace('value=".;', 'value="..;')
# more or less the same for the command line build
template = template.replace('-I"../../../chipset/csr"', '-I"../../../../framework/btstack/chipset/csr"')
template = template.replace('-I"../../../src"', '-I"../../../../framework/btstack/src"')
template = template.replace('-I"../../../platform', '-I"../../../../framework/btstack/platform')
template = template.replace('-I"../src"', '-I"../../../../framework/btstack/port/pic32-harmony/src"')
template = template.replace('-I"../../../.."', '-I"../../../../framework"')
template = template.replace('-I"."', '-I".."')
template = template.replace("../../../../driver", "../../../../framework/driver")
template = template.replace("../../../../system", "../../../../framework/system")
template = template.replace("../../../../../bin/framework/peripheral", "../../../../bin/framework/peripheral")
template = template.replace("../../../3rd-party", "../../../../framework/btstack/3rd-party")
template = template.replace("../../../chipset", "../../../../framework/btstack/chipset")
template = template.replace("../../../platform", "../../../../framework/btstack/platform")
template = template.replace("../../../src", "../../../../framework/btstack/src")
template = template.replace("../src/app_debug.c", "../../../../framework/btstack/port/pic32-harmony/src/app_debug.c")
template = template.replace("../src/app.c", "../../../../framework/btstack/port/pic32-harmony/src/app.c")
template = template.replace("../src/btstack_port.c", "../../../../framework/btstack/port/pic32-harmony/src/btstack_port.c")
template = template.replace("../src/main.c", "../../../../framework/btstack/port/pic32-harmony/src/main.c")
template = template.replace("../src/system_config", "../../../../framework/btstack/port/pic32-harmony/src/system_config")
template = template.replace("../../../example/spp_and_le_counter.c", "../../../../framework/btstack/example/" + example + ".c")
fout.write(template)