First commit
This commit is contained in:
BIN
resources/blinky/blink.bin
Normal file
BIN
resources/blinky/blink.bin
Normal file
Binary file not shown.
17
resources/blinky/blink.c
Normal file
17
resources/blinky/blink.c
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef F_CPU
|
||||
#define F_CPU 1000000UL
|
||||
#endif
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
|
||||
int main(void) {
|
||||
DDRB = 0b00000001;
|
||||
|
||||
while (1) {
|
||||
PORTB = 0b00000001;
|
||||
PORTB = 0b00000000;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
69
resources/blinky/blink.dump
Normal file
69
resources/blinky/blink.dump
Normal file
@ -0,0 +1,69 @@
|
||||
|
||||
blink.elf: file format elf32-avr
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <__vectors>:
|
||||
0: 0c 94 34 00 jmp 0x68 ; 0x68 <__ctors_end>
|
||||
4: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
8: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
c: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
10: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
14: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
18: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
1c: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
20: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
24: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
28: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
2c: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
30: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
34: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
38: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
3c: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
40: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
44: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
48: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
4c: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
50: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
54: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
58: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
5c: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
60: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
64: 0c 94 3e 00 jmp 0x7c ; 0x7c <__bad_interrupt>
|
||||
|
||||
00000068 <__ctors_end>:
|
||||
68: 11 24 eor r1, r1
|
||||
6a: 1f be out 0x3f, r1 ; 63
|
||||
6c: cf ef ldi r28, 0xFF ; 255
|
||||
6e: d8 e0 ldi r29, 0x08 ; 8
|
||||
70: de bf out 0x3e, r29 ; 62
|
||||
72: cd bf out 0x3d, r28 ; 61
|
||||
74: 0e 94 40 00 call 0x80 ; 0x80 <main>
|
||||
78: 0c 94 45 00 jmp 0x8a ; 0x8a <_exit>
|
||||
|
||||
0000007c <__bad_interrupt>:
|
||||
7c: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
|
||||
|
||||
00000080 <main>:
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
|
||||
int main(void) {
|
||||
DDRB = 0b00000001;
|
||||
80: 81 e0 ldi r24, 0x01 ; 1
|
||||
82: 84 b9 out 0x04, r24 ; 4
|
||||
|
||||
while (1) {
|
||||
PORTB = 0b00000001;
|
||||
84: 85 b9 out 0x05, r24 ; 5
|
||||
PORTB = 0b00000000;
|
||||
86: 15 b8 out 0x05, r1 ; 5
|
||||
88: fd cf rjmp .-6 ; 0x84 <main+0x4>
|
||||
|
||||
0000008a <_exit>:
|
||||
8a: f8 94 cli
|
||||
|
||||
0000008c <__stop_program>:
|
||||
8c: ff cf rjmp .-2 ; 0x8c <__stop_program>
|
BIN
resources/blinky/blink.elf
Executable file
BIN
resources/blinky/blink.elf
Executable file
Binary file not shown.
10
resources/blinky/blink.hex
Normal file
10
resources/blinky/blink.hex
Normal file
@ -0,0 +1,10 @@
|
||||
:100000000C9434000C943E000C943E000C943E0082
|
||||
:100010000C943E000C943E000C943E000C943E0068
|
||||
:100020000C943E000C943E000C943E000C943E0058
|
||||
:100030000C943E000C943E000C943E000C943E0048
|
||||
:100040000C943E000C943E000C943E000C943E0038
|
||||
:100050000C943E000C943E000C943E000C943E0028
|
||||
:100060000C943E000C943E0011241FBECFEFD8E04C
|
||||
:10007000DEBFCDBF0E9440000C9445000C940000F0
|
||||
:0E00800081E084B985B915B8FDCFF894FFCFA3
|
||||
:00000001FF
|
BIN
resources/blinky/blink.o
Normal file
BIN
resources/blinky/blink.o
Normal file
Binary file not shown.
7
resources/blinky/compile.sh
Executable file
7
resources/blinky/compile.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
avr-gcc -g -Os -mmcu=atmega328p -c blink.c
|
||||
avr-gcc -g -mmcu=atmega328p -o blink.elf blink.o
|
||||
avr-objcopy -j .text -j .data -O ihex blink.elf blink.hex
|
||||
avr-size --format=avr --mcu=atmega328p blink.elf
|
||||
objcopy --input-target=ihex --output-target=binary blink.hex blink.bin
|
||||
avr-objdump -d -S -m avr5 blink.elf > blink.dump
|
Reference in New Issue
Block a user