daily_automated

This commit is contained in:
paolo.iocco
2023-03-13 09:01:12 +00:00
parent f29dcc4188
commit ab2532ebf2
4626 changed files with 369211 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
main.o: main.c main.h a:\hardware\tools\avr\avr\include\avr\io.h \
a:\hardware\tools\avr\avr\include\avr\sfr_defs.h \
a:\hardware\tools\avr\avr\include\inttypes.h \
a:\hardware\tools\avr\lib\gcc\avr\4.9.2\include\stdint.h \
a:\hardware\tools\avr\avr\include\stdint.h \
a:\hardware\tools\avr\avr\include\avr\iotn13.h \
a:\hardware\tools\avr\avr\include\avr\portpins.h \
a:\hardware\tools\avr\avr\include\avr\common.h \
a:\hardware\tools\avr\avr\include\avr\version.h \
a:\hardware\tools\avr\avr\include\avr\fuse.h \
a:\hardware\tools\avr\avr\include\avr\lock.h
main.h:
a:\hardware\tools\avr\avr\include\avr\io.h:
a:\hardware\tools\avr\avr\include\avr\sfr_defs.h:
a:\hardware\tools\avr\avr\include\inttypes.h:
a:\hardware\tools\avr\lib\gcc\avr\4.9.2\include\stdint.h:
a:\hardware\tools\avr\avr\include\stdint.h:
a:\hardware\tools\avr\avr\include\avr\iotn13.h:
a:\hardware\tools\avr\avr\include\avr\portpins.h:
a:\hardware\tools\avr\avr\include\avr\common.h:
a:\hardware\tools\avr\avr\include\avr\version.h:
a:\hardware\tools\avr\avr\include\avr\fuse.h:
a:\hardware\tools\avr\avr\include\avr\lock.h:

View File

@@ -0,0 +1,67 @@
/* ******************************************************** *
*
* Simple program with avr-gcc and ATtiny13
* -------------------------------------------------------- *
* Created on: 07.06.2016
* Author: Paolo Iocco
* ******************************************************** */
/* ******************************************************** *
ATtiny 13/45/85 Pin map
+--\/--+
/Reset ADC0 PB5 -|1° 8|- Vcc
ADC3 PB3 -|2 7|- PB2 ADC1 SCK
ADC2 PB4 -|3 6|- PB1 OC0B MISO AIN1
GND -|4 5|- PB0 OC0A MOSI AIN0
+------+
* ********************************************************* */
#include "main.h"
void adc_setup (void)
{
// Set the ADC input to PB2/ADC1
ADMUX |= (1 << MUX0);
ADMUX |= (1 << ADLAR);
// Set the prescaler to clock/128 & enable ADC
ADCSRA |= (1 << ADPS1) | (1 << ADPS0) | (1 << ADEN);
}
int adc_read (void)
{
// Start the conversion
ADCSRA |= (1 << ADSC);
// Wait for it to finish
while (ADCSRA & (1 << ADSC));
return ADCH;
}
void pwm_setup (void)
{
// Set Timer 0 prescaler to clock/8.
// At 9.6 MHz this is 1.2 MHz.
TCCR0B |= (1 << CS01) | (1 << CS00);
// Set to 'Fast PWM' mode
TCCR0A |= (1 << WGM01) | (1 << WGM00);
// Clear OC0B output on compare match, upwards counting.
TCCR0A |= (1 << COM0B1);
}
void pwm_write (int val)
{
OCR0B = val;
}
int main (void)
{
int adc_in;
// LED is an output.
DDRB |= (1 << LED);
adc_setup();
pwm_setup();
while (1) {
// Get the ADC value
adc_in = adc_read();
// Now write it to the PWM counter
pwm_write(adc_in);
}
}

View File

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

Binary file not shown.

View File

@@ -0,0 +1,18 @@
/*
* main.h
*
* Created on: 20.07.2016
* Author: q242695
*/
#ifndef MAIN_H_
#define MAIN_H_
#include <avr/io.h>
#ifndef F_CPU
#define F_CPU 9600000L
#endif
#define LED PB3
#endif /* MAIN_H_ */

View File

@@ -0,0 +1,8 @@
:1000000009C00EC00DC00CC00BC00AC009C008C09A
:1000100007C006C011241FBECFE9CDBF1AD01FC034
:10002000EFCF389A3D9A86B1836886B90895369A9B
:100030003699FECF85B190E0089583B7836083BF82
:100040008FB583608FBD8FB580628FBD089589BDE8
:100050000895BB9AE6DFF1DFEADF89BDFDCFF894B2
:02006000FFCFD0
:00000001FF

View File

