Opdracht 3

This commit is contained in:
Guilliam Lutz
2021-03-10 09:59:28 +01:00
parent 0a1a3fd47f
commit f3fa8afa60
20 changed files with 1175 additions and 121 deletions

View File

@@ -25,6 +25,8 @@ Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "testlcd", "testlcd\testlcd.
EndProject
Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "opdracht 3.2", "opdracht 3.2\opdracht 3.2.cproj", "{EB7415C6-2130-46AD-9842-612C67ADE6D4}"
EndProject
Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "opdracht C", "opdracht C\opdracht C.cproj", "{2DF6F5F3-181F-430E-B49A-3D9794F91482}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|AVR = Debug|AVR
@@ -75,6 +77,10 @@ Global
{EB7415C6-2130-46AD-9842-612C67ADE6D4}.Debug|AVR.Build.0 = Debug|AVR
{EB7415C6-2130-46AD-9842-612C67ADE6D4}.Release|AVR.ActiveCfg = Release|AVR
{EB7415C6-2130-46AD-9842-612C67ADE6D4}.Release|AVR.Build.0 = Release|AVR
{2DF6F5F3-181F-430E-B49A-3D9794F91482}.Debug|AVR.ActiveCfg = Debug|AVR
{2DF6F5F3-181F-430E-B49A-3D9794F91482}.Debug|AVR.Build.0 = Debug|AVR
{2DF6F5F3-181F-430E-B49A-3D9794F91482}.Release|AVR.ActiveCfg = Release|AVR
{2DF6F5F3-181F-430E-B49A-3D9794F91482}.Release|AVR.Build.0 = Release|AVR
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -0,0 +1 @@
:00000001FF

View File

