Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
esp32: re-implement integrate_btstack in python as rsync is missing i…
…n prebuild esp-idf windows toolchain
- Loading branch information
Showing
4 changed files
with
130 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,52 @@ | |||
#!/usr/bin/env python | |||
|
|||
# | |||
# Add btstack component to esp-idf | |||
# | |||
|
|||
import os | |||
import sys | |||
import shutil | |||
import create_examples | |||
|
|||
if not 'IDF_PATH' in os.environ: | |||
print('Error: IDF_PATH not defined. Please set IDF_PATH as described here:\nhttp://esp-idf.readthedocs.io/en/latest/get-started/index.html#get-started-get-esp-idf'); | |||
sys.exit(10) | |||
|
|||
IDF_PATH=os.environ['IDF_PATH'] | |||
print("IDF_PATH=%s" % IDF_PATH) | |||
|
|||
IDF_COMPONENTS=IDF_PATH + "/components" | |||
|
|||
if not os.path.exists(IDF_COMPONENTS): | |||
print("Error: No components folder at $IDF_PATH/components, please check IDF_PATH") | |||
sys.exit(10) | |||
|
|||
IDF_BTSTACK=IDF_COMPONENTS+"/btstack" | |||
|
|||
if os.path.exists(IDF_BTSTACK): | |||
print("Deleting old BTstack component %s" % IDF_BTSTACK) | |||
shutil.rmtree(IDF_BTSTACK) | |||
|
|||
# get local dir | |||
local_dir = os.path.abspath(os.path.dirname(sys.argv[0])) | |||
|
|||
# create components/btstack | |||
print("Creating BTstack component at %s" % IDF_COMPONENTS) | |||
shutil.copytree(local_dir+'/components/btstack', IDF_BTSTACK) | |||
|
|||
dirs_to_copy = [ | |||
'src', | |||
'3rd-party/bluedroid', | |||
'3rd-party/hxcmod-player', | |||
'platform/freertos', | |||
'platform/embedded', | |||
'tool' | |||
] | |||
|
|||
for dir in dirs_to_copy: | |||
print('- %s' % dir) | |||
shutil.copytree(local_dir + '/../../' + dir, IDF_BTSTACK + '/' + dir) | |||
|
|||
# create example/btstack | |||
create_examples.create_examples(local_dir) |
This file was deleted.
Oops, something went wrong.