@@ -0,0 +1,149 @@
main.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000062 00000000 00000000 00000074 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000000 00800060 00000062 000000d6 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .comment 00000011 00000000 00000000 000000d6 2**0
CONTENTS, READONLY
3 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 000000e8 2**2
CONTENTS, READONLY
4 .debug_aranges 00000028 00000000 00000000 00000124 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_info 00000410 00000000 00000000 0000014c 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_abbrev 0000037f 00000000 00000000 0000055c 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_line 0000010a 00000000 00000000 000008db 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_frame 00000064 00000000 00000000 000009e8 2**2
CONTENTS, READONLY, DEBUGGING
9 .debug_str 00000217 00000000 00000000 00000a4c 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_ranges 00000018 00000000 00000000 00000c63 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 09 c0 rjmp .+18 ; 0x14 <__ctors_end>
2: 0e c0 rjmp .+28 ; 0x20 <__bad_interrupt>
4: 0d c0 rjmp .+26 ; 0x20 <__bad_interrupt>
6: 0c c0 rjmp .+24 ; 0x20 <__bad_interrupt>
8: 0b c0 rjmp .+22 ; 0x20 <__bad_interrupt>
a: 0a c0 rjmp .+20 ; 0x20 <__bad_interrupt>
c: 09 c0 rjmp .+18 ; 0x20 <__bad_interrupt>
e: 08 c0 rjmp .+16 ; 0x20 <__bad_interrupt>
10: 07 c0 rjmp .+14 ; 0x20 <__bad_interrupt>
12: 06 c0 rjmp .+12 ; 0x20 <__bad_interrupt>
00000014 <__ctors_end>:
14: 11 24 eor r1, r1
16: 1f be out 0x3f, r1 ; 63
18: cf e9 ldi r28, 0x9F ; 159
1a: cd bf out 0x3d, r28 ; 61
1c: 1a d0 rcall .+52 ; 0x52 <main>
1e: 1f c0 rjmp .+62 ; 0x5e <_exit>
00000020 <__bad_interrupt>:
20: ef cf rjmp .-34 ; 0x0 <__vectors>
00000022 <adc_setup>:
#include "main.h"
void adc_setup (void)
{
// Set the ADC input to PB2/ADC1
ADMUX |= (1 << MUX0);
22: 38 9a sbi 0x07, 0 ; 7
ADMUX |= (1 << ADLAR);
24: 3d 9a sbi 0x07, 5 ; 7
// Set the prescaler to clock/128 & enable ADC
ADCSRA |= (1 << ADPS1) | (1 << ADPS0) | (1 << ADEN);
26: 86 b1 in r24, 0x06 ; 6
28: 83 68 ori r24, 0x83 ; 131
2a: 86 b9 out 0x06, r24 ; 6
2c: 08 95 ret
0000002e <adc_read>:
}
int adc_read (void)
{
// Start the conversion
ADCSRA |= (1 << ADSC);
2e: 36 9a sbi 0x06, 6 ; 6
// Wait for it to finish
while (ADCSRA & (1 << ADSC));
30: 36 99 sbic 0x06, 6 ; 6
32: fe cf rjmp .-4 ; 0x30 <adc_read+0x2>
return ADCH;
34: 85 b1 in r24, 0x05 ; 5
}
36: 90 e0 ldi r25, 0x00 ; 0
38: 08 95 ret
0000003a <pwm_setup>:
void pwm_setup (void)
{
// Set Timer 0 prescaler to clock/8.
// At 9.6 MHz this is 1.2 MHz.
TCCR0B |= (1 << CS01) | (1 << CS00);
3a: 83 b7 in r24, 0x33 ; 51
3c: 83 60 ori r24, 0x03 ; 3
3e: 83 bf out 0x33, r24 ; 51
// Set to 'Fast PWM' mode
TCCR0A |= (1 << WGM01) | (1 << WGM00);
40: 8f b5 in r24, 0x2f ; 47
42: 83 60 ori r24, 0x03 ; 3
44: 8f bd out 0x2f, r24 ; 47
// Clear OC0B output on compare match, upwards counting.
TCCR0A |= (1 << COM0B1);
46: 8f b5 in r24, 0x2f ; 47
48: 80 62 ori r24, 0x20 ; 32
4a: 8f bd out 0x2f, r24 ; 47
4c: 08 95 ret
0000004e <pwm_write>:
}
void pwm_write (int val)
{
OCR0B = val;
4e: 89 bd out 0x29, r24 ; 41
50: 08 95 ret
00000052 <main>:
int main (void)
{
int adc_in;
// LED is an output.
DDRB |= (1 << LED);
52: bb 9a sbi 0x17, 3 ; 23
adc_setup();
54: e6 df rcall .-52 ; 0x22 <adc_setup>
pwm_setup();
56: f1 df rcall .-30 ; 0x3a <pwm_setup>
while (1) {
// Get the ADC value
adc_in = adc_read();
58: ea df rcall .-44 ; 0x2e <adc_read>
TCCR0A |= (1 << COM0B1);
}
void pwm_write (int val)
{
OCR0B = val;
5a: 89 bd out 0x29, r24 ; 41
5c: fd cf rjmp .-6 ; 0x58 <main+0x6>
0000005e <_exit>:
5e: f8 94 cli
00000060 <__stop_program>:
60: ff cf rjmp .-2 ; 0x60 <__stop_program>

View File

@@ -0,0 +1,201 @@
1 .file "main.c"
2 __SP_L__ = 0x3d
3 __SREG__ = 0x3f
4 __tmp_reg__ = 0
5 __zero_reg__ = 1
6 .text
7 .Ltext0:
8 .cfi_sections .debug_frame
9 .global adc_setup
11 adc_setup:
12 .LFB0:
13 .file 1 "main.c"
1:main.c **** /* ******************************************************** *
2:main.c **** *
3:main.c **** * Simple program with avr-gcc and ATtiny13
4:main.c **** * -------------------------------------------------------- *
5:main.c **** * Created on: 07.06.2016
6:main.c **** * Author: Paolo Iocco
7:main.c **** * ******************************************************** */
8:main.c **** /* ******************************************************** *
9:main.c **** ATtiny 13/45/85 Pin map
10:main.c **** +--\/--+
11:main.c **** /Reset ADC0 PB5 -|1° 8|- Vcc
12:main.c **** ADC3 PB3 -|2 7|- PB2 ADC1 SCK
13:main.c **** ADC2 PB4 -|3 6|- PB1 OC0B MISO AIN1
14:main.c **** GND -|4 5|- PB0 OC0A MOSI AIN0
15:main.c **** +------+
16:main.c **** * ********************************************************* */
17:main.c ****
18:main.c **** #include "main.h"
19:main.c ****
20:main.c **** void adc_setup (void)
21:main.c **** {
14 .loc 1 21 0
15 .cfi_startproc
16 /* prologue: function */
17 /* frame size = 0 */
18 /* stack size = 0 */
19 .L__stack_usage = 0
22:main.c **** // Set the ADC input to PB2/ADC1
23:main.c **** ADMUX |= (1 << MUX0);
20 .loc 1 23 0
21 0000 389A sbi 0x7,0
24:main.c **** ADMUX |= (1 << ADLAR);
22 .loc 1 24 0
23 0002 3D9A sbi 0x7,5
25:main.c **** // Set the prescaler to clock/128 & enable ADC
26:main.c **** ADCSRA |= (1 << ADPS1) | (1 << ADPS0) | (1 << ADEN);
24 .loc 1 26 0
25 0004 86B1 in r24,0x6
26 0006 8368 ori r24,lo8(-125)
27 0008 86B9 out 0x6,r24
28 000a 0895 ret
29 .cfi_endproc
30 .LFE0:
32 .global adc_read
34 adc_read:
35 .LFB1:
27:main.c **** }
28:main.c ****
29:main.c **** int adc_read (void)
30:main.c **** {
36 .loc 1 30 0
37 .cfi_startproc
38 /* prologue: function */
39 /* frame size = 0 */
40 /* stack size = 0 */
41 .L__stack_usage = 0
31:main.c **** // Start the conversion
32:main.c **** ADCSRA |= (1 << ADSC);
42 .loc 1 32 0
43 000c 369A sbi 0x6,6
44 .L3:
33:main.c **** // Wait for it to finish
34:main.c **** while (ADCSRA & (1 << ADSC));
45 .loc 1 34 0 discriminator 1
46 000e 3699 sbic 0x6,6
47 0010 00C0 rjmp .L3
35:main.c **** return ADCH;
48 .loc 1 35 0
49 0012 85B1 in r24,0x5
36:main.c **** }
50 .loc 1 36 0
51 0014 90E0 ldi r25,0
52 0016 0895 ret
53 .cfi_endproc
54 .LFE1:
56 .global pwm_setup
58 pwm_setup:
59 .LFB2:
37:main.c ****
38:main.c **** void pwm_setup (void)
39:main.c **** {
60 .loc 1 39 0
61 .cfi_startproc
62 /* prologue: function */
63 /* frame size = 0 */
64 /* stack size = 0 */
65 .L__stack_usage = 0
40:main.c **** // Set Timer 0 prescaler to clock/8.
41:main.c **** // At 9.6 MHz this is 1.2 MHz.
42:main.c **** TCCR0B |= (1 << CS01) | (1 << CS00);
66 .loc 1 42 0
67 0018 83B7 in r24,0x33
68 001a 8360 ori r24,lo8(3)
69 001c 83BF out 0x33,r24
43:main.c **** // Set to 'Fast PWM' mode
44:main.c **** TCCR0A |= (1 << WGM01) | (1 << WGM00);
70 .loc 1 44 0
71 001e 8FB5 in r24,0x2f
72 0020 8360 ori r24,lo8(3)
73 0022 8FBD out 0x2f,r24
45:main.c **** // Clear OC0B output on compare match, upwards counting.
46:main.c **** TCCR0A |= (1 << COM0B1);
74 .loc 1 46 0
75 0024 8FB5 in r24,0x2f
76 0026 8062 ori r24,lo8(32)
77 0028 8FBD out 0x2f,r24
78 002a 0895 ret
79 .cfi_endproc
80 .LFE2:
82 .global pwm_write
84 pwm_write:
85 .LFB3:
47:main.c **** }
48:main.c ****
49:main.c **** void pwm_write (int val)
50:main.c **** {
86 .loc 1 50 0
87 .cfi_startproc
88 .LVL0:
89 /* prologue: function */
90 /* frame size = 0 */
91 /* stack size = 0 */
92 .L__stack_usage = 0
51:main.c **** OCR0B = val;
93 .loc 1 51 0
94 002c 89BD out 0x29,r24
95 002e 0895 ret
96 .cfi_endproc
97 .LFE3:
99 .section .text.startup,"ax",@progbits
100 .global main
102 main:
103 .LFB4:
52:main.c **** }
53:main.c ****
54:main.c **** int main (void)
55:main.c **** {
104 .loc 1 55 0
105 .cfi_startproc
106 /* prologue: function */
107 /* frame size = 0 */
108 /* stack size = 0 */
109 .L__stack_usage = 0
56:main.c **** int adc_in;
57:main.c **** // LED is an output.
58:main.c **** DDRB |= (1 << LED);
110 .loc 1 58 0
111 0000 BB9A sbi 0x17,3
59:main.c **** adc_setup();
112 .loc 1 59 0
113 0002 00D0 rcall adc_setup
114 .LVL1:
60:main.c **** pwm_setup();
115 .loc 1 60 0
116 0004 00D0 rcall pwm_setup
117 .LVL2:
118 .L9:
61:main.c **** while (1) {
62:main.c **** // Get the ADC value
63:main.c **** adc_in = adc_read();
119 .loc 1 63 0 discriminator 1
120 0006 00D0 rcall adc_read
121 .LVL3:
122 .LBB4:
123 .LBB5:
51:main.c **** }
124 .loc 1 51 0 discriminator 1
125 0008 89BD out 0x29,r24
126 000a 00C0 rjmp .L9
127 .LBE5:
128 .LBE4:
129 .cfi_endproc
130 .LFE4:
132 .text
133 .Letext0:
134 .file 2 "a:\\hardware\\tools\\avr\\avr\\include\\stdint.h"
DEFINED SYMBOLS
*ABS*:00000000 main.c
C:\Users\q242695\AppData\Local\Temp\ccY7rbVv.s:2 *ABS*:0000003d __SP_L__
C:\Users\q242695\AppData\Local\Temp\ccY7rbVv.s:3 *ABS*:0000003f __SREG__
C:\Users\q242695\AppData\Local\Temp\ccY7rbVv.s:4 *ABS*:00000000 __tmp_reg__
C:\Users\q242695\AppData\Local\Temp\ccY7rbVv.s:5 *ABS*:00000001 __zero_reg__
C:\Users\q242695\AppData\Local\Temp\ccY7rbVv.s:11 .text:00000000 adc_setup
C:\Users\q242695\AppData\Local\Temp\ccY7rbVv.s:34 .text:0000000c adc_read
C:\Users\q242695\AppData\Local\Temp\ccY7rbVv.s:58 .text:00000018 pwm_setup
C:\Users\q242695\AppData\Local\Temp\ccY7rbVv.s:84 .text:0000002c pwm_write
C:\Users\q242695\AppData\Local\Temp\ccY7rbVv.s:102 .text.startup:00000000 main
NO UNDEFINED SYMBOLS

View File

@@ -0,0 +1,427 @@
Archive member included to satisfy reference by file (symbol)
a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o (exit)
Memory Configuration
Name Origin Length Attributes
text 0x00000000 0x00002000 xr
data 0x00800060 0x0000ffa0 rw !x
eeprom 0x00810000 0x00010000 rw !x
fuse 0x00820000 0x00000002 rw !x
lock 0x00830000 0x00000400 rw !x
signature 0x00840000 0x00000400 rw !x
user_signatures 0x00850000 0x00000400 rw !x
*default* 0x00000000 0xffffffff
Linker script and memory map
LOAD a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
LOAD main.o
LOAD a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack\libm.a
START GROUP
LOAD a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a
LOAD a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack\libm.a
LOAD a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack\libc.a
LOAD a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack\libattiny13.a
END GROUP
0x00002000 __TEXT_REGION_LENGTH__ = DEFINED (__TEXT_REGION_LENGTH__)?__TEXT_REGION_LENGTH__:0x2000
0x0000ffa0 __DATA_REGION_LENGTH__ = DEFINED (__DATA_REGION_LENGTH__)?__DATA_REGION_LENGTH__:0xffa0
0x00010000 __EEPROM_REGION_LENGTH__ = DEFINED (__EEPROM_REGION_LENGTH__)?__EEPROM_REGION_LENGTH__:0x10000
[0x00000002] __FUSE_REGION_LENGTH__ = DEFINED (__FUSE_REGION_LENGTH__)?__FUSE_REGION_LENGTH__:0x400
0x00000400 __LOCK_REGION_LENGTH__ = DEFINED (__LOCK_REGION_LENGTH__)?__LOCK_REGION_LENGTH__:0x400
0x00000400 __SIGNATURE_REGION_LENGTH__ = DEFINED (__SIGNATURE_REGION_LENGTH__)?__SIGNATURE_REGION_LENGTH__:0x400
0x00000400 __USER_SIGNATURE_REGION_LENGTH__ = DEFINED (__USER_SIGNATURE_REGION_LENGTH__)?__USER_SIGNATURE_REGION_LENGTH__:0x400
.hash
*(.hash)
.dynsym
*(.dynsym)
.dynstr
*(.dynstr)
.gnu.version
*(.gnu.version)
.gnu.version_d
*(.gnu.version_d)
.gnu.version_r
*(.gnu.version_r)
.rel.init
*(.rel.init)
.rela.init
*(.rela.init)
.rel.text
*(.rel.text)
*(.rel.text.*)
*(.rel.gnu.linkonce.t*)
.rela.text
*(.rela.text)
*(.rela.text.*)
*(.rela.gnu.linkonce.t*)
.rel.fini
*(.rel.fini)
.rela.fini
*(.rela.fini)
.rel.rodata
*(.rel.rodata)
*(.rel.rodata.*)
*(.rel.gnu.linkonce.r*)
.rela.rodata
*(.rela.rodata)
*(.rela.rodata.*)
*(.rela.gnu.linkonce.r*)
.rel.data
*(.rel.data)
*(.rel.data.*)
*(.rel.gnu.linkonce.d*)
.rela.data
*(.rela.data)
*(.rela.data.*)
*(.rela.gnu.linkonce.d*)
.rel.ctors
*(.rel.ctors)
.rela.ctors
*(.rela.ctors)
.rel.dtors
*(.rel.dtors)
.rela.dtors
*(.rela.dtors)
.rel.got
*(.rel.got)
.rela.got
*(.rela.got)
.rel.bss
*(.rel.bss)
.rela.bss
*(.rela.bss)
.rel.plt
*(.rel.plt)
.rela.plt
*(.rela.plt)
.text 0x00000000 0x62
*(.vectors)
.vectors 0x00000000 0x14 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
0x00000000 __vector_default
0x00000000 __vectors
*(.vectors)
*(.progmem.gcc*)
0x00000014 . = ALIGN (0x2)
0x00000014 __trampolines_start = .
*(.trampolines)
.trampolines 0x00000014 0x0 linker stubs
*(.trampolines*)
0x00000014 __trampolines_end = .
*libprintf_flt.a:*(.progmem.data)
*libc.a:*(.progmem.data)
*(.progmem*)
0x00000014 . = ALIGN (0x2)
*(.jumptables)
*(.jumptables*)
*(.lowtext)
*(.lowtext*)
0x00000014 __ctors_start = .
*(.ctors)
0x00000014 __ctors_end = .
0x00000014 __dtors_start = .
*(.dtors)
0x00000014 __dtors_end = .
SORT(*)(.ctors)
SORT(*)(.dtors)
*(.init0)
.init0 0x00000014 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
0x00000014 __init
*(.init0)
*(.init1)
*(.init1)
*(.init2)
.init2 0x00000014 0x8 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
*(.init2)
*(.init3)
*(.init3)
*(.init4)
*(.init4)
*(.init5)
*(.init5)
*(.init6)
*(.init6)
*(.init7)
*(.init7)
*(.init8)
*(.init8)
*(.init9)
.init9 0x0000001c 0x4 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
*(.init9)
*(.text)
.text 0x00000020 0x2 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
0x00000020 __vector_1
0x00000020 __bad_interrupt
0x00000020 __vector_6
0x00000020 __vector_3
0x00000020 __vector_7
0x00000020 __vector_5
0x00000020 __vector_4
0x00000020 __vector_9
0x00000020 __vector_2
0x00000020 __vector_8
.text 0x00000022 0x30 main.o
0x00000022 adc_setup
0x0000002e adc_read
0x0000003a pwm_setup
0x0000004e pwm_write
.text 0x00000052 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
0x00000052 . = ALIGN (0x2)
*(.text.*)
.text.startup 0x00000052 0xc main.o
0x00000052 main
.text.libgcc.mul
0x0000005e 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
.text.libgcc.div
0x0000005e 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
.text.libgcc 0x0000005e 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
.text.libgcc.prologue
0x0000005e 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
.text.libgcc.builtins
0x0000005e 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
.text.libgcc.fmul
0x0000005e 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
.text.libgcc.fixed
0x0000005e 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
0x0000005e . = ALIGN (0x2)
*(.fini9)
.fini9 0x0000005e 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
0x0000005e _exit
0x0000005e exit
*(.fini9)
*(.fini8)
*(.fini8)
*(.fini7)
*(.fini7)
*(.fini6)
*(.fini6)
*(.fini5)
*(.fini5)
*(.fini4)
*(.fini4)
*(.fini3)
*(.fini3)
*(.fini2)
*(.fini2)
*(.fini1)
*(.fini1)
*(.fini0)
.fini0 0x0000005e 0x4 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
*(.fini0)
0x00000062 _etext = .
.data 0x00800060 0x0 load address 0x00000062
[!provide] PROVIDE (__data_start, .)
*(.data)
.data 0x00800060 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
.data 0x00800060 0x0 main.o
.data 0x00800060 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
*(.data*)
*(.rodata)
*(.rodata*)
*(.gnu.linkonce.d*)
0x00800060 . = ALIGN (0x2)
0x00800060 _edata = .
[!provide] PROVIDE (__data_end, .)
.bss 0x00800060 0x0
[!provide] PROVIDE (__bss_start, .)
*(.bss)
.bss 0x00800060 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
.bss 0x00800060 0x0 main.o
.bss 0x00800060 0x0 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
*(.bss*)
*(COMMON)
[!provide] PROVIDE (__bss_end, .)
0x00000062 __data_load_start = LOADADDR (.data)
0x00000062 __data_load_end = (__data_load_start + SIZEOF (.data))
.noinit 0x00800060 0x0
[!provide] PROVIDE (__noinit_start, .)
*(.noinit*)
[!provide] PROVIDE (__noinit_end, .)
0x00800060 _end = .
[!provide] PROVIDE (__heap_start, .)
.eeprom 0x00810000 0x0
*(.eeprom*)
0x00810000 __eeprom_end = .
.fuse
*(.fuse)
*(.lfuse)
*(.hfuse)
*(.efuse)
.lock
*(.lock*)
.signature
*(.signature*)
.user_signatures
*(.user_signatures*)
.stab
*(.stab)
.stabstr
*(.stabstr)
.stab.excl
*(.stab.excl)
.stab.exclstr
*(.stab.exclstr)
.stab.index
*(.stab.index)
.stab.indexstr
*(.stab.indexstr)
.comment 0x00000000 0x11
*(.comment)
.comment 0x00000000 0x11 main.o
0x12 (size before relaxing)
.note.gnu.avr.deviceinfo
0x00000000 0x3c
.note.gnu.avr.deviceinfo
0x00000000 0x3c a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
.note.gnu.build-id
*(.note.gnu.build-id)
.debug
*(.debug)
.line
*(.line)
.debug_srcinfo
*(.debug_srcinfo)
.debug_sfnames
*(.debug_sfnames)
.debug_aranges 0x00000000 0x28
*(.debug_aranges)
.debug_aranges
0x00000000 0x28 main.o
.debug_pubnames
*(.debug_pubnames)
.debug_info 0x00000000 0x410
*(.debug_info .gnu.linkonce.wi.*)
.debug_info 0x00000000 0x2b8 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
.debug_info 0x000002b8 0x158 main.o
.debug_abbrev 0x00000000 0x37f
*(.debug_abbrev)
.debug_abbrev 0x00000000 0x294 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
.debug_abbrev 0x00000294 0xeb main.o
.debug_line 0x00000000 0x10a
*(.debug_line .debug_line.* .debug_line_end)
.debug_line 0x00000000 0x1a a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
.debug_line 0x0000001a 0xf0 main.o
.debug_frame 0x00000000 0x64
*(.debug_frame)
.debug_frame 0x00000000 0x64 main.o
.debug_str 0x00000000 0x217
*(.debug_str)
.debug_str 0x00000000 0xf6 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
.debug_str 0x000000f6 0x121 main.o
0x155 (size before relaxing)
.debug_loc
*(.debug_loc)
.debug_macinfo
*(.debug_macinfo)
.debug_weaknames
*(.debug_weaknames)
.debug_funcnames
*(.debug_funcnames)
.debug_typenames
*(.debug_typenames)
.debug_varnames
*(.debug_varnames)
.debug_pubtypes
*(.debug_pubtypes)
.debug_ranges 0x00000000 0x18
*(.debug_ranges)
.debug_ranges 0x00000000 0x18 main.o
.debug_macro
*(.debug_macro)
OUTPUT(main.elf elf32-avr)
LOAD linker stubs
Cross Reference Table
Symbol File
__FUSE_REGION_LENGTH__ a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__bad_interrupt a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__heap_end a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__init a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__stack a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__vector_1 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__vector_2 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__vector_3 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__vector_4 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__vector_5 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__vector_6 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__vector_7 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__vector_8 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__vector_9 a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__vector_default a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
__vectors a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
_exit a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
adc_read main.o
adc_setup main.o
exit a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/avr25/tiny-stack\libgcc.a(_exit.o)
a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
main main.o
a:/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr25/tiny-stack/crtattiny13.o
pwm_setup main.o
pwm_write main.o

View File

@@ -0,0 +1,46 @@
00000000 W __heap_end
00000000 a __tmp_reg__
00000000 W __vector_default
00000000 T __vectors
00000001 a __zero_reg__
00000002 A __FUSE_REGION_LENGTH__
00000014 T __ctors_end
00000014 T __ctors_start
00000014 T __dtors_end
00000014 T __dtors_start
00000014 W __init
00000014 T __trampolines_end
00000014 T __trampolines_start
00000020 T __bad_interrupt
00000020 W __vector_1
00000020 W __vector_2
00000020 W __vector_3
00000020 W __vector_4
00000020 W __vector_5
00000020 W __vector_6
00000020 W __vector_7
00000020 W __vector_8
00000020 W __vector_9
00000022 T adc_setup
0000002e T adc_read
0000003a T pwm_setup
0000003d a __SP_L__
0000003f a __SREG__
0000004e T pwm_write
00000052 T main
0000005e T _exit
0000005e W exit
00000060 t __stop_program
00000062 A __data_load_end
00000062 A __data_load_start
00000062 T _etext
0000009f W __stack
00000400 A __LOCK_REGION_LENGTH__
00000400 A __SIGNATURE_REGION_LENGTH__
00000400 A __USER_SIGNATURE_REGION_LENGTH__
00002000 A __TEXT_REGION_LENGTH__
0000ffa0 A __DATA_REGION_LENGTH__
00010000 A __EEPROM_REGION_LENGTH__
00800060 D _edata
00800060 D _end
00810000 D __eeprom_end

View File

@@ -0,0 +1,441 @@
# Hey Emacs, this is a -*- makefile -*-
#
# WinAVR makefile written by Eric B. Weddington, Jörg Wunsch, et al.
# Released to the Public Domain
# Please read the make user manual!
#
# Additional material for this makefile was submitted by:
# Tim Henigan
# Peter Fleury
# Reiner Patommel
# Sander Pool
# Frederik Rouleau
# Markus Pfaff
#
# On command line:
#
# make all = Make software.
#
# make clean = Clean out built project files.
#
# make coff = Convert ELF to AVR COFF (for use with AVR Studio 3.x or VMLAB).
#
# make extcoff = Convert ELF to AVR Extended COFF (for use with AVR Studio
# 4.07 or greater).
#
# make program = Download the hex file to the device, using avrdude. Please
# customize the avrdude settings below first!
#
# make filename.s = Just compile filename.c into the assembler code only
#
# To rebuild project do "make clean" then "make all".
#
# mth 2004/09
# Differences from WinAVR 20040720 sample:
# - DEPFLAGS according to Eric Weddingtion's fix (avrfreaks/gcc-forum)
# - F_OSC Define in CFLAGS and AFLAGS
# MCU name
MCU = attiny13
# Main Oscillator Frequency
# This is only used to define F_OSC in all assembler and c-sources.
#F_OSC = 9600000
# Output format. (can be srec, ihex, binary)
FORMAT = ihex
# Target file name (without extension).
TARGET = main
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c
# List Assembler source files here.
# Make them always end in a capital .S. Files ending in a lowercase .s
# will not be considered source files but generated files (assembler
# output from the compiler), and will be deleted upon "make clean"!
# Even though the DOS/Win* filesystem matches both .s and .S the same,
# it will preserve the spelling of the filenames, and gcc itself does
# care about how the name is spelled on its command-line.
ASRC =
# Optimization level, can be [0, 1, 2, 3, s].
# 0 = turn off optimization. s = optimize for size.
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
OPT = s
# Debugging format.
# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
#DEBUG = stabs
DEBUG = dwarf-2
# List any extra directories to look for include files here.
# Each directory must be seperated by a space.
EXTRAINCDIRS =
# Compiler flag to set the C Standard level.
# c89 - "ANSI" C
# gnu89 - c89 plus GCC extensions
# c99 - ISO C99 standard (not yet fully implemented)
# gnu99 - c99 plus GCC extensions
CSTANDARD = -std=gnu99
# Place -D or -U options here
CDEFS =
# Place -I options here
CINCS =
# Compiler flags.
# -g*: generate debugging information
# -O*: optimization level
# -f...: tuning, see GCC manual and avr-libc documentation
# -Wall...: warning level
# -Wa,...: tell GCC to pass this to the assembler.
# -adhlns...: create assembler listing
CFLAGS = -g$(DEBUG)
CFLAGS += $(CDEFS) $(CINCS)
CFLAGS += -O$(OPT)
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -Wall -Wstrict-prototypes
CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
CFLAGS += $(CSTANDARD)
CFLAGS += -DF_OSC=$(F_OSC)
# Assembler flags.
# -Wa,...: tell GCC to pass this to the assembler.
# -ahlms: create listing
# -gstabs: have the assembler create line number information; note that
# for use in COFF files, additional information about filenames
# and function names needs to be present in the assembler source
# files -- see avr-libc docs [FIXME: not yet described there]
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
ASFLAGS += -DF_OSC=$(F_OSC)
#Additional libraries.
# Minimalistic printf version
PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
# Floating point printf version (requires MATH_LIB = -lm below)
PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
PRINTF_LIB =
# Minimalistic scanf version
SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
SCANF_LIB =
MATH_LIB = -lm
# External memory options
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
# used for variables (.data/.bss) and heap (malloc()).
#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
# only used for heap (malloc()).
#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff
EXTMEMOPTS =
# Linker flags.
# -Wl,...: tell GCC to pass this to linker.
# -Map: create map file
# --cref: add cross reference to map file
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
LDFLAGS += $(EXTMEMOPTS)
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
# Programming support using avrdude. Settings and variables.
# Programming hardware: alf avr910 avrisp bascom bsd
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
#
# Type: avrdude -c ?
# to get a full listing.
#
#AVRDUDE_PROGRAMMER = stk500
AVRDUDE_PROGRAMMER = usbasp
# com1 = serial port. Use lpt1 to connect to parallel port.
AVRDUDE_PORT = usb # programmer connected to serial device
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
# Uncomment the following if you want avrdude's erase cycle counter.
# Note that this counter needs to be initialized first using -Yn,
# see avrdude manual.
#AVRDUDE_ERASE_COUNTER = -y
# Uncomment the following if you do /not/ wish a verification to be
# performed after programming the device.
#AVRDUDE_NO_VERIFY = -V
# Increase verbosity level. Please use this when submitting bug
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
# to submit bug reports.
#AVRDUDE_VERBOSE = -v -v
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
# ---------------------------------------------------------------------------
# Define directories, if needed.
DIRAVR = c:/winavr
DIRAVRBIN = $(DIRAVR)/bin
DIRAVRUTILS = $(DIRAVR)/utils/bin
DIRINC = .
DIRLIB = $(DIRAVR)/avr/lib
# Define programs and commands.
SHELL = sh
CC = avr-gcc
OBJCOPY = avr-objcopy
OBJDUMP = avr-objdump
SIZE = avr-size
NM = avr-nm
AVRDUDE = avrdude
REMOVE = rm -f
COPY = cp
# Define Messages
# English
MSG_ERRORS_NONE = Errors: none
MSG_BEGIN = -------- begin --------
MSG_END = -------- end --------
MSG_SIZE_BEFORE = Size before:
MSG_SIZE_AFTER = Size after:
MSG_COFF = Converting to AVR COFF:
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
MSG_FLASH = Creating load file for Flash:
MSG_EEPROM = Creating load file for EEPROM:
MSG_EXTENDED_LISTING = Creating Extended Listing:
MSG_SYMBOL_TABLE = Creating Symbol Table:
MSG_LINKING = Linking:
MSG_COMPILING = Compiling:
MSG_ASSEMBLING = Assembling:
MSG_CLEANING = Cleaning project:
# Define all object files.
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
# Define all listing files.
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst)
# Compiler flags to generate dependency files.
### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
# Combine all necessary flags and optional flags.
# Add target processor to flags.
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
# Default target.
#all: begin gccversion sizebefore build sizeafter finished end
all: begin gccversion build size finished end
build: elf hex eep lss sym
elf: $(TARGET).elf
hex: $(TARGET).hex
eep: $(TARGET).eep
lss: $(TARGET).lss
sym: $(TARGET).sym
# Eye candy.
# AVR Studio 3.x does not check make's exit code but relies on
# the following magic strings to be generated by the compile job.
begin:
@echo
@echo $(MSG_BEGIN)
finished:
@echo $(MSG_ERRORS_NONE)
end:
@echo $(MSG_END)
@echo
# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
ELFSIZE = $(SIZE) -A $(TARGET).elf
sizebefore:
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
sizeafter:
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
size:
$(SIZE) -C --mcu=$(MCU) $(TARGET).elf
# Display compiler version information.
gccversion :
@$(CC) --version
# Program the device.
program: $(TARGET).hex $(TARGET).eep
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
COFFCONVERT=$(OBJCOPY) --debugging \
--change-section-address .data-0x800000 \
--change-section-address .bss-0x800000 \
--change-section-address .noinit-0x800000 \
--change-section-address .eeprom-0x810000
coff: $(TARGET).elf
@echo
@echo $(MSG_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof
extcoff: $(TARGET).elf
@echo
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
# Create final output files (.hex, .eep) from ELF output file.
%.hex: %.elf
@echo
@echo $(MSG_FLASH) $@
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
%.eep: %.elf
@echo
@echo $(MSG_EEPROM) $@
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
# Create extended listing file from ELF output file.
%.lss: %.elf
@echo
@echo $(MSG_EXTENDED_LISTING) $@
$(OBJDUMP) -h -S $< > $@
# Create a symbol table from ELF output file.
%.sym: %.elf
@echo
@echo $(MSG_SYMBOL_TABLE) $@
$(NM) -n $< > $@
# Link: create ELF output file from object files.
.SECONDARY : $(TARGET).elf
.PRECIOUS : $(OBJ)
%.elf: $(OBJ)
@echo
@echo $(MSG_LINKING) $@
$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS)
# Compile: create object files from C source files.
%.o : %.c
@echo
@echo $(MSG_COMPILING) $<
$(CC) -c $(ALL_CFLAGS) $< -o $@
# Compile: create assembler files from C source files.
%.s : %.c
$(CC) -S $(ALL_CFLAGS) $< -o $@
# Assemble: create object files from assembler source files.
%.o : %.S
@echo
@echo $(MSG_ASSEMBLING) $<
$(CC) -c $(ALL_ASFLAGS) $< -o $@
# Target: clean project.
clean: begin clean_list finished end
clean_list :
@echo
@echo $(MSG_CLEANING)
$(REMOVE) $(TARGET).hex
$(REMOVE) $(TARGET).eep
$(REMOVE) $(TARGET).obj
$(REMOVE) $(TARGET).cof
$(REMOVE) $(TARGET).elf
$(REMOVE) $(TARGET).map
$(REMOVE) $(TARGET).obj
$(REMOVE) $(TARGET).a90
$(REMOVE) $(TARGET).sym
$(REMOVE) $(TARGET).lnk
$(REMOVE) $(TARGET).lss
$(REMOVE) $(OBJ)
$(REMOVE) $(LST)
$(REMOVE) $(SRC:.c=.s)
$(REMOVE) $(SRC:.c=.d)
$(REMOVE) .dep/*
# Include the dependency files.
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
# Listing of phony targets.
.PHONY : all begin finish end sizebefore sizeafter gccversion \
build elf hex eep lss sym coff extcoff \
clean clean_list program