@@ -0,0 +1,207 @@
Opdracht 2.2.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 00000000 00800100 00800100 0000016c 2**0
ALLOC, LOAD, DATA
1 .text 000000a4 00000000 00000000 00000054 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .comment 0000002f 00000000 00000000 0000016c 2**0
CONTENTS, READONLY
3 .debug_aranges 00000038 00000000 00000000 0000019b 2**0
CONTENTS, READONLY, DEBUGGING
4 .debug_info 00000b3a 00000000 00000000 000001d3 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_abbrev 00000819 00000000 00000000 00000d0d 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_line 000002da 00000000 00000000 00001526 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_frame 00000074 00000000 00000000 00001800 2**2
CONTENTS, READONLY, DEBUGGING
8 .debug_str 0000027d 00000000 00000000 00001874 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_loc 000000e2 00000000 00000000 00001af1 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_ranges 00000028 00000000 00000000 00001bd3 2**0
CONTENTS, READONLY, DEBUGGING
11 .text 00000004 00000114 00000114 00000168 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00001bfc 2**2
CONTENTS, READONLY, DEBUGGING
13 .text.__vector_2 00000028 000000a4 000000a4 000000f8 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .text.__vector_3 00000028 000000cc 000000cc 00000120 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
15 .text.main 00000020 000000f4 000000f4 00000148 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
Disassembly of section .text:
00000000 <__vectors>:
0: 0c 94 46 00 jmp 0x8c ; 0x8c <__ctors_end>
4: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
8: 0c 94 52 00 jmp 0xa4 ; 0xa4 <_etext>
c: 0c 94 66 00 jmp 0xcc ; 0xcc <__vector_3>
10: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
14: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
18: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
1c: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
20: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
24: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
28: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
2c: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
30: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
34: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
38: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
3c: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
40: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
44: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
48: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
4c: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
50: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
54: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
58: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
5c: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
60: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
64: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
68: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
6c: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
70: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
74: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
78: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
7c: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
80: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
84: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
88: 0c 94 8a 00 jmp 0x114 ; 0x114 <__bad_interrupt>
0000008c <__ctors_end>:
8c: 11 24 eor r1, r1
8e: 1f be out 0x3f, r1 ; 63
90: cf ef ldi r28, 0xFF ; 255
92: d0 e1 ldi r29, 0x10 ; 16
94: de bf out 0x3e, r29 ; 62
96: cd bf out 0x3d, r28 ; 61
98: 0e 94 7a 00 call 0xf4 ; 0xf4 <main>
9c: 0c 94 50 00 jmp 0xa0 ; 0xa0 <_exit>
000000a0 <_exit>:
a0: f8 94 cli
000000a2 <__stop_program>:
a2: ff cf rjmp .-2 ; 0xa2 <__stop_program>
Disassembly of section .text:
00000114 <__bad_interrupt>:
114: 0c 94 00 00 jmp 0 ; 0x0 <__TEXT_REGION_ORIGIN__>
Disassembly of section .text.__vector_2:
000000a4 <__vector_2>:
}
/************************************************************************/
/* interrupt 1
walk the light 1 down */
/************************************************************************/
ISR( INT1_vect ) {
a4: 1f 92 push r1
a6: 0f 92 push r0
a8: 0f b6 in r0, 0x3f ; 63
aa: 0f 92 push r0
ac: 11 24 eor r1, r1
ae: 8f 93 push r24
if (PORTC == 0b10000000)
b0: 85 b3 in r24, 0x15 ; 21
b2: 80 38 cpi r24, 0x80 ; 128
b4: 11 f4 brne .+4 ; 0xba <__vector_2+0x16>
{
PORTC == 0b00000001;
b6: 85 b3 in r24, 0x15 ; 21
b8: 03 c0 rjmp .+6 ; 0xc0 <__vector_2+0x1c>
} else {
PORTC = PORTC << 1;
ba: 85 b3 in r24, 0x15 ; 21
bc: 88 0f add r24, r24
be: 85 bb out 0x15, r24 ; 21
}
}
c0: 8f 91 pop r24
c2: 0f 90 pop r0
c4: 0f be out 0x3f, r0 ; 63
c6: 0f 90 pop r0
c8: 1f 90 pop r1
ca: 18 95 reti
Disassembly of section .text.__vector_3:
000000cc <__vector_3>:
/************************************************************************/
/* interrupt 2
walk the light 1 up */
/************************************************************************/
ISR( INT2_vect ) {
cc: 1f 92 push r1
ce: 0f 92 push r0
d0: 0f b6 in r0, 0x3f ; 63
d2: 0f 92 push r0
d4: 11 24 eor r1, r1
d6: 8f 93 push r24
if (PORTC == 0b00000001)
d8: 85 b3 in r24, 0x15 ; 21
da: 81 30 cpi r24, 0x01 ; 1
dc: 11 f4 brne .+4 ; 0xe2 <__vector_3+0x16>
{
PORTC = 0b10000000;
de: 80 e8 ldi r24, 0x80 ; 128
e0: 85 bb out 0x15, r24 ; 21
}
PORTC = PORTC >> 1;
e2: 85 b3 in r24, 0x15 ; 21
e4: 86 95 lsr r24
e6: 85 bb out 0x15, r24 ; 21
}
e8: 8f 91 pop r24
ea: 0f 90 pop r0
ec: 0f be out 0x3f, r0 ; 63
ee: 0f 90 pop r0
f0: 1f 90 pop r1
f2: 18 95 reti
Disassembly of section .text.main:
000000f4 <main>:
int main(void)
{
/* Replace with your application code */
// Init I/O
DDRD = 0xF0; // PORTD (7:4) is output, (3:0) is input
f4: 80 ef ldi r24, 0xF0 ; 240
f6: 81 bb out 0x11, r24 ; 17
DDRC = 0xFF;
f8: 8f ef ldi r24, 0xFF ; 255
fa: 84 bb out 0x14, r24 ; 20
// Init Interrupt hardware
EICRA |= 0x2C; // INT2 falling edge, INT1 rising edge
fc: ea e6 ldi r30, 0x6A ; 106
fe: f0 e0 ldi r31, 0x00 ; 0
100: 80 81 ld r24, Z
102: 8c 62 ori r24, 0x2C ; 44
104: 80 83 st Z, r24
EIMSK |= 0x06; // Enable INT2 & INT1
106: 89 b7 in r24, 0x39 ; 57
108: 86 60 ori r24, 0x06 ; 6
10a: 89 bf out 0x39, r24 ; 57
PORTC = 0x01; // init the first bit
10c: 81 e0 ldi r24, 0x01 ; 1
10e: 85 bb out 0x15, r24 ; 21
sei(); // enable input mechanism
110: 78 94 sei
112: ff cf rjmp .-2 ; 0x112 <main+0x1e>

View File

@@ -4,8 +4,8 @@
<memory name="program">
<units>bytes</units>
<length>131072</length>
<used>318</used>
<free>130754</free>
<used>280</used>
<free>130792</free>
</memory>
<memory name="data">
<units>bytes</units>

View File

@@ -137,7 +137,7 @@ Disassembly of section .text:
Disassembly of section .text:
000002fe <__bad_interrupt>:
2fe: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
2fe: 0c 94 00 00 jmp 0 ; 0x0 <__TEXT_REGION_ORIGIN__>
Disassembly of section .text.__vector_1:
@@ -165,13 +165,13 @@ Disassembly of section .text.__vector_1:
126: df 93 push r29
128: cd b7 in r28, 0x3d ; 61
12a: de b7 in r29, 0x3e ; 62
12c: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <_edata>
130: 90 91 01 01 lds r25, 0x0101 ; 0x800101 <_edata+0x1>
12c: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <__DATA_REGION_ORIGIN__>
130: 90 91 01 01 lds r25, 0x0101 ; 0x800101 <__DATA_REGION_ORIGIN__+0x1>
134: 01 96 adiw r24, 0x01 ; 1
136: 90 93 01 01 sts 0x0101, r25 ; 0x800101 <_edata+0x1>
13a: 80 93 00 01 sts 0x0100, r24 ; 0x800100 <_edata>
13e: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <_edata>
142: 90 91 01 01 lds r25, 0x0101 ; 0x800101 <_edata+0x1>
136: 90 93 01 01 sts 0x0101, r25 ; 0x800101 <__DATA_REGION_ORIGIN__+0x1>
13a: 80 93 00 01 sts 0x0100, r24 ; 0x800100 <__DATA_REGION_ORIGIN__>
13e: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <__DATA_REGION_ORIGIN__>
142: 90 91 01 01 lds r25, 0x0101 ; 0x800101 <__DATA_REGION_ORIGIN__+0x1>
146: 0e 94 3a 01 call 0x274 ; 0x274 <setDisplay>
14a: 00 00 nop
14c: df 91 pop r29
@@ -222,13 +222,13 @@ Disassembly of section .text.__vector_2:
1a6: df 93 push r29
1a8: cd b7 in r28, 0x3d ; 61
1aa: de b7 in r29, 0x3e ; 62
1ac: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <_edata>
1b0: 90 91 01 01 lds r25, 0x0101 ; 0x800101 <_edata+0x1>
1ac: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <__DATA_REGION_ORIGIN__>
1b0: 90 91 01 01 lds r25, 0x0101 ; 0x800101 <__DATA_REGION_ORIGIN__+0x1>
1b4: 01 97 sbiw r24, 0x01 ; 1
1b6: 90 93 01 01 sts 0x0101, r25 ; 0x800101 <_edata+0x1>
1ba: 80 93 00 01 sts 0x0100, r24 ; 0x800100 <_edata>
1be: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <_edata>
1c2: 90 91 01 01 lds r25, 0x0101 ; 0x800101 <_edata+0x1>
1b6: 90 93 01 01 sts 0x0101, r25 ; 0x800101 <__DATA_REGION_ORIGIN__+0x1>
1ba: 80 93 00 01 sts 0x0100, r24 ; 0x800100 <__DATA_REGION_ORIGIN__>
1be: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <__DATA_REGION_ORIGIN__>
1c2: 90 91 01 01 lds r25, 0x0101 ; 0x800101 <__DATA_REGION_ORIGIN__+0x1>
1c6: 0e 94 3a 01 call 0x274 ; 0x274 <setDisplay>
1ca: 00 00 nop
1cc: df 91 pop r29
@@ -361,8 +361,8 @@ Disassembly of section .text.main:
240: fc 01 movw r30, r24
242: 20 83 st Z, r18
244: 78 94 sei
246: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <_edata>
24a: 90 91 01 01 lds r25, 0x0101 ; 0x800101 <_edata+0x1>
246: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <__DATA_REGION_ORIGIN__>
24a: 90 91 01 01 lds r25, 0x0101 ; 0x800101 <__DATA_REGION_ORIGIN__+0x1>
24e: 89 2b or r24, r25
250: d1 f3 breq .-12 ; 0x246 <main+0x4c>
252: 80 e3 ldi r24, 0x30 ; 48
@@ -371,10 +371,10 @@ Disassembly of section .text.main:
258: 80 81 ld r24, Z
25a: 83 30 cpi r24, 0x03 ; 3
25c: a1 f7 brne .-24 ; 0x246 <main+0x4c>
25e: 10 92 01 01 sts 0x0101, r1 ; 0x800101 <_edata+0x1>
262: 10 92 00 01 sts 0x0100, r1 ; 0x800100 <_edata>
266: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <_edata>
26a: 90 91 01 01 lds r25, 0x0101 ; 0x800101 <_edata+0x1>
25e: 10 92 01 01 sts 0x0101, r1 ; 0x800101 <__DATA_REGION_ORIGIN__+0x1>
262: 10 92 00 01 sts 0x0100, r1 ; 0x800100 <__DATA_REGION_ORIGIN__>
266: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <__DATA_REGION_ORIGIN__>
26a: 90 91 01 01 lds r25, 0x0101 ; 0x800101 <__DATA_REGION_ORIGIN__+0x1>
26e: 0e 94 3a 01 call 0x274 ; 0x274 <setDisplay>
272: e9 cf rjmp .-46 ; 0x246 <main+0x4c>

View File

@@ -11,23 +11,23 @@ Idx Name Size VMA LMA File off Algn
CONTENTS, READONLY
3 .debug_aranges 00000090 00000000 00000000 000002a3 2**0
CONTENTS, READONLY, DEBUGGING
4 .debug_info 000011bb 00000000 00000000 00000333 2**0
4 .debug_info 00001209 00000000 00000000 00000333 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_abbrev 0000095a 00000000 00000000 000014ee 2**0
5 .debug_abbrev 0000095a 00000000 00000000 0000153c 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_line 00000526 00000000 00000000 00001e48 2**0
6 .debug_line 00000526 00000000 00000000 00001e96 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_frame 00000110 00000000 00000000 00002370 2**2
7 .debug_frame 00000110 00000000 00000000 000023bc 2**2
CONTENTS, READONLY, DEBUGGING
8 .debug_str 000002ae 00000000 00000000 00002480 2**0
8 .debug_str 000002ae 00000000 00000000 000024cc 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_loc 00000242 00000000 00000000 0000272e 2**0
9 .debug_loc 00000242 00000000 00000000 0000277a 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_ranges 00000070 00000000 00000000 00002970 2**0
10 .debug_ranges 00000070 00000000 00000000 000029bc 2**0
CONTENTS, READONLY, DEBUGGING
11 .text 00000004 0000021c 0000021c 00000270 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 000029e0 2**2
12 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00002a2c 2**2
CONTENTS, READONLY, DEBUGGING
13 .text.sbi_porta 00000016 000001f8 000001f8 0000024c 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE

View File

@@ -20,10 +20,10 @@
<OverrideVtor>false</OverrideVtor>
<CacheFlash>true</CacheFlash>
<ProgFlashFromRam>true</ProgFlashFromRam>
<RamSnippetAddress />
<RamSnippetAddress>0x20000000</RamSnippetAddress>
<UncachedRange />
<preserveEEPROM>true</preserveEEPROM>
<OverrideVtorValue />
<OverrideVtorValue>exception_table</OverrideVtorValue>
<BootSegment>2</BootSegment>
<ResetRule>0</ResetRule>
<eraseonlaunchrule>0</eraseonlaunchrule>

View File

@@ -23,11 +23,11 @@ Idx Name Size VMA LMA File off Algn
CONTENTS, READONLY, DEBUGGING
9 .debug_frame 000001b4 00000000 00000000 00002bb8 2**2
CONTENTS, READONLY, DEBUGGING
10 .debug_str 0000051e 00000000 00000000 00002d6c 2**0
10 .debug_str 00000545 00000000 00000000 00002d6c 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_loc 000003e7 00000000 00000000 0000328a 2**0
11 .debug_loc 000003e7 00000000 00000000 000032b1 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_ranges 00000090 00000000 00000000 00003671 2**0
12 .debug_ranges 00000090 00000000 00000000 00003698 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:

View File

@@ -28,85 +28,97 @@
<ResetRule>0</ResetRule>
<eraseonlaunchrule>0</eraseonlaunchrule>
<EraseKey />
<AsfFrameworkConfig>
<framework-data xmlns="">
<options />
<configurations />
<files />
<documentation help="" />
<offline-documentation help="" />
<dependencies>
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.49.1" />
</dependencies>
</framework-data>
</AsfFrameworkConfig>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<ToolchainSettings>
<AvrGcc>
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"</avrgcc.common.Device>
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>NDEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
</AvrGcc>
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"</avrgcc.common.Device>
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>NDEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
</AvrGcc>
</ToolchainSettings>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<ToolchainSettings>
<AvrGcc>
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"</avrgcc.common.Device>
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>DEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize debugging experience (-Og)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
</AvrGcc>
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"</avrgcc.common.Device>
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>DEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize debugging experience (-Og)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
</AvrGcc>
</ToolchainSettings>
</PropertyGroup>
<ItemGroup>

View File

@@ -0,0 +1,127 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
SHELL := cmd.exe
RM := rm -rf
USER_OBJS :=
LIBS :=
PROJ :=
O_SRCS :=
C_SRCS :=
S_SRCS :=
S_UPPER_SRCS :=
OBJ_SRCS :=
ASM_SRCS :=
PREPROCESSING_SRCS :=
OBJS :=
OBJS_AS_ARGS :=
C_DEPS :=
C_DEPS_AS_ARGS :=
EXECUTABLES :=
OUTPUT_FILE_PATH :=
OUTPUT_FILE_PATH_AS_ARGS :=
AVR_APP_PATH :=$$$AVR_APP_PATH$$$
QUOTE := "
ADDITIONAL_DEPENDENCIES:=
OUTPUT_FILE_DEP:=
LIB_DEP:=
LINKER_SCRIPT_DEP:=
# Every subdirectory with source files must be described here
SUBDIRS :=
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../main.c
PREPROCESSING_SRCS +=
ASM_SRCS +=
OBJS += \
main.o
OBJS_AS_ARGS += \
main.o
C_DEPS += \
main.d
C_DEPS_AS_ARGS += \
main.d
OUTPUT_FILE_PATH +=opdracht\ C.elf
OUTPUT_FILE_PATH_AS_ARGS +="opdracht C.elf"
ADDITIONAL_DEPENDENCIES:=
OUTPUT_FILE_DEP:= ./makedep.mk
LIB_DEP+=
LINKER_SCRIPT_DEP+=
# AVR32/GNU C Compiler
./main.o: .././main.c
@echo Building file: $<
@echo Invoking: AVR/GNU C Compiler : 5.4.0
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include" -Og -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
@echo Finished building: $<
# AVR32/GNU Preprocessing Assembler
# AVR32/GNU Assembler
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif
# Add inputs and outputs from these tool invocations to the build variables
# All Target
all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES)
$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) $(LINKER_SCRIPT_DEP)
@echo Building target: $@
@echo Invoking: AVR/GNU Linker : 5.4.0
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="opdracht C.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mrelax -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"
@echo Finished building target: $@
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "opdracht C.elf" "opdracht C.hex"
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "opdracht C.elf" "opdracht C.eep" || exit 0
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "opdracht C.elf" > "opdracht C.lss"
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "opdracht C.elf" "opdracht C.srec"
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-size.exe" "opdracht C.elf"
# Other Targets
clean:
-$(RM) $(OBJS_AS_ARGS) $(EXECUTABLES)
-$(RM) $(C_DEPS_AS_ARGS)
rm -rf "opdracht C.elf" "opdracht C.a" "opdracht C.hex" "opdracht C.lss" "opdracht C.eep" "opdracht C.map" "opdracht C.srec" "opdracht C.usersignatures"

