Skip to content

Commit 6388636

Browse files
authoredFeb 20, 2023
Merge pull request #89 from fpistm/maple_upload
feat: unified maple_upload and dfu_util scripts (remove maple_loader.jar usage)
2 parents 556da4a + 6c359df commit 6388636

File tree

195 files changed

+6335
-19319
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+6335
-19319
lines changed
 

‎.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ __pycache__/
3333
!.vscode/tasks.json
3434
!.vscode/launch.json
3535
!.vscode/extensions.json
36-
*.code-workspace
36+
*.code-workspace
37+
*.o

‎dfu-util.sh

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/sh -
2+
#
3+
# Use the correct dfu-util program based on the architecture
4+
#
5+
6+
# Get the directory where the script is running.
7+
DIR=$(cd "$(dirname "$0")" && pwd)
8+
UNAME_OS="$(uname -s)"
9+
case "${UNAME_OS}" in
10+
Linux*)
11+
# Choose dfu program by arch
12+
if [ "$(uname -m)" = "x86_64" ]; then
13+
DFU_UTIL=${DIR}/linux/dfu-util_x86_64/dfu-util
14+
else
15+
DFU_UTIL=${DIR}/linux/dfu-util/dfu-util
16+
fi
17+
;;
18+
Darwin*)
19+
DFU_UTIL=${DIR}/macosx/dfu-util/dfu-util
20+
if [ ! -x "${DFU_UTIL}" ]; then
21+
DFU_UTIL=/opt/local/bin/dfu-util
22+
fi
23+
;;
24+
Windows*)
25+
DFU_UTIL=${DIR}/win/dfu-util.exe
26+
;;
27+
*)
28+
echo "Unknown host OS: ${UNAME_OS}."
29+
exit 1
30+
;;
31+
esac
32+
33+
# Not found!
34+
if [ ! -x "${DFU_UTIL}" ]; then
35+
echo "$0: error: cannot find ${DFU_UTIL}" >&2
36+
exit 2
37+
fi
38+
39+
# Pass all parameters through
40+
"${DFU_UTIL}" "$@"

0 commit comments

Comments
 (0)
Failed to load comments.