Add ability to debug the microcontroller

This commit is contained in:
Alexander Heldt
2024-07-28 12:07:28 +02:00
parent 278d3cfb9d
commit 271f3a3a64
4 changed files with 176 additions and 0 deletions

View File

@@ -65,6 +65,14 @@ assemble: compile $(OBJ_FILES)
flash: $(BUILD_DIR)/$(TARGET).bin
st-flash --reset write $< 0x8000000
.PHONY: gdb-server
gdb-server:
sudo openocd -f stlink.cfg -f stm32f4x.cfg
.PHONY: gdb-client
gdb-client:
gdb --symbols $(BUILD_DIR)/$(TARGET).elf --init-eval-command="target extended-remote localhost:3333"
.PHONY: clean
clean:
rm -rf $(BUILD_DIR)