View File

@@ -0,0 +1,6 @@
################################################################################
# Automatically-generated file. Do not edit or delete the file
################################################################################
main.c

View File

@@ -0,0 +1 @@
:00000001FF

View File

@@ -0,0 +1,327 @@
opdracht C.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 00000000 00800100 00800100 00000204 2**0
CONTENTS, ALLOC, LOAD, DATA
1 .text 000001b0 00000000 00000000 00000054 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .comment 00000030 00000000 00000000 00000204 2**0
CONTENTS, READONLY
3 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00000234 2**2
CONTENTS, READONLY
4 .debug_aranges 00000070 00000000 00000000 00000270 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_info 00000cd9 00000000 00000000 000002e0 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_abbrev 000008c5 00000000 00000000 00000fb9 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_line 000004b8 00000000 00000000 0000187e 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_frame 000000d8 00000000 00000000 00001d38 2**2
CONTENTS, READONLY, DEBUGGING
9 .debug_str 000004d9 00000000 00000000 00001e10 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_loc 0000016f 00000000 00000000 000022e9 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_ranges 00000060 00000000 00000000 00002458 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 45 c0 rjmp .+138 ; 0x8c <__ctors_end>
2: 00 00 nop
4: 4b c0 rjmp .+150 ; 0x9c <__bad_interrupt>
6: 00 00 nop
8: 49 c0 rjmp .+146 ; 0x9c <__bad_interrupt>
a: 00 00 nop
c: 47 c0 rjmp .+142 ; 0x9c <__bad_interrupt>
e: 00 00 nop
10: 45 c0 rjmp .+138 ; 0x9c <__bad_interrupt>
12: 00 00 nop
14: 43 c0 rjmp .+134 ; 0x9c <__bad_interrupt>
16: 00 00 nop
18: 41 c0 rjmp .+130 ; 0x9c <__bad_interrupt>
1a: 00 00 nop
1c: 3f c0 rjmp .+126 ; 0x9c <__bad_interrupt>
1e: 00 00 nop
20: 3d c0 rjmp .+122 ; 0x9c <__bad_interrupt>
22: 00 00 nop
24: 3b c0 rjmp .+118 ; 0x9c <__bad_interrupt>
26: 00 00 nop
28: 39 c0 rjmp .+114 ; 0x9c <__bad_interrupt>
2a: 00 00 nop
2c: 37 c0 rjmp .+110 ; 0x9c <__bad_interrupt>
2e: 00 00 nop
30: 35 c0 rjmp .+106 ; 0x9c <__bad_interrupt>
32: 00 00 nop
34: 33 c0 rjmp .+102 ; 0x9c <__bad_interrupt>
36: 00 00 nop
38: 31 c0 rjmp .+98 ; 0x9c <__bad_interrupt>
3a: 00 00 nop
3c: 2f c0 rjmp .+94 ; 0x9c <__bad_interrupt>
3e: 00 00 nop
40: 2d c0 rjmp .+90 ; 0x9c <__bad_interrupt>
42: 00 00 nop
44: 2b c0 rjmp .+86 ; 0x9c <__bad_interrupt>
46: 00 00 nop
48: 29 c0 rjmp .+82 ; 0x9c <__bad_interrupt>
4a: 00 00 nop
4c: 27 c0 rjmp .+78 ; 0x9c <__bad_interrupt>
4e: 00 00 nop
50: 25 c0 rjmp .+74 ; 0x9c <__bad_interrupt>
52: 00 00 nop
54: 23 c0 rjmp .+70 ; 0x9c <__bad_interrupt>
56: 00 00 nop
58: 21 c0 rjmp .+66 ; 0x9c <__bad_interrupt>
5a: 00 00 nop
5c: 1f c0 rjmp .+62 ; 0x9c <__bad_interrupt>
5e: 00 00 nop
60: 1d c0 rjmp .+58 ; 0x9c <__bad_interrupt>
62: 00 00 nop
64: 1b c0 rjmp .+54 ; 0x9c <__bad_interrupt>
66: 00 00 nop
68: 19 c0 rjmp .+50 ; 0x9c <__bad_interrupt>
6a: 00 00 nop
6c: 17 c0 rjmp .+46 ; 0x9c <__bad_interrupt>
6e: 00 00 nop
70: 15 c0 rjmp .+42 ; 0x9c <__bad_interrupt>
72: 00 00 nop
74: 13 c0 rjmp .+38 ; 0x9c <__bad_interrupt>
76: 00 00 nop
78: 11 c0 rjmp .+34 ; 0x9c <__bad_interrupt>
7a: 00 00 nop
7c: 0f c0 rjmp .+30 ; 0x9c <__bad_interrupt>
7e: 00 00 nop
80: 0d c0 rjmp .+26 ; 0x9c <__bad_interrupt>
82: 00 00 nop
84: 0b c0 rjmp .+22 ; 0x9c <__bad_interrupt>
86: 00 00 nop
88: 09 c0 rjmp .+18 ; 0x9c <__bad_interrupt>
...
0000008c <__ctors_end>:
8c: 11 24 eor r1, r1
8e: 1f be out 0x3f, r1 ; 63
90: cf ef ldi r28, 0xFF ; 255
92: d0 e1 ldi r29, 0x10 ; 16
94: de bf out 0x3e, r29 ; 62
96: cd bf out 0x3d, r28 ; 61
98: 67 d0 rcall .+206 ; 0x168 <main>
9a: 88 c0 rjmp .+272 ; 0x1ac <_exit>
0000009c <__bad_interrupt>:
9c: b1 cf rjmp .-158 ; 0x0 <__vectors>
0000009e <wait>:
void displayOff()
{
spi_slaveSelect(0); // Select display chip
spi_write(0x0C); // Register 0B: Shutdown register
spi_write(0x00); // -> 1 = Normal operation
spi_slaveDeSelect(0); // Deselect display chip
9e: 20 e0 ldi r18, 0x00 ; 0
a0: 30 e0 ldi r19, 0x00 ; 0
a2: 08 c0 rjmp .+16 ; 0xb4 <wait+0x16>
a4: e3 ec ldi r30, 0xC3 ; 195
a6: f9 e0 ldi r31, 0x09 ; 9
a8: 31 97 sbiw r30, 0x01 ; 1
aa: f1 f7 brne .-4 ; 0xa8 <wait+0xa>
ac: 00 c0 rjmp .+0 ; 0xae <wait+0x10>
ae: 00 00 nop
b0: 2f 5f subi r18, 0xFF ; 255
b2: 3f 4f sbci r19, 0xFF ; 255
b4: 28 17 cp r18, r24
b6: 39 07 cpc r19, r25
b8: ac f3 brlt .-22 ; 0xa4 <wait+0x6>
ba: 08 95 ret
000000bc <spi_masterInit>:
bc: 8f ef ldi r24, 0xFF ; 255
be: 87 bb out 0x17, r24 ; 23
c0: 87 b3 in r24, 0x17 ; 23
c2: 87 7f andi r24, 0xF7 ; 247
c4: 87 bb out 0x17, r24 ; 23
c6: 88 b3 in r24, 0x18 ; 24
c8: 81 60 ori r24, 0x01 ; 1
ca: 88 bb out 0x18, r24 ; 24
cc: 82 e5 ldi r24, 0x52 ; 82
ce: 8d b9 out 0x0d, r24 ; 13
d0: 08 95 ret
000000d2 <spi_write>:
d2: 8f b9 out 0x0f, r24 ; 15
d4: 77 9b sbis 0x0e, 7 ; 14
d6: fe cf rjmp .-4 ; 0xd4 <spi_write+0x2>
d8: 08 95 ret
000000da <spi_slaveSelect>:
da: 98 b3 in r25, 0x18 ; 24
dc: 21 e0 ldi r18, 0x01 ; 1
de: 30 e0 ldi r19, 0x00 ; 0
e0: 02 c0 rjmp .+4 ; 0xe6 <spi_slaveSelect+0xc>
e2: 22 0f add r18, r18
e4: 33 1f adc r19, r19
e6: 8a 95 dec r24
e8: e2 f7 brpl .-8 ; 0xe2 <spi_slaveSelect+0x8>
ea: 20 95 com r18
ec: 29 23 and r18, r25
ee: 28 bb out 0x18, r18 ; 24
f0: 08 95 ret
000000f2 <spi_slaveDeSelect>:
f2: 98 b3 in r25, 0x18 ; 24
f4: 21 e0 ldi r18, 0x01 ; 1
f6: 30 e0 ldi r19, 0x00 ; 0
f8: 02 c0 rjmp .+4 ; 0xfe <spi_slaveDeSelect+0xc>
fa: 22 0f add r18, r18
fc: 33 1f adc r19, r19
fe: 8a 95 dec r24
100: e2 f7 brpl .-8 ; 0xfa <spi_slaveDeSelect+0x8>
102: 29 2b or r18, r25
104: 28 bb out 0x18, r18 ; 24
106: 08 95 ret
00000108 <spi_writeCommand>:
108: cf 93 push r28
10a: df 93 push r29
10c: d8 2f mov r29, r24
10e: c6 2f mov r28, r22
110: 80 e0 ldi r24, 0x00 ; 0
112: e3 df rcall .-58 ; 0xda <spi_slaveSelect>
114: 8d 2f mov r24, r29
116: dd df rcall .-70 ; 0xd2 <spi_write>
118: 8c 2f mov r24, r28
11a: db df rcall .-74 ; 0xd2 <spi_write>
11c: 80 e0 ldi r24, 0x00 ; 0
11e: e9 df rcall .-46 ; 0xf2 <spi_slaveDeSelect>
120: df 91 pop r29
122: cf 91 pop r28
124: 08 95 ret
00000126 <displayDriverInit>:
126: 80 e0 ldi r24, 0x00 ; 0
128: d8 df rcall .-80 ; 0xda <spi_slaveSelect>
12a: 89 e0 ldi r24, 0x09 ; 9
12c: d2 df rcall .-92 ; 0xd2 <spi_write>
12e: 8f ef ldi r24, 0xFF ; 255
130: d0 df rcall .-96 ; 0xd2 <spi_write>
132: 80 e0 ldi r24, 0x00 ; 0
134: de df rcall .-68 ; 0xf2 <spi_slaveDeSelect>
136: 80 e0 ldi r24, 0x00 ; 0
138: d0 df rcall .-96 ; 0xda <spi_slaveSelect>
13a: 8a e0 ldi r24, 0x0A ; 10
13c: ca df rcall .-108 ; 0xd2 <spi_write>
13e: 84 e0 ldi r24, 0x04 ; 4
140: c8 df rcall .-112 ; 0xd2 <spi_write>
142: 80 e0 ldi r24, 0x00 ; 0
144: d6 df rcall .-84 ; 0xf2 <spi_slaveDeSelect>
146: 80 e0 ldi r24, 0x00 ; 0
148: c8 df rcall .-112 ; 0xda <spi_slaveSelect>
14a: 8b e0 ldi r24, 0x0B ; 11
14c: c2 df rcall .-124 ; 0xd2 <spi_write>
14e: 83 e0 ldi r24, 0x03 ; 3
150: c0 df rcall .-128 ; 0xd2 <spi_write>
152: 80 e0 ldi r24, 0x00 ; 0
154: ce df rcall .-100 ; 0xf2 <spi_slaveDeSelect>
156: 80 e0 ldi r24, 0x00 ; 0
158: c0 df rcall .-128 ; 0xda <spi_slaveSelect>
15a: 8c e0 ldi r24, 0x0C ; 12
15c: ba df rcall .-140 ; 0xd2 <spi_write>
15e: 81 e0 ldi r24, 0x01 ; 1
160: b8 df rcall .-144 ; 0xd2 <spi_write>
162: 80 e0 ldi r24, 0x00 ; 0
164: c6 cf rjmp .-116 ; 0xf2 <spi_slaveDeSelect>
166: 08 95 ret
00000168 <main>:
}
int main()
{
168: cf 93 push r28
DDRB=0x01; // Set PB0 pin as output for display select
16a: 81 e0 ldi r24, 0x01 ; 1
16c: 87 bb out 0x17, r24 ; 23
spi_masterInit(); // Initialize spi module
16e: a6 df rcall .-180 ; 0xbc <spi_masterInit>
displayDriverInit(); // Initialize display chip
170: da df rcall .-76 ; 0x126 <displayDriverInit>
172: c1 e0 ldi r28, 0x01 ; 1
// clear display (all zero's)
for (unsigned char i =1; i<=4; i++)
174: 04 c0 rjmp .+8 ; 0x17e <main+0x16>
176: 6c 2f mov r22, r28
{
// spi_slaveSelect(0); // Select display chip
//spi_write(i); // digit adress: (digit place)
//spi_write(0); // digit value: 0
//spi_slaveDeSelect(0); // Deselect display chip
spi_writeCommand(i,i);
178: 8c 2f mov r24, r28
17a: c6 df rcall .-116 ; 0x108 <spi_writeCommand>
17c: cf 5f subi r28, 0xFF ; 255
{
DDRB=0x01; // Set PB0 pin as output for display select
spi_masterInit(); // Initialize spi module
displayDriverInit(); // Initialize display chip
// clear display (all zero's)
for (unsigned char i =1; i<=4; i++)
17e: c5 30 cpi r28, 0x05 ; 5
180: d0 f3 brcs .-12 ; 0x176 <main+0xe>
//spi_write(i); // digit adress: (digit place)
//spi_write(0); // digit value: 0
//spi_slaveDeSelect(0); // Deselect display chip
spi_writeCommand(i,i);
}
wait(1000);
182: 88 ee ldi r24, 0xE8 ; 232
184: 93 e0 ldi r25, 0x03 ; 3
186: 8b df rcall .-234 ; 0x9e <wait>
188: c1 e0 ldi r28, 0x01 ; 1
// write 4-digit data
for (unsigned char i =1; i<=4; i++)
18a: 07 c0 rjmp .+14 ; 0x19a <main+0x32>
{
//spi_slaveSelect(0); // Select display chip
//spi_write(i); // digit adress: (digit place)
//spi_write(i); // digit value: i (= digit place)
//spi_slaveDeSelect(0); // Deselect display chip
spi_writeCommand(i,i);
18c: 6c 2f mov r22, r28
18e: 8c 2f mov r24, r28
190: bb df rcall .-138 ; 0x108 <spi_writeCommand>
wait(1000);
192: 88 ee ldi r24, 0xE8 ; 232
194: 93 e0 ldi r25, 0x03 ; 3
196: 83 df rcall .-250 ; 0x9e <wait>
//spi_slaveDeSelect(0); // Deselect display chip
spi_writeCommand(i,i);
}
wait(1000);
// write 4-digit data
for (unsigned char i =1; i<=4; i++)
198: cf 5f subi r28, 0xFF ; 255
19a: c5 30 cpi r28, 0x05 ; 5
19c: b8 f3 brcs .-18 ; 0x18c <main+0x24>
//spi_write(i); // digit value: i (= digit place)
//spi_slaveDeSelect(0); // Deselect display chip
spi_writeCommand(i,i);
wait(1000);
}
wait(1000);
19e: 88 ee ldi r24, 0xE8 ; 232
1a0: 93 e0 ldi r25, 0x03 ; 3
1a2: 7d df rcall .-262 ; 0x9e <wait>
1a4: 81 e0 ldi r24, 0x01 ; 1
return (1);
1a6: 90 e0 ldi r25, 0x00 ; 0
1a8: cf 91 pop r28
1aa: 08 95 ret
000001ac <_exit>:
1ac: f8 94 cli
000001ae <__stop_program>:
1ae: ff cf rjmp .-2 ; 0x1ae <__stop_program>

View File

@@ -0,0 +1,29 @@
S01200006F7064726163687420432E737265635A
S113000045C000004BC0000049C0000047C00000CC
S113001045C0000043C0000041C000003FC00000D4
S11300203DC000003BC0000039C0000037C00000E4
S113003035C0000033C0000031C000002FC00000F4
S11300402DC000002BC0000029C0000027C0000004
S113005025C0000023C0000021C000001FC0000014
S11300601DC000001BC0000019C0000017C0000024
S113007015C0000013C0000011C000000FC0000034
S11300800DC000000BC0000009C0000011241FBEF9
S1130090CFEFD0E1DEBFCDBF67D088C0B1CF20E0C5
S11300A030E008C0E3ECF9E03197F1F700C000005C
S11300B02F5F3F4F28173907ACF308958FEF87BBA5
S11300C087B3877F87BB88B3816088BB82E58DB99E
S11300D008958FB9779BFECF089598B321E030E05F
S11300E002C0220F331F8A95E2F72095292328BBEB
S11300F0089598B321E030E002C0220F331F8A959F
S1130100E2F7292B28BB0895CF93DF93D82FC62F6E
S113011080E0E3DF8D2FDDDF8C2FDBDF80E0E9DFA4
S1130120DF91CF91089580E0D8DF89E0D2DF8FEFAF
S1130130D0DF80E0DEDF80E0D0DF8AE0CADF84E069
S1130140C8DF80E0D6DF80E0C8DF8BE0C2DF83E079
S1130150C0DF80E0CEDF80E0C0DF8CE0BADF81E08A
S1130160B8DF80E0C6CF0895CF9381E087BBA6DFD8
S1130170DADFC1E004C06C2F8C2FC6DFCF5FC5303F
S1130180D0F388EE93E08BDFC1E007C06C2F8C2F97
S1130190BBDF88EE93E083DFCF5FC530B8F388EE32
S11301A093E07DDF81E090E0CF910895F894FFCF54
S9030000FC

View File

@@ -0,0 +1,136 @@
/*
* Project name : Demo5_7a : spi - 7 segments display
* Author : Avans-TI, WvdE, JW
* Revision History : 20110228: - initial release; 20120307: - this version
* Description : This program sends data to a 4-digit display with spi
* Test configuration:
MCU: ATmega128
Dev.Board: BIGAVR6
Oscillator: External Clock 08.0000 MHz
Ext. Modules: Serial 7-seg display
SW: AVR-GCC
* NOTES : Turn ON switch 15, PB1/PB2/PB3 to MISO/MOSI/SCK
*/
#define F_CPU 10e6
#include <avr/io.h>
#include <util/delay.h>
#define BIT(x) ( 1<<x )
#define DDR_SPI DDRB // spi Data direction register
#define PORT_SPI PORTB // spi Output register
#define SPI_SCK 1 // PB1: spi Pin System Clock
#define SPI_MOSI 2 // PB2: spi Pin MOSI
#define SPI_MISO 3 // PB3: spi Pin MISO
#define SPI_SS 0 // PB0: spi Pin Slave Select
// wait(): busy waiting for 'ms' millisecond - used library: util/delay.h
void wait(int ms)
{
for (int i=0; i<ms; i++)
_delay_ms(1);
}
void spi_masterInit(void)
{
DDR_SPI = 0xff; // All pins output: MOSI, SCK, SS, SS_display
DDR_SPI &= ~BIT(SPI_MISO); // except: MISO input
PORT_SPI |= BIT(SPI_SS); // SS_ADC == 1: deselect slave
SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR1); // or: SPCR = 0b11010010;
// Enable spi, MasterMode, Clock rate fck/64
// bitrate=125kHz, Mode = 0: CPOL=0, CPPH=0
}
// Write a byte from master to slave
void spi_write( unsigned char data )
{
SPDR = data; // Load byte --> starts transmission
while( !(SPSR & BIT(SPIF)) ); // Wait for transmission complete
}
// Write a byte from master to slave and read a byte from slave - not used here
char spi_writeRead( unsigned char data )
{
SPDR = data; // Load byte --> starts transmission
while( !(SPSR & BIT(SPIF)) ); // Wait for transmission complete
data = SPDR; // New received data (eventually, MISO) in SPDR
return data; // Return received byte
}
// Select device on pinnumer PORTB
void spi_slaveSelect(unsigned char chipNumber)
{
PORTB &= ~BIT(chipNumber);
}
// Deselect device on pinnumer PORTB
void spi_slaveDeSelect(unsigned char chipNumber)
{
PORTB |= BIT(chipNumber);
}
void spi_writeCommand(unsigned char adress, unsigned char data)
{
spi_slaveSelect(0);
spi_write(adress);
spi_write(data);
spi_slaveDeSelect(0);
}
// Initialize the driver chip (type MAX 7219)
void displayDriverInit()
{
spi_slaveSelect(0); // Select display chip (MAX7219)
spi_write(0x09); // Register 09: Decode Mode
spi_write(0xFF); // -> 1's = BCD mode for all digits
spi_slaveDeSelect(0); // Deselect display chip
spi_slaveSelect(0); // Select dispaly chip
spi_write(0x0A); // Register 0A: Intensity
spi_write(0x04); // ->the hex value here selects the intensity (in range [1..F])
spi_slaveDeSelect(0); // Deselect display chip
spi_slaveSelect(0); // Select display chip
spi_write(0x0B); // Register 0B: Scan-limit
spi_write(0x03); // -> 1 = Display digits 0..1 the hex value here selects how many segments get initialized
spi_slaveDeSelect(0); // Deselect display chip
spi_slaveSelect(0); // Select display chip
spi_write(0x0C); // Register 0B: Shutdown register
spi_write(0x01); // -> 1 = Normal operation
spi_slaveDeSelect(0); // Deselect display chip
}
// Set display on ('normal operation')
void displayOn()
{
spi_slaveSelect(0); // Select display chip
spi_write(0x0C); // Register 0B: Shutdown register
spi_write(0x01); // -> 1 = Normal operation
spi_slaveDeSelect(0); // Deselect display chip
}
// Set display off ('shut down')
void displayOff()
{
spi_slaveSelect(0); // Select display chip
spi_write(0x0C); // Register 0B: Shutdown register
spi_write(0x00); // -> 1 = Normal operation
spi_slaveDeSelect(0); // Deselect display chip
}
int main()
{
DDRB=0x01; // Set PB0 pin as output for display select
spi_masterInit(); // Initialize spi module
displayDriverInit(); // Initialize display chip
// clear display (all zero's)
for (unsigned char i =1; i<=4; i++)
{
// spi_slaveSelect(0); // Select display chip
//spi_write(i); // digit adress: (digit place)
//spi_write(0); // digit value: 0
//spi_slaveDeSelect(0); // Deselect display chip
spi_writeCommand(i,i);
}
wait(1000);
// write 4-digit data
for (unsigned char i =1; i<=4; i++)
{
//spi_slaveSelect(0); // Select display chip
//spi_write(i); // digit adress: (digit place)
//spi_write(i); // digit value: i (= digit place)
//spi_slaveDeSelect(0); // Deselect display chip
spi_writeCommand(i,i);
wait(1000);
}
wait(1000);
return (1);
}

