Skip to content

Commit

Permalink
poop fart
Browse files Browse the repository at this point in the history
  • Loading branch information
dyldonahue committed Dec 8, 2024
1 parent f737daa commit 31e681e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dev/scripts/gdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ elf_file=$(ls /home/app/build/*.elf)

printf "$elf_file"

openocd -f interface/cmsis-dap.cfg -f target/"$STM_TARGET_NAME"x.cfg -c "adapter speed 5000" -c "init" -c "reset halt" & sleep 1 && arm-none-eabi-gdb $elf_file -ex "target remote localhost:3333"
openocd -f interface/cmsis-dap.cfg -f target/"$STM_TARGET_NAME"x.cfg -c "adapter speed 5000" -c "init" -c "reset halt" & sleep 1 && gdb $elf_file -ex "target remote localhost:3333"

kill $(pidof openocd)
7 changes: 4 additions & 3 deletions ner_environment/build_system/build_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def build(profile: str = typer.Option(None, "--profile", "-p", callback=unsuppor

@app.command(help="Configure autoformatter settings")
def clang(disable: bool = typer.Option(False, "--disable","-d", help="Disable clang-format"),
enable: bool = typer.Option(False, "--enable", "-e", help="Enable clang-format"),
enablrune: bool = typer.Option(False, "--enable", "-e", help="Enable clang-format"),
run: bool = typer.Option(False, "--run", "-r", help="Run clang-format")):

if disable:
Expand Down Expand Up @@ -113,7 +113,7 @@ def debug(ftdi: bool = typer.Option(False, "--ftdi", help="Set this flag if the
if platform.system() == "Linux" and is_wsl() == 0:
gdb_uri = "localhost"

send_command = ["docker", "compose", "run", "--rm", "ner-gcc-arm", "arm-none-eabi-gdb", f"/home/app/build/{elf_file}", "-ex", f"target extended-remote {gdb_uri}:3333"]
send_command = ["docker", "compose", "run", "--rm", "ner-gcc-arm", "gdb", f"/home/app/build/{elf_file}", "-ex", f"target extended-remote {gdb_uri}:3333"]

subprocess.run(send_command)

Expand Down Expand Up @@ -168,7 +168,8 @@ def flash(ftdi: bool = typer.Option(False, "--ftdi", help="Set this flag if the
# ==============================================================================

@app.command(help="Open UART terminal of conneced device")
def serial(ls: bool = typer.Option(False, "--list", help="Specify the device to connect or disconnect (e.g., /dev/ttyACM0,/dev/ttyUSB0,/dev/ttyUSB1,COM1)"),
def serial(ls: bool = typer.Option(False, "--list", help='''Specify the device to connect or disconnect (e.g., /dev/ttyACM0,/dev/ttyUSB0,/dev/ttyUSB1,COM1)
Mandatory on MacOS, may be optional on otherwise. On Mac, find this by running `ls /dev/tty.usb*' '''),
device: str = typer.Option("", "--device", "-d", help="Specify the board to connect to")):

if ls:
Expand Down
3 changes: 1 addition & 2 deletions ner_environment/build_system/miniterm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ def list_usb_devices():
print(f"Failed to list USB devices on Windows: {e}", file=sys.stderr)
sys.exit(1)

elif os_name == 'Linux' or os_name == 'Darwin': # Darwin is macOS
# List USB devices on Unix-like systems
elif os_name == 'Linux':
try:
result = subprocess.run(['ls /dev/tty*'], shell=True, capture_output=True, text=True)

Expand Down

0 comments on commit 31e681e

Please sign in to comment.