File tree 2 files changed +21
-3
lines changed
2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,17 @@ OCFBASEPATH=`jq --raw-output '.ocf_base_path' ${CURPWD}/${PROJNAME}-config.json`
6
6
# TODO Go through DeviceBuilder for each of the implementations and platforms (just doing the first array element for this example)
7
7
OCFSUBPATH=` jq --raw-output ' .implementation_paths[0]' ${CURPWD} /${PROJNAME} -config.json`
8
8
OCFPATH=" ${OCFBASEPATH}${OCFSUBPATH} "
9
+ PLATFORM=` jq --raw-output ' .platforms[0]' ${CURPWD} /${PROJNAME} -config.json`
9
10
10
- if [ " $OCFSUBPATH " == " /iot" ]; then
11
+ if [ " $PLATFORM " == " esp32" ]; then
12
+ MY_COMMAND=" cd ${OCFPATH} /iotivity-lite/port/${PLATFORM} /"
13
+ eval ${MY_COMMAND}
14
+ MY_COMMAND=" idf.py erase_flash"
15
+ eval ${MY_COMMAND}
16
+ cd $CURPWD
17
+ elif [ " $PLATFORM " == " arduino" ]; then
18
+ echo " Arduino reset"
19
+ elif [ " $OCFSUBPATH " == " /iot" ]; then
11
20
rm -f ./bin/server_security.dat
12
21
MY_COMMAND=" cp ${OCFPATH} /iotivity/resource/csdk/security/provisioning/sample/oic_svr_db_server_justworks.dat ./bin/server_security.dat"
13
22
eval ${MY_COMMAND}
Original file line number Diff line number Diff line change 2
2
CURPWD=` pwd`
3
3
PROJNAME=${PWD##*/ }
4
4
5
- cd ./bin
5
+ PLATFORM=` jq --raw-output ' .platforms[0]' ${CURPWD} /${PROJNAME} -config.json`
6
+
7
+ if [ " $PLATFORM " == " esp32" ]; then
8
+ MY_COMMAND=" cd ${OCFPATH} /iotivity-lite/port/${PLATFORM} /"
9
+ eval ${MY_COMMAND}
10
+ MY_COMMAND=" idf.py -p /dev/ttyUSB0 flash monitor"
11
+ eval ${MY_COMMAND}
12
+ else
13
+ cd ./bin
14
+ ./${PROJNAME}
15
+ fi
6
16
7
- ./${PROJNAME}
8
17
cd ${CURPWD}
You can’t perform that action at this time.
0 commit comments