build
This commit is contained in:
125
Microcontrollers/opdracht 1.4/Debug/Makefile
Normal file
125
Microcontrollers/opdracht 1.4/Debug/Makefile
Normal file
@@ -0,0 +1,125 @@
|
||||
################################################################################
|
||||
# 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\ 1.4.elf
|
||||
|
||||
OUTPUT_FILE_PATH_AS_ARGS +="opdracht 1.4.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: XC8 C Compiler : 2.31
|
||||
$(QUOTE)C:\Program Files\Microchip\xc8\v2.31\bin\xc8-cc.exe$(QUOTE) -mcpu=ATmega128 -mdfp="C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\xc8" -c -x c -funsigned-char -funsigned-bitfields -mext=cci -D__ATmega128__ -DDEBUG -D__ATmega128__ -DBOARD=STK600_MEGA -I"../src/ASF/common/boards" -I"../src/ASF/mega/utils/preprocessor" -I"../src/ASF/mega/utils" -I"../src/ASF/common/utils" -I"../src" -I"../src/config" -Og -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -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: XC8 C Linker : 2.31
|
||||
$(QUOTE)C:\Program Files\Microchip\xc8\v2.31\bin\xc8-cc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -mcpu=ATmega128 -mdfp="C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\xc8" -Wl,-Map="opdracht 1.4.map" -funsigned-char -funsigned-bitfields -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -Og -ffunction-sections -fdata-sections -fpack-struct -fshort-enums --memorysummary,memoryfile.xml
|
||||
@echo Finished building target: $@
|
||||
"C:\Program Files\Microchip\xc8\v2.31\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "opdracht 1.4.elf" "opdracht 1.4.hex"
|
||||
"C:\Program Files\Microchip\xc8\v2.31\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "opdracht 1.4.elf" "opdracht 1.4.eep" || exit 0
|
||||
"C:\Program Files\Microchip\xc8\v2.31\bin\avr-objdump.exe" -h -S "opdracht 1.4.elf" > "opdracht 1.4.lss"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Other Targets
|
||||
clean:
|
||||
-$(RM) $(OBJS_AS_ARGS) $(EXECUTABLES)
|
||||
-$(RM) $(C_DEPS_AS_ARGS)
|
||||
rm -rf "opdracht 1.4.elf" "opdracht 1.4.hex" "opdracht 1.4.eep" "opdracht 1.4.map" "opdracht 1.4.usersignatures" "opdracht 1.4.a" "opdracht 1.4.lss"
|
||||
|
||||
6
Microcontrollers/opdracht 1.4/Debug/makedep.mk
Normal file
6
Microcontrollers/opdracht 1.4/Debug/makedep.mk
Normal file
@@ -0,0 +1,6 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit or delete the file
|
||||
################################################################################
|
||||
|
||||
main.c
|
||||
|
||||
17
Microcontrollers/opdracht 1.4/Debug/memoryfile.xml
Normal file
17
Microcontrollers/opdracht 1.4/Debug/memoryfile.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project>
|
||||
<executable name="opdracht 1.4.elf">
|
||||
<memory name="program">
|
||||
<units>bytes</units>
|
||||
<length>131072</length>
|
||||
<used>252</used>
|
||||
<free>130820</free>
|
||||
</memory>
|
||||
<memory name="data">
|
||||
<units>bytes</units>
|
||||
<length>4096</length>
|
||||
<used>0</used>
|
||||
<free>4096</free>
|
||||
</memory>
|
||||
</executable>
|
||||
</project>
|
||||
1
Microcontrollers/opdracht 1.4/Debug/opdracht 1.4.eep
Normal file
1
Microcontrollers/opdracht 1.4/Debug/opdracht 1.4.eep
Normal file
@@ -0,0 +1 @@
|
||||
:00000001FF
|
||||
193
Microcontrollers/opdracht 1.4/Debug/opdracht 1.4.lss
Normal file
193
Microcontrollers/opdracht 1.4/Debug/opdracht 1.4.lss
Normal file
@@ -0,0 +1,193 @@
|
||||
|
||||
opdracht 1.4.elf: file format elf32-avr
|
||||
|
||||
Sections:
|
||||
Idx Name Size VMA LMA File off Algn
|
||||
0 .data 00000000 00800100 00800100 00000150 2**0
|
||||
ALLOC, LOAD, DATA
|
||||
1 .text 000000a4 00000000 00000000 00000054 2**1
|
||||
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||
2 .comment 0000002f 00000000 00000000 00000150 2**0
|
||||
CONTENTS, READONLY
|
||||
3 .debug_aranges 00000028 00000000 00000000 0000017f 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
4 .debug_info 00000b26 00000000 00000000 000001a7 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
5 .debug_abbrev 00000830 00000000 00000000 00000ccd 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
6 .debug_line 000002ae 00000000 00000000 000014fd 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
7 .debug_frame 00000034 00000000 00000000 000017ac 2**2
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
8 .debug_str 0000027d 00000000 00000000 000017e0 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
9 .debug_loc 00000089 00000000 00000000 00001a5d 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
10 .debug_ranges 00000018 00000000 00000000 00001ae6 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
11 .text 00000004 000000f8 000000f8 0000014c 2**1
|
||||
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||
12 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00001b00 2**2
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
13 .text.wait 0000001e 000000da 000000da 0000012e 2**1
|
||||
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||
14 .text.main 00000036 000000a4 000000a4 000000f8 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 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
8: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
c: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
10: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
14: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
18: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
1c: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
20: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
24: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
28: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
2c: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
30: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
34: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
38: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
3c: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
40: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
44: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
48: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
4c: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
50: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
54: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
58: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
5c: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
60: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
64: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
68: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
6c: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
70: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
74: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
78: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
7c: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
80: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
84: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__bad_interrupt>
|
||||
88: 0c 94 7c 00 jmp 0xf8 ; 0xf8 <__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 52 00 call 0xa4 ; 0xa4 <_etext>
|
||||
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:
|
||||
|
||||
000000f8 <__bad_interrupt>:
|
||||
f8: 0c 94 00 00 jmp 0 ; 0x0 <__TEXT_REGION_ORIGIN__>
|
||||
|
||||
Disassembly of section .text.wait:
|
||||
|
||||
000000da <wait>:
|
||||
clock value is set. This is used by _delay_ms inside
|
||||
util/delay.h
|
||||
Version : DMK, Initial code
|
||||
*******************************************************************/
|
||||
{
|
||||
for (int i=0; i<ms; i++)
|
||||
da: 20 e0 ldi r18, 0x00 ; 0
|
||||
dc: 30 e0 ldi r19, 0x00 ; 0
|
||||
de: 08 c0 rjmp .+16 ; 0xf0 <wait+0x16>
|
||||
#else
|
||||
//round up by default
|
||||
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
|
||||
#endif
|
||||
|
||||
__builtin_avr_delay_cycles(__ticks_dc);
|
||||
e0: e3 ec ldi r30, 0xC3 ; 195
|
||||
e2: f9 e0 ldi r31, 0x09 ; 9
|
||||
e4: 31 97 sbiw r30, 0x01 ; 1
|
||||
e6: f1 f7 brne .-4 ; 0xe4 <wait+0xa>
|
||||
e8: 00 c0 rjmp .+0 ; 0xea <wait+0x10>
|
||||
ea: 00 00 nop
|
||||
ec: 2f 5f subi r18, 0xFF ; 255
|
||||
ee: 3f 4f sbci r19, 0xFF ; 255
|
||||
f0: 28 17 cp r18, r24
|
||||
f2: 39 07 cpc r19, r25
|
||||
f4: ac f3 brlt .-22 ; 0xe0 <wait+0x6>
|
||||
{
|
||||
_delay_ms( 1 ); // library function (max 30 ms at 8MHz)
|
||||
}
|
||||
}
|
||||
f6: 08 95 ret
|
||||
|
||||
Disassembly of section .text.main:
|
||||
|
||||
000000a4 <main>:
|
||||
|
||||
int main(void)
|
||||
{
|
||||
bool dir = false;
|
||||
DDRD = 0b11111111;
|
||||
a4: 8f ef ldi r24, 0xFF ; 255
|
||||
a6: 81 bb out 0x11, r24 ; 17
|
||||
PORTD = 0b00000001;
|
||||
a8: 81 e0 ldi r24, 0x01 ; 1
|
||||
aa: 82 bb out 0x12, r24 ; 18
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
bool dir = false;
|
||||
ac: c0 e0 ldi r28, 0x00 ; 0
|
||||
DDRD = 0b11111111;
|
||||
PORTD = 0b00000001;
|
||||
|
||||
while(1)
|
||||
{
|
||||
if(PORTD == 0b10000000){
|
||||
ae: 82 b3 in r24, 0x12 ; 18
|
||||
b0: 80 38 cpi r24, 0x80 ; 128
|
||||
b2: 09 f4 brne .+2 ; 0xb6 <main+0x12>
|
||||
dir = true;
|
||||
b4: c1 e0 ldi r28, 0x01 ; 1
|
||||
}
|
||||
|
||||
if(PORTD == 0b00000001){
|
||||
b6: 82 b3 in r24, 0x12 ; 18
|
||||
b8: 81 30 cpi r24, 0x01 ; 1
|
||||
ba: 09 f4 brne .+2 ; 0xbe <main+0x1a>
|
||||
dir = false;
|
||||
bc: c0 e0 ldi r28, 0x00 ; 0
|
||||
}
|
||||
|
||||
if(!dir){
|
||||
be: c1 11 cpse r28, r1
|
||||
c0: 04 c0 rjmp .+8 ; 0xca <main+0x26>
|
||||
PORTD <<= 1;
|
||||
c2: 82 b3 in r24, 0x12 ; 18
|
||||
c4: 88 0f add r24, r24
|
||||
c6: 82 bb out 0x12, r24 ; 18
|
||||
c8: 03 c0 rjmp .+6 ; 0xd0 <main+0x2c>
|
||||
} else {
|
||||
PORTD >>= 1;
|
||||
ca: 82 b3 in r24, 0x12 ; 18
|
||||
cc: 86 95 lsr r24
|
||||
ce: 82 bb out 0x12, r24 ; 18
|
||||
}
|
||||
|
||||
wait(80);
|
||||
d0: 80 e5 ldi r24, 0x50 ; 80
|
||||
d2: 90 e0 ldi r25, 0x00 ; 0
|
||||
d4: 0e 94 6d 00 call 0xda ; 0xda <wait>
|
||||
}
|
||||
d8: ea cf rjmp .-44 ; 0xae <main+0xa>
|
||||
Reference in New Issue
Block a user