aboutsummaryrefslogtreecommitdiff
path: root/tools/avr_codegen
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2016-12-07 01:15:31 -0500
committercnlohr <lohr85@gmail.com>2016-12-07 01:15:31 -0500
commitc059eb3c7d5a2e42cc7bcc93b0b1549e36e042d6 (patch)
treeb58d236d22741671541ddd489bdce4d2586067dc /tools/avr_codegen
parente6c6675fd9da8b4ced425ec82e67140eedcd40e8 (diff)
downloadlibsurvive-c059eb3c7d5a2e42cc7bcc93b0b1549e36e042d6.tar.gz
libsurvive-c059eb3c7d5a2e42cc7bcc93b0b1549e36e042d6.tar.bz2
Update! Getting very close.
Diffstat (limited to 'tools/avr_codegen')
-rw-r--r--tools/avr_codegen/Makefile8
-rw-r--r--tools/avr_codegen/test.c15
-rwxr-xr-xtools/avr_codegen/test.elfbin9820 -> 6996 bytes
-rw-r--r--tools/avr_codegen/test.hex37
4 files changed, 31 insertions, 29 deletions
diff --git a/tools/avr_codegen/Makefile b/tools/avr_codegen/Makefile
index 2d3a17e..e7b8673 100644
--- a/tools/avr_codegen/Makefile
+++ b/tools/avr_codegen/Makefile
@@ -12,11 +12,11 @@ test.hex : test.elf
avr-objcopy -j .text -j .data -O ihex test.elf test.hex
avrdude -c usbtiny -p $(PROGPART) -V -U flash:w:test.hex
-test.elf : test.c avr_print.c
- avr-gcc -I -g $(CFLAGS) -mmcu=$(PART) -Wl,-Map,test.map -o $@ test.c avr_print.c -L/usr/lib/binutils/avr/2.18
+test.elf : test.c
+ avr-gcc -I -g $(CFLAGS) -mmcu=$(PART) -Wl,-Map,test.map -o $@ test.c -L/usr/lib/binutils/avr/2.18
-test.lst : test.c avr_print.c
- avr-gcc -c -g -Wa,-a,-ad $(CFLAGS) test.c avr_print.c > $@
+test.lst : test.c
+ avr-gcc -c -g -Wa,-a,-ad $(CFLAGS) test.c > $@
burn : test.hex
avrdude -c usbtiny -p $(PROGPART) -V -U flash:w:test.hex
diff --git a/tools/avr_codegen/test.c b/tools/avr_codegen/test.c
index 0215e09..87f0fc9 100644
--- a/tools/avr_codegen/test.c
+++ b/tools/avr_codegen/test.c
@@ -71,11 +71,18 @@ int main( )
#define DO_MARKER( time, LEDS ) \
marker = time; do { PORTB = LEDS; marker--; PORTB = 0; } while( marker );
+ DO_MARKER(20, LED50);
+ DO_MARKER(20, LED50|LED48);
+ DO_MARKER(20, LED48);
+ DO_MARKER(20, LED40|LED48);
DO_MARKER(20, LED40);
- DO_MARKER(35, LED50|LED40);
- DO_MARKER(25, LED50);
- DO_MARKER(45, LED50|LED48);
- DO_MARKER(60, LED50);
+ DO_MARKER(20, LED40|LED48);
+ DO_MARKER(20, LED40);
+ DO_MARKER(20, LED40|LED48);
+ DO_MARKER(20, LED40);
+ DO_MARKER(20, LED40|LED48);
+ DO_MARKER(20, LED48);
+ //DO_MARKER(60, LED50);
// sendhex2( 5 );
// sendchr('\n');
diff --git a/tools/avr_codegen/test.elf b/tools/avr_codegen/test.elf
index f9fd72e..248d6c2 100755
--- a/tools/avr_codegen/test.elf
+++ b/tools/avr_codegen/test.elf
Binary files differ
diff --git a/tools/avr_codegen/test.hex b/tools/avr_codegen/test.hex
index 1d0610e..e8e3c64 100644
--- a/tools/avr_codegen/test.hex
+++ b/tools/avr_codegen/test.hex
@@ -1,22 +1,17 @@
-:100000000EC028C027C026C025C024C023C022C0DF
-:1000100021C020C01FC01EC01DC01CC01BC0112499
-:100020001FBECFE5D2E0DEBFCDBF10E0A0E6B0E05E
-:10003000ECE3F1E002C005900D92AE36B107D9F7BE
-:1000400020E0AEE6B0E001C01D92A437B207E1F7B0
-:1000500047D072C0D5CF0F931F9300E010E09801F6
-:10006000061717072807390759F0EFECF7E0319723
-:10007000F1F700C000000F5F1F4F2F4F3F4FF0CF31
-:100080001F910F910895769BFECF8FB980E48EB9B2
-:100090000895F9DF80E090E008958A3010F4805DE3
-:1000A00001C0895CF0CFCF93C82F82958F70F5DFA8
-:1000B0008C2F8F70CF91F1CFCF93C82F892FF3DF83
-:1000C0008C2FCF91F0CF87B38A7F87BBB99A88E115
-:1000D0008DB980E690E09093710080937000089550
-:1000E000F89480E886BD16BC82E481BF8AE187BBB4
-:1000F00020E132E192E04AE084E128BB18BA815065
-:10010000E1F783E238BB18BA8150E1F789E198BB87
-:1001100018BA8150E1F78DE248BB18BA8150E1F777
-:100120008CE398BB18BA8150E1F7EFEFF9EF319704
-:0C013000F1F700C00000E0CFF894FFCF12
-:0E013C0000000002000000004900000000006A
+:100000000EC015C014C013C012C011C010C00FC064
+:100010000EC00DC00CC00BC00AC009C008C011241E
+:100020001FBECFE5D2E0DEBFCDBF1AD064C0E8CF9F
+:100030000F931F9300E010E0980106171707280799
+:10004000390759F0EFECF7E03197F1F700C0000005
+:100050000F5F1F4F2F4F3F4FF0CF1F910F9108950C
+:10006000F89480E886BD16BC82E481BF8AE187BB34
+:1000700042E05AE038E088E190E124E148BB18BA58
+:100080002150E1F724E158BB18BA2150E1F724E1EF
+:1000900038BB18BA2150E1F724E188BB18BA2150C7
+:1000A000E1F724E198BB18BA2150E1F724E188BBBD
+:1000B00018BA2150E1F724E198BB18BA2150E1F7B2
+:1000C00024E188BB18BA2150E1F724E198BB18BAA3
+:1000D0002150E1F724E188BB18BA2150E1F724E16F
+:1000E00038BB18BA2150E1F7EFEFF9EF3197F1F78C
+:0A00F00000C00000C2CFF894FFCF5B
:00000001FF