Add .hex rule
This commit is contained in:
+6
-2
@@ -43,6 +43,11 @@ led1.out: led1.o pio.o system.o timer.o led.o pacer.o
|
||||
$(SIZE) $@
|
||||
|
||||
|
||||
# Create hex file for programming from executable file.
|
||||
led1.hex: led1.out
|
||||
$(OBJCOPY) -O ihex led1.out led1.hex
|
||||
|
||||
|
||||
# Target: clean project.
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@@ -51,8 +56,7 @@ clean:
|
||||
|
||||
# Target: program project.
|
||||
.PHONY: program
|
||||
program: led1.out
|
||||
$(OBJCOPY) -O ihex led1.out led1.hex
|
||||
program: led1.hex
|
||||
dfu-programmer atmega32u2 erase; dfu-programmer atmega32u2 flash led1.hex; dfu-programmer atmega32u2 start
|
||||
|
||||
|
||||
|
||||
+5
-1
@@ -1,6 +1,7 @@
|
||||
/** @file led1.c
|
||||
@author M.P. Hayes
|
||||
@date 5 Oct 2010
|
||||
@descr This flashes the LED twice per second.
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
@@ -8,11 +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
|
||||
|
||||
/* LED flash rate (Hz). */
|
||||
#define LED_RATE 2
|
||||
|
||||
|
||||
int main (void)
|
||||
{
|
||||
unsigned int count = 0;
|
||||
|
||||
Reference in New Issue
Block a user