Skip to content

Commit

Permalink
remove explicit expander support from bash tools
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Feb 18, 2022
1 parent df36b31 commit 6764594
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 58 deletions.
9 changes: 0 additions & 9 deletions docs/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,6 @@ To upload the compiled firmware you can use one of the following scripts.

This script is useful on [Robot Brains](https://www.zauberzeug.com/product-robot-brain.html) where the microcontroller is connected to the pin header of an NVIDIA Jetson computer.

#### Upload to an expander

```bash
./upload_expander.sh
```

This script is still work in progress.
It is useful on [Robot Brains](https://www.zauberzeug.com/product-robot-brain.html) that come with a second microcontroller as port expander.

### Backtrace

In case Lizard terminates with a backtrace printed to the serial terminal, you can use the following script to print corresponding source code lines.
Expand Down
12 changes: 2 additions & 10 deletions monitor_ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@
if [ $# -lt 1 ]
then
echo "Usage:"
echo "`basename $0` [-e/--expander] <user@host>"
echo "`basename $0` <user@host>"
exit
fi

if [[ "$1" == "-e" || "$1" == "--expander" ]]
then
shift
dev="/dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_f276e472a1e3ea118d06177c994a5d01-if00-port0"
else
dev="/dev/ttyTHS1"
fi

host=$1

ssh -t $host "bash --login -c 'cd ~/lizard && ./monitor.py $dev'"
ssh -t $host "bash --login -c 'cd ~/lizard && ./monitor.py /dev/ttyTHS1'"
29 changes: 0 additions & 29 deletions upload_expander.sh

This file was deleted.

12 changes: 2 additions & 10 deletions upload_ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,14 @@
if [ $# -lt 1 ]
then
echo "Usage:"
echo "`basename $0` [-e/--expander] <user@host>"
echo "`basename $0` <user@host>"
exit
fi

if [[ "$1" == "-e" || "$1" == "--expander" ]]
then
shift
remote_command="./upload_expander.sh"
else
remote_command="./upload_ths1.sh"
fi

host=$1

echo "Copying binary files to $host..."
rsync -zarv --prune-empty-dirs --include="*/" --include="*.bin" --exclude="*" build $host:~/lizard/ || exit 1 # https://stackoverflow.com/a/32527277/3419103

echo "Flashing microcontroller..."
ssh -t $host "bash --login -c 'cd ~/lizard && $remote_command'"
ssh -t $host "bash --login -c 'cd ~/lizard && ./upload_ths1.sh'"

0 comments on commit 6764594

Please sign in to comment.