diff --git a/Makefile.toml b/Makefile.toml index 092f29a..c365f4d 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -24,7 +24,7 @@ TARGET_BOARD = { value = "rpi4", condition = { env_not_set = ["TARGET_BOARD"] } QEMU = { value = "qemu-system-aarch64", condition = { env_not_set = ["QEMU"] } } # An aarch64-enabled GDB -GDB = { value = "/usr/local/opt/gdb-8.2.1-aarhc64/bin/aarch64-linux-elf-gdb", condition = { env_not_set = ["GDB"] } } +GDB = { value = "/usr/local/opt/gdb/HEAD-a2c58332-aarch64/bin/aarch64-unknown-elf-gdb", condition = { env_not_set = ["GDB"] } } # OpenOCD with JLink support # (RTT patch from http://openocd.zylin.com/#/c/4055/11 has already been merged into main line) @@ -137,6 +137,15 @@ script = [ ''' ] +[tasks.gdb-config] +script_runner = "@duckscript" +script = [ +''' + writefile ${GDB_CONNECT_FILE} "target extended-remote :5555\n" + appendfile ${GDB_CONNECT_FILE} "break 0x80000\n" +''' +] + [tasks.zellij-config] dependencies = ["build-qemu", "kernel-binary"] script_runner = "@duckscript" diff --git a/nucleus/Makefile.toml b/nucleus/Makefile.toml index 3d6249d..bb1175a 100644 --- a/nucleus/Makefile.toml +++ b/nucleus/Makefile.toml @@ -31,9 +31,12 @@ script_runner = "@duckscript" script = [ ''' writefile ${GDB_CONNECT_FILE} "target extended-remote :5555\n" + appendfile ${GDB_CONNECT_FILE} "break 0x80000\n" + appendfile ${GDB_CONNECT_FILE} "continue\n" ''' ] +# Problem: this eats STDIN! need to run in subshell or sth [tasks.gdb] dependencies = ["build", "kernel-binary", "gdb-config"] env = { "RUST_GDB" = "${GDB}" }