Added Scripts to remotly debug pico

This commit is contained in:
AlexanderHD27
2024-09-27 23:19:39 +02:00
parent b2ffcb5d72
commit 6be2dd0b7d
4 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#!/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 "> "
send "exit\n"
exit

View 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"

View 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

View File

@@ -0,0 +1,3 @@
#!/usr/bin/bash
sudo src/openocd -f interface/cmsis-dap.cfg -c "bindto 0.0.0.0" -c "adapter speed 5000" -f target/rp2040.cfg -s tcl