aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0a5c710..b5cb2e8 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,7 @@ AVRDUDE ?= avrdude
QEMU ?= qemu-system-avr
REAL_ELF = build/altimeter.elf
+SIM_ELF = build/altimeter_sim.elf
# options for native (i.e. unit test)
UNITY_SRC ?= unity/src
@@ -35,12 +36,12 @@ all: build/altimeter_sim.elf build/altimeter.hex test size
# Run the sim build software in qemu, halted ready for `make gdb` to attach and
# continue. Note that sim build mocks out some hardware components
-emu: build/altimeter_sim.elf
+emu: $(SIM_ELF)
$(QEMU) -s -S -nographic -machine mega2560 -bios $<
# Attach GDB session to qemu instance started with `make emu`
gdb:
- $(GDB) -ex "target remote :1234" $(REAL_ELF)
+ $(GDB) -ex "target remote :1234" $(SIM_ELF)
# Flash AVR software to microcontroller with AVRdude
flash: build/altimeter.hex
$(AVRDUDE) -F -V -c avr109 -p $(MCU) -P $(PORT) -b 115200 -U flash:w:$<