Merged i2c-helper in Main
This commit is contained in:
2
motor-control/firmware/scripts/build.sh
Executable file
2
motor-control/firmware/scripts/build.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
cd build
|
||||
make -j10
|
||||
8
motor-control/firmware/scripts/build_and_flash.sh
Executable file
8
motor-control/firmware/scripts/build_and_flash.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
if ! scripts/build.sh; then
|
||||
exit
|
||||
else
|
||||
scripts/flash.exp main.elf
|
||||
fi
|
||||
|
||||
21
motor-control/firmware/scripts/flash.exp
Executable file
21
motor-control/firmware/scripts/flash.exp
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set timeout 30
|
||||
|
||||
set input_file [lindex $argv 0]
|
||||
|
||||
spawn telnet localhost 4444
|
||||
expect "> "
|
||||
send "program $input_file verify\n"
|
||||
expect "** Programming Finished **"
|
||||
|
||||
send "reset halt\n"
|
||||
expect "> "
|
||||
|
||||
send "rp2040.core1 arp_reset assert 0\n"
|
||||
expect "> "
|
||||
send "rp2040.core0 arp_reset assert 0\n"
|
||||
expect "> "
|
||||
|
||||
send "exit\n"
|
||||
exit
|
||||
3
motor-control/firmware/scripts/flash_direct.sh
Executable file
3
motor-control/firmware/scripts/flash_direct.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter speed 5000" -f target/rp2040.cfg -c "program $1 verify reset exit"
|
||||
4
motor-control/firmware/scripts/launch_openocd.sh
Executable file
4
motor-control/firmware/scripts/launch_openocd.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
sudo openocd -f interface/cmsis-dap.cfg -c "adapter speed 5000" -f target/rp2040.cfg
|
||||
|
||||
2
motor-control/firmware/scripts/launch_serial_monitor.sh
Executable file
2
motor-control/firmware/scripts/launch_serial_monitor.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/bash
|
||||
minicom -D $1
|
||||
20
motor-control/firmware/scripts/remote/flash.exp
Executable file
20
motor-control/firmware/scripts/remote/flash.exp
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set timeout 30
|
||||
|
||||
set input_file [lindex $argv 0]
|
||||
set host [lindex $argv 1]
|
||||
|
||||
spawn telnet $host 4444
|
||||
expect "> "
|
||||
send "program $input_file verify\n"
|
||||
expect "** Programming Finished **"
|
||||
|
||||
send "reset halt\n"
|
||||
expect "> "
|
||||
|
||||
send "rp2040.core1 arp_reset assert 0\n"
|
||||
expect "> "
|
||||
send "rp2040.core0 arp_reset assert 0\n"
|
||||
expect "> "
|
||||
exit
|
||||
12
motor-control/firmware/scripts/remote/flash.sh
Executable file
12
motor-control/firmware/scripts/remote/flash.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
|
||||
in_file=$(basename "$1")
|
||||
|
||||
echo "Input file: $1"
|
||||
echo "Input file (base): $in_file"
|
||||
echo "Host: $2"
|
||||
|
||||
scp $1 $2:/tmp
|
||||
|
||||
./scripts/remote/flash.exp "/tmp/$in_file" "$2"
|
||||
13
motor-control/firmware/scripts/remote/reset.exp
Executable file
13
motor-control/firmware/scripts/remote/reset.exp
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set timeout 30
|
||||
|
||||
set host [lindex $argv 0]
|
||||
|
||||
spawn telnet $host 4444
|
||||
|
||||
expect "> "
|
||||
send "reset\n"
|
||||
expect "> "
|
||||
send "exit\n"
|
||||
exit
|
||||
21
motor-control/firmware/scripts/remote/run_openocd.exp
Executable file
21
motor-control/firmware/scripts/remote/run_openocd.exp
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set timeout 30
|
||||
|
||||
spawn ssh [lindex $argv 0]
|
||||
|
||||
expect "$ "
|
||||
send "cd ~/gobot/\n"
|
||||
expect "$ "
|
||||
|
||||
send "git fetch\n"
|
||||
expect "$ "
|
||||
|
||||
send "git checkout motor-ctrl-firmware\n"
|
||||
expect "$ "
|
||||
|
||||
send "cd motor-control/firmware/scripts/remote\n"
|
||||
expect "$ "
|
||||
|
||||
send "./run_openocd.sh\n"
|
||||
expect "Kill Me Please, this is should not be triggered!"
|
||||
3
motor-control/firmware/scripts/remote/run_openocd.sh
Executable file
3
motor-control/firmware/scripts/remote/run_openocd.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
openocd -f interface/cmsis-dap.cfg -c "bindto 0.0.0.0" -c "adapter speed 100" -f target/rp2040.cfg -s tclErt645$
|
||||
13
motor-control/firmware/scripts/reset.exp
Executable file
13
motor-control/firmware/scripts/reset.exp
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set timeout 30
|
||||
|
||||
set input_file [lindex $argv 0]
|
||||
|
||||
spawn telnet localhost 4444
|
||||
|
||||
expect "> "
|
||||
send "reset\n"
|
||||
expect "> "
|
||||
send "exit\n"
|
||||
exit
|
||||
Reference in New Issue
Block a user