@@ -34,29 +34,29 @@ PROFILE=release
34
34
35
35
for i in " $@ " ; do
36
36
case $i in
37
- -a=* | --app=* )
38
- APP=" ${i#* =} "
39
- shift
40
- ;;
41
- -b=* | --board=* )
42
- TARGET_BOARD=" ${i#* =} "
43
- shift
44
- ;;
45
- -t=* | --toolchain=* )
46
- TOOLCHAIN=" ${i#* =} "
47
- shift
48
- ;;
49
- -p=* | --profile=* )
50
- PROFILE=" ${i#* =} "
51
- shift
52
- ;;
53
- -c=* | --command=* )
54
- COMMAND=" ${i#* =} "
55
- shift
56
- ;;
57
- * )
58
- # unknown option
59
- ;;
37
+ -a=* | --app=* )
38
+ APP=" ${i#* =} "
39
+ shift
40
+ ;;
41
+ -b=* | --board=* )
42
+ TARGET_BOARD=" ${i#* =} "
43
+ shift
44
+ ;;
45
+ -t=* | --toolchain=* )
46
+ TOOLCHAIN=" ${i#* =} "
47
+ shift
48
+ ;;
49
+ -p=* | --profile=* )
50
+ PROFILE=" ${i#* =} "
51
+ shift
52
+ ;;
53
+ -c=* | --command=* )
54
+ COMMAND=" ${i#* =} "
55
+ shift
56
+ ;;
57
+ * )
58
+ # unknown option
59
+ ;;
60
60
esac
61
61
done
62
62
@@ -100,26 +100,22 @@ if [[ "$COMMAND" == *"build"* ]]; then
100
100
# Config directory setup
101
101
MBED_CONFIG_PATH=" $APP " /mbed/cmake_build/" $TARGET_BOARD " /develop/" $TOOLCHAIN " /
102
102
103
- # Override Mbed OS path to development directory
104
- MBED_OS_PATH=" $CHIP_ROOT " /third_party/mbed-os/repo
103
+ # Set Mbed OS path
104
+ export MBED_OS_PATH=" $CHIP_ROOT " /third_party/mbed-os/repo
105
105
106
- # Create symlinks to mbed-os submodule
107
- ln -sfTr " $MBED_OS_PATH " " $APP /mbed/mbed-os"
108
-
109
- # Create symlinks to mbed-os-posix-socket submodule
110
- MBED_OS_POSIX_SOCKET_PATH=" $CHIP_ROOT " /third_party/mbed-os-posix-socket/repo
111
- ln -sfTr " $MBED_OS_POSIX_SOCKET_PATH " " $APP /mbed/mbed-os-posix-socket"
106
+ # Set Mbed OS posix socket submodule path
107
+ export MBED_OS_POSIX_SOCKET_PATH=" $CHIP_ROOT " /third_party/mbed-os-posix-socket/repo
112
108
113
109
if [ " $TARGET_BOARD " == " DISCO_L475VG_IOT01A" ]; then
114
- # Add the Mbed OS driver for the ISM43362 Wi-Fi module
115
- WIFI_ISM43362_PATH=" $CHIP_ROOT " /third_party/wifi-ism43362/repo
110
+ # Set ISM43362 Wi-Fi submodule path
111
+ export WIFI_ISM43362_PATH=" $CHIP_ROOT " /third_party/wifi-ism43362/repo
116
112
117
113
# Create symlinks to WIFI-ISM43362 submodule
118
114
ln -sfTr " $WIFI_ISM43362_PATH " " $APP /mbed/wifi-ism43362"
119
115
fi
120
116
121
117
# Generate config file for selected target, toolchain and hardware
122
- mbed-tools configure -t " $TOOLCHAIN " -m " $TARGET_BOARD " -p " $APP " /mbed/
118
+ mbed-tools configure -t " $TOOLCHAIN " -m " $TARGET_BOARD " -p " $APP " /mbed/ --mbed-os-path " $MBED_OS_PATH "
123
119
124
120
# Remove old artifacts to force linking
125
121
rm -rf " $BUILD_DIRECTORY /chip-" *
0 commit comments