diff options
-rw-r--r-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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:$< |