Skip to content

Commit 221cb35

Browse files
Added other upload tools etc
1 parent bb18830 commit 221cb35

File tree

658 files changed

+66818
-0
lines changed

Some content is hidden

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

658 files changed

+66818
-0
lines changed

boards.txt

Whitespace-only changes.

linux/45-maple.rules

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ATTRS{idProduct}=="1001", ATTRS{idVendor}=="0110", MODE="664", GROUP="plugdev"
2+
ATTRS{idProduct}=="1002", ATTRS{idVendor}=="0110", MODE="664", GROUP="plugdev"
3+
ATTRS{idProduct}=="0003", ATTRS{idVendor}=="1eaf", MODE="664", GROUP="plugdev" SYMLINK+="maple"
4+
ATTRS{idProduct}=="0004", ATTRS{idVendor}=="1eaf", MODE="664", GROUP="plugdev" SYMLINK+="maple"
5+

linux/49-stlinkv1.rules

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# stm32 discovery boards, with onboard st/linkv1
2+
# ie, STM32VL
3+
4+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3744", \
5+
MODE:="0666", \
6+
SYMLINK+="stlinkv1_%n"
7+
8+
# If you share your linux system with other users, or just don't like the
9+
# idea of write permission for everybody, you can replace MODE:="0666" with
10+
# OWNER:="yourusername" to create the device owned by you, or with
11+
# GROUP:="somegroupname" and mange access using standard unix groups.

linux/49-stlinkv2-1.rules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# stm32 nucleo boards, with onboard st/linkv2-1
2+
# ie, STM32F0, STM32F4.
3+
# STM32VL has st/linkv1, which is quite different
4+
5+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \
6+
MODE:="0666", \
7+
SYMLINK+="stlinkv2-1_%n"
8+
9+
# If you share your linux system with other users, or just don't like the
10+
# idea of write permission for everybody, you can replace MODE:="0666" with
11+
# OWNER:="yourusername" to create the device owned by you, or with
12+
# GROUP:="somegroupname" and mange access using standard unix groups.

linux/49-stlinkv2.rules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# stm32 discovery boards, with onboard st/linkv2
2+
# ie, STM32L, STM32F4.
3+
# STM32VL has st/linkv1, which is quite different
4+
5+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", \
6+
MODE:="0666", \
7+
SYMLINK+="stlinkv2_%n"
8+
9+
# If you share your linux system with other users, or just don't like the
10+
# idea of write permission for everybody, you can replace MODE:="0666" with
11+
# OWNER:="yourusername" to create the device owned by you, or with
12+
# GROUP:="somegroupname" and mange access using standard unix groups.

linux/dfu-util/dfu-prefix

46.3 KB
Binary file not shown.

linux/dfu-util/dfu-suffix

46.4 KB
Binary file not shown.

linux/dfu-util/dfu-util

145 KB
Binary file not shown.

linux/install.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
3+
if sudo [ -w /etc/udev/rules.d ]; then
4+
echo "Copying Maple-specific udev rules..."
5+
sudo cp -v 45-maple.rules /etc/udev/rules.d/45-maple.rules
6+
sudo chown root:root /etc/udev/rules.d/45-maple.rules
7+
sudo chmod 644 /etc/udev/rules.d/45-maple.rules
8+
sudo cp -v 49-stlinkv1.rules /etc/udev/rules.d/49-stlinkv1.rules
9+
sudo chown root:root /etc/udev/rules.d/49-stlinkv1.rules
10+
sudo chmod 644 /etc/udev/rules.d/49-stlinkv1.rules
11+
sudo cp -v 49-stlinkv2.rules /etc/udev/rules.d/49-stlinkv2.rules
12+
sudo chown root:root /etc/udev/rules.d/49-stlinkv2.rules
13+
sudo chmod 644 /etc/udev/rules.d/49-stlinkv2.rules
14+
sudo cp -v 49-stlinkv2-1.rules /etc/udev/rules.d/49-stlinkv2-1.rules
15+
sudo chown root:root /etc/udev/rules.d/49-stlinkv2-1.rules
16+
sudo chmod 644 /etc/udev/rules.d/49-stlinkv2-1.rules
17+
echo "Reloading udev rules"
18+
sudo udevadm control --reload-rules
19+
echo "Adding current user to dialout group"
20+
sudo adduser $USER dialout
21+
else
22+
echo "Couldn't copy to /etc/udev/rules.d/; you probably have to run this script as root? Or your distribution of Linux doesn't include udev; try running the IDE itself as root."
23+
fi
24+

linux/maple_upload

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
#set -e
4+
5+
6+
7+
if [ $# -lt 4 ]; then
8+
echo "Usage: $0 $# <dummy_port> <altID> <usbID> <binfile>" >&2
9+
exit 1
10+
fi
11+
dummy_port="$1"; altID="$2"; usbID="$3"; binfile="$4"; dummy_port_fullpath="/dev/$1"
12+
if [ $# -eq 5 ]; then
13+
dfuse_addr="--dfuse-address $5"
14+
else
15+
dfuse_addr=""
16+
fi
17+
18+
19+
# Get the directory where the script is running.
20+
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
21+
22+
# ----------------- IMPORTANT -----------------
23+
# The 2nd parameter to upload-reset is the delay after resetting before it exits
24+
# This value is in milliseonds
25+
# You may need to tune this to your system
26+
# 750ms to 1500ms seems to work on my Mac
27+
28+
29+
"${DIR}/upload-reset" ${dummy_port_fullpath} 750
30+
31+
32+
#DFU_UTIL=$(dirname $0)/dfu-util/dfu-util
33+
DFU_UTIL=/usr/bin/dfu-util
34+
DFU_UTIL=${DIR}/dfu-util/dfu-util
35+
if [ ! -x "${DFU_UTIL}" ]; then
36+
echo "$0: error: cannot find ${DFU_UTIL}" >&2
37+
exit 2
38+
fi
39+
40+
"${DFU_UTIL}" -d ${usbID} -a ${altID} -D ${binfile} ${dfuse_addr} -R

0 commit comments

Comments
 (0)