Skip to content

Commit 612bbf8

Browse files
fix mac support: change macos to macosx
1 parent 1c12d19 commit 612bbf8

File tree

5 files changed

+25
-2
lines changed

5 files changed

+25
-2
lines changed

platform.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,-
4848
compiler.size.cmd=arm-none-eabi-size
4949
compiler.define=-DARDUINO=
5050
compiler.platform.path={runtime.platform.path}/tools/windows/
51-
compiler.platform.path.macos={runtime.platform.path}/tools/macos/
51+
compiler.platform.path.macosx={runtime.platform.path}/tools/macosx/
5252
compiler.platform.path.linux={runtime.platform.path}/tools/linux/
5353
compiler.hex2dfu.cmd=dfu-suffix
5454
compiler.hex2dfu.cmd.windows=dfu-suffix.exe
@@ -106,7 +106,7 @@ recipe.size.regex=\.text\s+([0-9]+).*
106106
tools.stm32l4_upload.cmd=stm32l4-upload
107107
tools.stm32l4_upload.cmd.windows=stm32l4-upload.bat
108108
tools.stm32l4_upload.path={runtime.platform.path}/tools/windows
109-
tools.stm32l4_upload.path.macos={runtime.platform.path}/tools/macos
109+
tools.stm32l4_upload.path.macosx={runtime.platform.path}/tools/macosx
110110
tools.stm32l4_upload.path.linux={runtime.platform.path}/tools/linux
111111
tools.stm32l4_upload.upload.params.verbose=-v
112112
tools.stm32l4_upload.upload.params.quiet=
File renamed without changes.
File renamed without changes.
File renamed without changes.

tools/macosx/stm32l4-upload

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
TOOLDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
4+
5+
echo $TOOLDIR
6+
7+
RETRIES=10
8+
9+
while [ $RETRIES -gt 0 ]
10+
do
11+
if [ "$($TOOLDIR/dfu-util -l 2>/dev/null | grep 0483:df11)" != "" ]
12+
then
13+
$TOOLDIR/dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D $1
14+
echo "OK"
15+
exit 0
16+
fi
17+
echo $RETRIES
18+
RETRIES=$[$RETRIES -1];
19+
sleep 1;
20+
done
21+
22+
echo "FAIL"
23+
exit 0

0 commit comments

Comments
 (0)