View File

@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
<ProjectComponents>
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
<CApiVersion></CApiVersion>
<CBundle></CBundle>
<CClass>Device</CClass>
<CGroup>Startup</CGroup>
<CSub></CSub>
<CVariant></CVariant>
<CVendor>Atmel</CVendor>
<CVersion>1.6.0</CVersion>
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
<Description></Description>
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:anyType i:type="FileInfo">
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include\</AbsolutePath>
<Attribute></Attribute>
<Category>include</Category>
<Condition>C</Condition>
<FileContentHash i:nil="true" />
<FileVersion></FileVersion>
<Name>include/</Name>
<SelectString></SelectString>
<SourcePath></SourcePath>
</d4p1:anyType>
<d4p1:anyType i:type="FileInfo">
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include\avr\iom128.h</AbsolutePath>
<Attribute></Attribute>
<Category>header</Category>
<Condition>C</Condition>
<FileContentHash>JdJ7J9I/SJh965SEyyyVYw==</FileContentHash>
<FileVersion></FileVersion>
<Name>include/avr/iom128.h</Name>
<SelectString></SelectString>
<SourcePath></SourcePath>
</d4p1:anyType>
<d4p1:anyType i:type="FileInfo">
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\templates\main.c</AbsolutePath>
<Attribute>template</Attribute>
<Category>source</Category>
<Condition>C Exe</Condition>
<FileContentHash>dYQaOvX+0xpWshrMQ/Jkjg==</FileContentHash>
<FileVersion></FileVersion>
<Name>templates/main.c</Name>
<SelectString>Main file (.c)</SelectString>
<SourcePath></SourcePath>
</d4p1:anyType>
<d4p1:anyType i:type="FileInfo">
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\templates\main.cpp</AbsolutePath>
<Attribute>template</Attribute>
<Category>source</Category>
<Condition>C Exe</Condition>
<FileContentHash>mkKaE95TOoATsuBGv6jmxg==</FileContentHash>
<FileVersion></FileVersion>
<Name>templates/main.cpp</Name>
<SelectString>Main file (.cpp)</SelectString>
<SourcePath></SourcePath>
</d4p1:anyType>
<d4p1:anyType i:type="FileInfo">
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128</AbsolutePath>
<Attribute></Attribute>
<Category>libraryPrefix</Category>
<Condition>GCC</Condition>
<FileContentHash i:nil="true" />
<FileVersion></FileVersion>
<Name>gcc/dev/atmega128</Name>
<SelectString></SelectString>
<SourcePath></SourcePath>
</d4p1:anyType>
</Files>
<PackName>ATmega_DFP</PackName>
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.6.364/Atmel.ATmega_DFP.pdsc</PackPath>
<PackVersion>1.6.364</PackVersion>
<PresentInProject>true</PresentInProject>
<ReferenceConditionId>ATmega128</ReferenceConditionId>
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string></d4p1:string>
</RteComponents>
<Status>Resolved</Status>
<VersionMode>Fixed</VersionMode>
<IsComponentInAtProject>true</IsComponentInAtProject>
</ProjectComponent>
</ProjectComponents>
</Store>

