Add .hex rule

This commit is contained in:
Michael Hayes
2013-09-02 19:08:51 +12:00
parent 3e4ff749d7
commit 87333ae5f0
57 changed files with 331 additions and 113 deletions
+6 -2
View File
@@ -46,6 +46,11 @@ led2.out: led2.o pio.o system.o timer.o led.o navswitch.o pacer.o
$(SIZE) $@
# Create hex file for programming from executable file.
led2.hex: led2.out
$(OBJCOPY) -O ihex led2.out led2.hex
# Target: clean project.
.PHONY: clean
clean:
@@ -54,8 +59,7 @@ clean:
# Target: program project.
.PHONY: program
program: led2.out
$(OBJCOPY) -O ihex led2.out led2.hex
program: led2.hex
dfu-programmer atmega32u2 erase; dfu-programmer atmega32u2 flash led2.hex; dfu-programmer atmega32u2 start
+2 -2
View File
@@ -9,14 +9,14 @@
#include "pacer.h"
/* Define polling rate in Hz. */
/* Define polling rate in Hz. (Note, this is much faster than
needed for this application.) */
#define LOOP_RATE 1000
#define LED_RATE_INC 2
#define LED_RATE_MIN 0
#define LED_RATE_MAX 100
typedef struct pen pen_t;
int main (void)