From be7aca3ff039576681596af096a5245060807bc2 Mon Sep 17 00:00:00 2001 From: Dylan Donahue Date: Sun, 24 Nov 2024 18:01:22 -0500 Subject: [PATCH 1/4] added safe dir --- dev/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dev/Dockerfile b/dev/Dockerfile index 70ba5f2..c8b48f6 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -56,3 +56,7 @@ RUN wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021 ENV PATH $PATH:/home/dev/gcc-arm-none-eabi-10.3-2021.10/bin WORKDIR /home/app + +# Set up safe directory +RUN git config --global --add safe.directory /home/app + From 839273017d0ed185fcd1079c815dd3804cd7116c Mon Sep 17 00:00:00 2001 From: Dylan Donahue Date: Tue, 26 Nov 2024 12:48:07 -0500 Subject: [PATCH 2/4] removed tmux and libncurses --- dev/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/dev/Dockerfile b/dev/Dockerfile index c8b48f6..eedfdde 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -16,8 +16,6 @@ RUN apt-get update && apt-get install -y \ minicom \ vim \ clang-format \ - tmux \ - libncurses5 \ linux-tools-generic \ gcc-arm-linux-gnueabihf \ g++-arm-linux-gnueabihf \ From f737daacee1c8b95aa1967d2b9caa0b90c57d645 Mon Sep 17 00:00:00 2001 From: Dylan Donahue Date: Tue, 26 Nov 2024 14:01:31 -0500 Subject: [PATCH 3/4] removed more packages --- dev/Dockerfile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/dev/Dockerfile b/dev/Dockerfile index eedfdde..d273ca1 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -25,13 +25,6 @@ RUN apt-get update && apt-get install -y \ python3 \ python3-pip -# Install and setup rust -RUN curl https://sh.rustup.rs -sSf | bash -s -- -y -ENV PATH="/root/.cargo/bin:${PATH}" -RUN rustup target add armv7-unknown-linux-gnueabihf - -# Install Python YAML Parser -RUN pip install "ruamel.yaml<0.18.0" RUN wget https://builds.renode.io/renode-1.14.0+20231003gitf86ac3cf.linux-portable.tar.gz RUN mkdir renode_portable && tar -xvf renode-*.linux-portable.tar.gz -C renode_portable --strip-components=1 From 31e681e18fe11d7a316eb8aff574c18d244b5618 Mon Sep 17 00:00:00 2001 From: Dylan Donahue Date: Sun, 8 Dec 2024 16:40:06 -0500 Subject: [PATCH 4/4] poop fart --- dev/scripts/gdb.sh | 2 +- ner_environment/build_system/build_system.py | 7 ++++--- ner_environment/build_system/miniterm.py | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dev/scripts/gdb.sh b/dev/scripts/gdb.sh index 91153f5..3b36e1f 100755 --- a/dev/scripts/gdb.sh +++ b/dev/scripts/gdb.sh @@ -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) diff --git a/ner_environment/build_system/build_system.py b/ner_environment/build_system/build_system.py index 0d13062..4a92a0a 100644 --- a/ner_environment/build_system/build_system.py +++ b/ner_environment/build_system/build_system.py @@ -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: @@ -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) @@ -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: diff --git a/ner_environment/build_system/miniterm.py b/ner_environment/build_system/miniterm.py index b34d4a7..04413c7 100644 --- a/ner_environment/build_system/miniterm.py +++ b/ner_environment/build_system/miniterm.py @@ -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)