View File

@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
<ProjectVersion>7.0</ProjectVersion>
<ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
<ProjectGuid>{2df6f5f3-181f-430e-b49a-3d9794f91482}</ProjectGuid>
<avrdevice>ATmega128</avrdevice>
<avrdeviceseries>none</avrdeviceseries>
<OutputType>Executable</OutputType>
<Language>C</Language>
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
<OutputFileExtension>.elf</OutputFileExtension>
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
<AssemblyName>opdracht C</AssemblyName>
<Name>opdracht C</Name>
<RootNamespace>opdracht C</RootNamespace>
<ToolchainFlavour>Native</ToolchainFlavour>
<KeepTimersRunning>true</KeepTimersRunning>
<OverrideVtor>false</OverrideVtor>
<CacheFlash>true</CacheFlash>
<ProgFlashFromRam>true</ProgFlashFromRam>
<RamSnippetAddress />
<UncachedRange />
<preserveEEPROM>true</preserveEEPROM>
<OverrideVtorValue />
<BootSegment>2</BootSegment>
<ResetRule>0</ResetRule>
<eraseonlaunchrule>0</eraseonlaunchrule>
<EraseKey />
<AsfFrameworkConfig>
<framework-data xmlns="">
<options />
<configurations />
<files />
<documentation help="" />
<offline-documentation help="" />
<dependencies>
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.49.1" />
</dependencies>
</framework-data>
</AsfFrameworkConfig>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<ToolchainSettings>
<AvrGcc>
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"</avrgcc.common.Device>
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>NDEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
</AvrGcc>
</ToolchainSettings>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<ToolchainSettings>
<AvrGcc>
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"</avrgcc.common.Device>
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
<avrgcc.compiler.symbols.DefSymbols>
<ListValues>
<Value>DEBUG</Value>
</ListValues>
</avrgcc.compiler.symbols.DefSymbols>
<avrgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
</ListValues>
</avrgcc.compiler.directories.IncludePaths>
<avrgcc.compiler.optimization.level>Optimize debugging experience (-Og)</avrgcc.compiler.optimization.level>
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
</AvrGcc>
</ToolchainSettings>
</PropertyGroup>
<ItemGroup>
<Compile Include="main.c">
<SubType>compile</SubType>
</Compile>
</ItemGroup>
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
</Project>

View File

@@ -37,7 +37,6 @@ SUBDIRS :=
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../lcd_control.c \
../main.c
@@ -48,19 +47,15 @@ ASM_SRCS +=
OBJS += \
lcd_control.o \
main.o
OBJS_AS_ARGS += \
lcd_control.o \
main.o
C_DEPS += \
lcd_control.d \
main.d
C_DEPS_AS_ARGS += \
lcd_control.d \
main.d
OUTPUT_FILE_PATH +=testlcd.elf
@@ -77,13 +72,6 @@ LINKER_SCRIPT_DEP+=
# AVR32/GNU C Compiler
./lcd_control.o: .././lcd_control.c
@echo Building file: $<
@echo Invoking: AVR/GNU C Compiler : 5.4.0
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include" -Og -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
@echo Finished building: $<
./main.o: .././main.c
@echo Building file: $<
@echo Invoking: AVR/GNU C Compiler : 5.4.0

View File

@@ -2,7 +2,5 @@
# Automatically-generated file. Do not edit or delete the file
################################################################################
lcd_control.c
main.c

View File

@@ -21,11 +21,11 @@ Idx Name Size VMA LMA File off Algn
CONTENTS, READONLY, DEBUGGING
8 .debug_frame 000000b8 00000000 00000000 00001b6c 2**2
CONTENTS, READONLY, DEBUGGING
9 .debug_str 00000479 00000000 00000000 00001c24 2**0
9 .debug_str 000004a0 00000000 00000000 00001c24 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_loc 00000299 00000000 00000000 0000209d 2**0
10 .debug_loc 00000299 00000000 00000000 000020c4 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_ranges 00000048 00000000 00000000 00002336 2**0
11 .debug_ranges 00000048 00000000 00000000 0000235d 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text: