parent
a961e8cdd4
commit
88348b77a6
Binary file not shown.
@ -0,0 +1,163 @@
|
||||
################################################################################
|
||||
# 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 += \
|
||||
../cmdp.c \
|
||||
../entryf.c \
|
||||
../hal_usart.c \
|
||||
../main.c
|
||||
|
||||
|
||||
PREPROCESSING_SRCS +=
|
||||
|
||||
|
||||
ASM_SRCS +=
|
||||
|
||||
|
||||
OBJS += \
|
||||
cmdp.o \
|
||||
entryf.o \
|
||||
hal_usart.o \
|
||||
main.o
|
||||
|
||||
OBJS_AS_ARGS += \
|
||||
cmdp.o \
|
||||
entryf.o \
|
||||
hal_usart.o \
|
||||
main.o
|
||||
|
||||
C_DEPS += \
|
||||
cmdp.d \
|
||||
entryf.d \
|
||||
hal_usart.d \
|
||||
main.d
|
||||
|
||||
C_DEPS_AS_ARGS += \
|
||||
cmdp.d \
|
||||
entryf.d \
|
||||
hal_usart.d \
|
||||
main.d
|
||||
|
||||
OUTPUT_FILE_PATH +=comand_parser.elf
|
||||
|
||||
OUTPUT_FILE_PATH_AS_ARGS +=comand_parser.elf
|
||||
|
||||
ADDITIONAL_DEPENDENCIES:=
|
||||
|
||||
OUTPUT_FILE_DEP:= ./makedep.mk
|
||||
|
||||
LIB_DEP+=
|
||||
|
||||
LINKER_SCRIPT_DEP+=
|
||||
|
||||
|
||||
# AVR32/GNU C Compiler
|
||||
./cmdp.o: .././cmdp.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.2.209\include" -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega328p -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\gcc\dev\atmega328p" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
|
||||
@echo Finished building: $<
|
||||
|
||||
|
||||
./entryf.o: .././entryf.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.2.209\include" -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega328p -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\gcc\dev\atmega328p" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
|
||||
@echo Finished building: $<
|
||||
|
||||
|
||||
./hal_usart.o: .././hal_usart.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.2.209\include" -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega328p -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\gcc\dev\atmega328p" -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
|
||||
$(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.2.209\include" -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega328p -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\gcc\dev\atmega328p" -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="comand_parser.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega328p -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\gcc\dev\atmega328p"
|
||||
@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 "comand_parser.elf" "comand_parser.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 "comand_parser.elf" "comand_parser.eep" || exit 0
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "comand_parser.elf" > "comand_parser.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 "comand_parser.elf" "comand_parser.srec"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-size.exe" "comand_parser.elf"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Other Targets
|
||||
clean:
|
||||
-$(RM) $(OBJS_AS_ARGS) $(EXECUTABLES)
|
||||
-$(RM) $(C_DEPS_AS_ARGS)
|
||||
rm -rf "comand_parser.elf" "comand_parser.a" "comand_parser.hex" "comand_parser.lss" "comand_parser.eep" "comand_parser.map" "comand_parser.srec" "comand_parser.usersignatures"
|
||||
|
@ -0,0 +1,17 @@
|
||||
cmdp.d cmdp.o: .././cmdp.c .././cmdp.h .././entryf.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\string.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h
|
||||
|
||||
.././cmdp.h:
|
||||
|
||||
.././entryf.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\string.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h:
|
@ -0,0 +1 @@
|
||||
:00000001FF
|
Binary file not shown.
@ -0,0 +1,66 @@
|
||||
:100000000C9434000C9451000C9451000C94510049
|
||||
:100010000C9451000C9451000C9451000C9451001C
|
||||
:100020000C9451000C9451000C9451000C9451000C
|
||||
:100030000C9451000C9451000C9451000C945100FC
|
||||
:100040000C9451000C9451000C94CA000C94F100D3
|
||||
:100050000C9418010C9451000C9451000C94510014
|
||||
:100060000C9451000C94510011241FBECFEFD8E026
|
||||
:10007000DEBFCDBF11E0A0E0B1E0ECEDF3E002C0E7
|
||||
:1000800005900D92AA32B107D9F721E0AAE2B1E0BA
|
||||
:1000900001C01D92A039B207E1F70E94A9010C949A
|
||||
:1000A000EC010C940000259A2D98089595B180E2FA
|
||||
:1000B000892785B908952D9A08952D980895089552
|
||||
:1000C0008091C6000895E1ECF0E08081806180833A
|
||||
:1000D0000895E1ECF0E08081886080830895E1EC90
|
||||
:1000E000F0E090819B7F9083E2ECF0E09081997F3B
|
||||
:1000F000908390818370880F982B90830895DC0102
|
||||
:10010000CB01880F991FAA1FBB1F880F991FAA1F19
|
||||
:10011000BB1F9C01AD01220F331F441F551F220F2F
|
||||
:10012000331F441F551F60E074E284EF90E00E948B
|
||||
:10013000C1018FEF820F8093C400DA01C9010197DA
|
||||
:10014000A109B109892F9A2FAB2FBB278093C50036
|
||||
:1001500008959093050180930401E1ECF0E0808123
|
||||
:10016000806880830895E0ECF0E0908195FFFDCFFA
|
||||
:100170008093C6000895CF93DF93EC018881882394
|
||||
:1001800031F021960E94B30089918111FBCFDF915C
|
||||
:10019000CF9108951F920F920FB60F9211242F93B3
|
||||
:1001A0003F934F935F936F937F938F939F93AF93FF
|
||||
:1001B000BF93EF93FF93E0910401F091050109953E
|
||||
:1001C000FF91EF91BF91AF919F918F917F916F912F
|
||||
:1001D0005F914F913F912F910F900FBE0F901F9005
|
||||
:1001E00018951F920F920FB60F9211242F933F93E1
|
||||
:1001F0004F935F936F937F938F939F93AF93BF932F
|
||||
:10020000EF93FF93E0910201F09103010995FF91B3
|
||||
:10021000EF91BF91AF919F918F917F916F915F917E
|
||||
:100220004F913F912F910F900FBE0F901F901895F7
|
||||
:100230001F920F920FB60F9211242F933F934F935B
|
||||
:100240005F936F937F938F939F93AF93BF93EF933E
|
||||
:10025000FF93E0910001F09101010995FF91EF9169
|
||||
:10026000BF91AF919F918F917F916F915F914F91CE
|
||||
:100270003F912F910F900FBE0F901F9018950E94E5
|
||||
:10028000600090912A01911127C08D3051F4E091C6
|
||||
:100290002B01F0E0E45DFE4F108281E080932A01A3
|
||||
:1002A00008958830A9F4E0912B01EE2331F0E1505C
|
||||
:1002B000E0932B010E94B300089591E09E0F90936C
|
||||
:1002C0002B01F0E0E45DFE4F80830E94B3000895AF
|
||||
:1002D000E0912B01E33688F30895EF92FF920F939C
|
||||
:1002E0001F93CF93DF9380912A01882359F106E071
|
||||
:1002F00011E0C0E0D0E06CE271E0F8018081918112
|
||||
:100300000E94E301892B81F4FE01EE0FFF1FEE0F27
|
||||
:10031000FF1FEA5FFE4F0280F381E02D09951092E6
|
||||
:100320002B0110922A010EC021960C5F1F4FC33083
|
||||
:10033000D10509F782E191E00E94BB0010922B01E8
|
||||
:1003400010922A01DF91CF911F910F91FF90EF90B2
|
||||
:1003500008950E945300F8940E9463000E9469006F
|
||||
:1003600083E00E946F0060E875E280E090E00E9408
|
||||
:100370007F008FE391E00E94A90078940E946D01B4
|
||||
:10038000FDCFA1E21A2EAA1BBB1BFD010DC0AA1FA7
|
||||
:10039000BB1FEE1FFF1FA217B307E407F50720F0EE
|
||||
:1003A000A21BB30BE40BF50B661F771F881F991F69
|
||||
:1003B0001A9469F760957095809590959B01AC01B2
|
||||
:1003C000BD01CF010895FB01DC018D9101908019E1
|
||||
:0C03D0000110D9F3990B0895F894FFCFA9
|
||||
:1003DC005F005F005F0018015B001E015D002401DF
|
||||
:1003EC0056006E6D660A0D006C65642031006C65FC
|
||||
:0A03FC00642030006C65642074007A
|
||||
:00000001FF
|
@ -0,0 +1,684 @@
|
||||
|
||||
comand_parser.elf: file format elf32-avr
|
||||
|
||||
Sections:
|
||||
Idx Name Size VMA LMA File off Algn
|
||||
0 .data 0000002a 00800100 000003dc 00000470 2**0
|
||||
CONTENTS, ALLOC, LOAD, DATA
|
||||
1 .text 000003dc 00000000 00000000 00000094 2**1
|
||||
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||
2 .bss 00000066 0080012a 0080012a 0000049a 2**0
|
||||
ALLOC
|
||||
3 .comment 00000030 00000000 00000000 0000049a 2**0
|
||||
CONTENTS, READONLY
|
||||
4 .note.gnu.avr.deviceinfo 00000040 00000000 00000000 000004cc 2**2
|
||||
CONTENTS, READONLY
|
||||
5 .debug_aranges 00000198 00000000 00000000 0000050c 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
6 .debug_info 00000fa7 00000000 00000000 000006a4 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
7 .debug_abbrev 000008a7 00000000 00000000 0000164b 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
8 .debug_line 00000889 00000000 00000000 00001ef2 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
9 .debug_frame 000003e0 00000000 00000000 0000277c 2**2
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
10 .debug_str 000008f8 00000000 00000000 00002b5c 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
11 .debug_loc 000004aa 00000000 00000000 00003454 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
12 .debug_ranges 00000168 00000000 00000000 000038fe 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <__vectors>:
|
||||
0: 0c 94 34 00 jmp 0x68 ; 0x68 <__ctors_end>
|
||||
4: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
8: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
c: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
10: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
14: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
18: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
1c: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
20: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
24: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
28: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
2c: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
30: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
34: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
38: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
3c: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
40: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
44: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
48: 0c 94 ca 00 jmp 0x194 ; 0x194 <__vector_18>
|
||||
4c: 0c 94 f1 00 jmp 0x1e2 ; 0x1e2 <__vector_19>
|
||||
50: 0c 94 18 01 jmp 0x230 ; 0x230 <__vector_20>
|
||||
54: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
58: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
5c: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
60: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__bad_interrupt>
|
||||
64: 0c 94 51 00 jmp 0xa2 ; 0xa2 <__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
|
||||
|
||||
00000074 <__do_copy_data>:
|
||||
74: 11 e0 ldi r17, 0x01 ; 1
|
||||
76: a0 e0 ldi r26, 0x00 ; 0
|
||||
78: b1 e0 ldi r27, 0x01 ; 1
|
||||
7a: ec ed ldi r30, 0xDC ; 220
|
||||
7c: f3 e0 ldi r31, 0x03 ; 3
|
||||
7e: 02 c0 rjmp .+4 ; 0x84 <__do_copy_data+0x10>
|
||||
80: 05 90 lpm r0, Z+
|
||||
82: 0d 92 st X+, r0
|
||||
84: aa 32 cpi r26, 0x2A ; 42
|
||||
86: b1 07 cpc r27, r17
|
||||
88: d9 f7 brne .-10 ; 0x80 <__do_copy_data+0xc>
|
||||
|
||||
0000008a <__do_clear_bss>:
|
||||
8a: 21 e0 ldi r18, 0x01 ; 1
|
||||
8c: aa e2 ldi r26, 0x2A ; 42
|
||||
8e: b1 e0 ldi r27, 0x01 ; 1
|
||||
90: 01 c0 rjmp .+2 ; 0x94 <.do_clear_bss_start>
|
||||
|
||||
00000092 <.do_clear_bss_loop>:
|
||||
92: 1d 92 st X+, r1
|
||||
|
||||
00000094 <.do_clear_bss_start>:
|
||||
94: a0 39 cpi r26, 0x90 ; 144
|
||||
96: b2 07 cpc r27, r18
|
||||
98: e1 f7 brne .-8 ; 0x92 <.do_clear_bss_loop>
|
||||
9a: 0e 94 a9 01 call 0x352 ; 0x352 <main>
|
||||
9e: 0c 94 ec 01 jmp 0x3d8 ; 0x3d8 <_exit>
|
||||
|
||||
000000a2 <__bad_interrupt>:
|
||||
a2: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
|
||||
|
||||
000000a6 <ledInit>:
|
||||
#include "entryf.h"
|
||||
#include <avr/io.h>
|
||||
|
||||
void ledInit()
|
||||
{
|
||||
DDRB |= (1 << PINB5);
|
||||
a6: 25 9a sbi 0x04, 5 ; 4
|
||||
PORTB &= ~(1 << PINB5);
|
||||
a8: 2d 98 cbi 0x05, 5 ; 5
|
||||
aa: 08 95 ret
|
||||
|
||||
000000ac <toggleLed>:
|
||||
}
|
||||
|
||||
void toggleLed()
|
||||
{
|
||||
PORTB ^= (1 << PINB5);
|
||||
ac: 95 b1 in r25, 0x05 ; 5
|
||||
ae: 80 e2 ldi r24, 0x20 ; 32
|
||||
b0: 89 27 eor r24, r25
|
||||
b2: 85 b9 out 0x05, r24 ; 5
|
||||
b4: 08 95 ret
|
||||
|
||||
000000b6 <turnOnLed>:
|
||||
}
|
||||
|
||||
void turnOnLed()
|
||||
{
|
||||
PORTB |= (1 << PINB5);
|
||||
b6: 2d 9a sbi 0x05, 5 ; 5
|
||||
b8: 08 95 ret
|
||||
|
||||
000000ba <turnOffLed>:
|
||||
}
|
||||
|
||||
void turnOffLed()
|
||||
{
|
||||
PORTB &= ~(1 << PINB5);
|
||||
ba: 2d 98 cbi 0x05, 5 ; 5
|
||||
bc: 08 95 ret
|
||||
|
||||
000000be <dummy>:
|
||||
}
|
||||
|
||||
void hal_USART_unregisterTXCallback()
|
||||
{
|
||||
UCSR0B &= ~(1 << TXCIE0);
|
||||
txCallback = dummy;
|
||||
be: 08 95 ret
|
||||
|
||||
000000c0 <hal_USART_readDataReg>:
|
||||
c0: 80 91 c6 00 lds r24, 0x00C6 ; 0x8000c6 <__TEXT_REGION_LENGTH__+0x7e00c6>
|
||||
c4: 08 95 ret
|
||||
|
||||
000000c6 <hal_USART_RxEnable>:
|
||||
c6: e1 ec ldi r30, 0xC1 ; 193
|
||||
c8: f0 e0 ldi r31, 0x00 ; 0
|
||||
ca: 80 81 ld r24, Z
|
||||
cc: 80 61 ori r24, 0x10 ; 16
|
||||
ce: 80 83 st Z, r24
|
||||
d0: 08 95 ret
|
||||
|
||||
000000d2 <hal_USART_TxEnable>:
|
||||
d2: e1 ec ldi r30, 0xC1 ; 193
|
||||
d4: f0 e0 ldi r31, 0x00 ; 0
|
||||
d6: 80 81 ld r24, Z
|
||||
d8: 88 60 ori r24, 0x08 ; 8
|
||||
da: 80 83 st Z, r24
|
||||
dc: 08 95 ret
|
||||
|
||||
000000de <hal_USART_setCharSize>:
|
||||
de: e1 ec ldi r30, 0xC1 ; 193
|
||||
e0: f0 e0 ldi r31, 0x00 ; 0
|
||||
e2: 90 81 ld r25, Z
|
||||
e4: 9b 7f andi r25, 0xFB ; 251
|
||||
e6: 90 83 st Z, r25
|
||||
e8: e2 ec ldi r30, 0xC2 ; 194
|
||||
ea: f0 e0 ldi r31, 0x00 ; 0
|
||||
ec: 90 81 ld r25, Z
|
||||
ee: 99 7f andi r25, 0xF9 ; 249
|
||||
f0: 90 83 st Z, r25
|
||||
f2: 90 81 ld r25, Z
|
||||
f4: 83 70 andi r24, 0x03 ; 3
|
||||
f6: 88 0f add r24, r24
|
||||
f8: 98 2b or r25, r24
|
||||
fa: 90 83 st Z, r25
|
||||
fc: 08 95 ret
|
||||
|
||||
000000fe <hal_USART_setBaudRate>:
|
||||
fe: dc 01 movw r26, r24
|
||||
100: cb 01 movw r24, r22
|
||||
102: 88 0f add r24, r24
|
||||
104: 99 1f adc r25, r25
|
||||
106: aa 1f adc r26, r26
|
||||
108: bb 1f adc r27, r27
|
||||
10a: 88 0f add r24, r24
|
||||
10c: 99 1f adc r25, r25
|
||||
10e: aa 1f adc r26, r26
|
||||
110: bb 1f adc r27, r27
|
||||
112: 9c 01 movw r18, r24
|
||||
114: ad 01 movw r20, r26
|
||||
116: 22 0f add r18, r18
|
||||
118: 33 1f adc r19, r19
|
||||
11a: 44 1f adc r20, r20
|
||||
11c: 55 1f adc r21, r21
|
||||
11e: 22 0f add r18, r18
|
||||
120: 33 1f adc r19, r19
|
||||
122: 44 1f adc r20, r20
|
||||
124: 55 1f adc r21, r21
|
||||
126: 60 e0 ldi r22, 0x00 ; 0
|
||||
128: 74 e2 ldi r23, 0x24 ; 36
|
||||
12a: 84 ef ldi r24, 0xF4 ; 244
|
||||
12c: 90 e0 ldi r25, 0x00 ; 0
|
||||
12e: 0e 94 c1 01 call 0x382 ; 0x382 <__udivmodsi4>
|
||||
132: 8f ef ldi r24, 0xFF ; 255
|
||||
134: 82 0f add r24, r18
|
||||
136: 80 93 c4 00 sts 0x00C4, r24 ; 0x8000c4 <__TEXT_REGION_LENGTH__+0x7e00c4>
|
||||
13a: da 01 movw r26, r20
|
||||
13c: c9 01 movw r24, r18
|
||||
13e: 01 97 sbiw r24, 0x01 ; 1
|
||||
140: a1 09 sbc r26, r1
|
||||
142: b1 09 sbc r27, r1
|
||||
144: 89 2f mov r24, r25
|
||||
146: 9a 2f mov r25, r26
|
||||
148: ab 2f mov r26, r27
|
||||
14a: bb 27 eor r27, r27
|
||||
14c: 80 93 c5 00 sts 0x00C5, r24 ; 0x8000c5 <__TEXT_REGION_LENGTH__+0x7e00c5>
|
||||
150: 08 95 ret
|
||||
|
||||
00000152 <hal_USART_registerRxCallback>:
|
||||
152: 90 93 05 01 sts 0x0105, r25 ; 0x800105 <rxCallback+0x1>
|
||||
156: 80 93 04 01 sts 0x0104, r24 ; 0x800104 <rxCallback>
|
||||
15a: e1 ec ldi r30, 0xC1 ; 193
|
||||
15c: f0 e0 ldi r31, 0x00 ; 0
|
||||
15e: 80 81 ld r24, Z
|
||||
160: 80 68 ori r24, 0x80 ; 128
|
||||
162: 80 83 st Z, r24
|
||||
164: 08 95 ret
|
||||
|
||||
00000166 <hal_USART_putc>:
|
||||
|
||||
void hal_USART_putc(const char send)
|
||||
{
|
||||
// Do nothing for a bit if there is already
|
||||
// data waiting in the hardware to be sent
|
||||
while ((UCSR0A & (1 << UDRE0)) == 0);
|
||||
166: e0 ec ldi r30, 0xC0 ; 192
|
||||
168: f0 e0 ldi r31, 0x00 ; 0
|
||||
16a: 90 81 ld r25, Z
|
||||
16c: 95 ff sbrs r25, 5
|
||||
16e: fd cf rjmp .-6 ; 0x16a <hal_USART_putc+0x4>
|
||||
UDR0 = send;
|
||||
170: 80 93 c6 00 sts 0x00C6, r24 ; 0x8000c6 <__TEXT_REGION_LENGTH__+0x7e00c6>
|
||||
174: 08 95 ret
|
||||
|
||||
00000176 <hal_USART_puts>:
|
||||
}
|
||||
|
||||
void hal_USART_puts(const char *send)
|
||||
{
|
||||
176: cf 93 push r28
|
||||
178: df 93 push r29
|
||||
17a: ec 01 movw r28, r24
|
||||
// Cycle through each character individually
|
||||
while (*send != '\0')
|
||||
17c: 88 81 ld r24, Y
|
||||
17e: 88 23 and r24, r24
|
||||
180: 31 f0 breq .+12 ; 0x18e <hal_USART_puts+0x18>
|
||||
182: 21 96 adiw r28, 0x01 ; 1
|
||||
{
|
||||
hal_USART_putc(*send++);
|
||||
184: 0e 94 b3 00 call 0x166 ; 0x166 <hal_USART_putc>
|
||||
}
|
||||
|
||||
void hal_USART_puts(const char *send)
|
||||
{
|
||||
// Cycle through each character individually
|
||||
while (*send != '\0')
|
||||
188: 89 91 ld r24, Y+
|
||||
18a: 81 11 cpse r24, r1
|
||||
18c: fb cf rjmp .-10 ; 0x184 <hal_USART_puts+0xe>
|
||||
{
|
||||
hal_USART_putc(*send++);
|
||||
}
|
||||
}
|
||||
18e: df 91 pop r29
|
||||
190: cf 91 pop r28
|
||||
192: 08 95 ret
|
||||
|
||||
00000194 <__vector_18>:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ISR (USART_RX_vect)
|
||||
{
|
||||
194: 1f 92 push r1
|
||||
196: 0f 92 push r0
|
||||
198: 0f b6 in r0, 0x3f ; 63
|
||||
19a: 0f 92 push r0
|
||||
19c: 11 24 eor r1, r1
|
||||
19e: 2f 93 push r18
|
||||
1a0: 3f 93 push r19
|
||||
1a2: 4f 93 push r20
|
||||
1a4: 5f 93 push r21
|
||||
1a6: 6f 93 push r22
|
||||
1a8: 7f 93 push r23
|
||||
1aa: 8f 93 push r24
|
||||
1ac: 9f 93 push r25
|
||||
1ae: af 93 push r26
|
||||
1b0: bf 93 push r27
|
||||
1b2: ef 93 push r30
|
||||
1b4: ff 93 push r31
|
||||
rxCallback();
|
||||
1b6: e0 91 04 01 lds r30, 0x0104 ; 0x800104 <rxCallback>
|
||||
1ba: f0 91 05 01 lds r31, 0x0105 ; 0x800105 <rxCallback+0x1>
|
||||
1be: 09 95 icall
|
||||
}
|
||||
1c0: ff 91 pop r31
|
||||
1c2: ef 91 pop r30
|
||||
1c4: bf 91 pop r27
|
||||
1c6: af 91 pop r26
|
||||
1c8: 9f 91 pop r25
|
||||
1ca: 8f 91 pop r24
|
||||
1cc: 7f 91 pop r23
|
||||
1ce: 6f 91 pop r22
|
||||
1d0: 5f 91 pop r21
|
||||
1d2: 4f 91 pop r20
|
||||
1d4: 3f 91 pop r19
|
||||
1d6: 2f 91 pop r18
|
||||
1d8: 0f 90 pop r0
|
||||
1da: 0f be out 0x3f, r0 ; 63
|
||||
1dc: 0f 90 pop r0
|
||||
1de: 1f 90 pop r1
|
||||
1e0: 18 95 reti
|
||||
|
||||
000001e2 <__vector_19>:
|
||||
|
||||
ISR(USART_UDRE_vect)
|
||||
{
|
||||
1e2: 1f 92 push r1
|
||||
1e4: 0f 92 push r0
|
||||
1e6: 0f b6 in r0, 0x3f ; 63
|
||||
1e8: 0f 92 push r0
|
||||
1ea: 11 24 eor r1, r1
|
||||
1ec: 2f 93 push r18
|
||||
1ee: 3f 93 push r19
|
||||
1f0: 4f 93 push r20
|
||||
1f2: 5f 93 push r21
|
||||
1f4: 6f 93 push r22
|
||||
1f6: 7f 93 push r23
|
||||
1f8: 8f 93 push r24
|
||||
1fa: 9f 93 push r25
|
||||
1fc: af 93 push r26
|
||||
1fe: bf 93 push r27
|
||||
200: ef 93 push r30
|
||||
202: ff 93 push r31
|
||||
dataRegEmptyCallback();
|
||||
204: e0 91 02 01 lds r30, 0x0102 ; 0x800102 <dataRegEmptyCallback>
|
||||
208: f0 91 03 01 lds r31, 0x0103 ; 0x800103 <dataRegEmptyCallback+0x1>
|
||||
20c: 09 95 icall
|
||||
}
|
||||
20e: ff 91 pop r31
|
||||
210: ef 91 pop r30
|
||||
212: bf 91 pop r27
|
||||
214: af 91 pop r26
|
||||
216: 9f 91 pop r25
|
||||
218: 8f 91 pop r24
|
||||
21a: 7f 91 pop r23
|
||||
21c: 6f 91 pop r22
|
||||
21e: 5f 91 pop r21
|
||||
220: 4f 91 pop r20
|
||||
222: 3f 91 pop r19
|
||||
224: 2f 91 pop r18
|
||||
226: 0f 90 pop r0
|
||||
228: 0f be out 0x3f, r0 ; 63
|
||||
22a: 0f 90 pop r0
|
||||
22c: 1f 90 pop r1
|
||||
22e: 18 95 reti
|
||||
|
||||
00000230 <__vector_20>:
|
||||
|
||||
ISR(USART_TX_vect)
|
||||
{
|
||||
230: 1f 92 push r1
|
||||
232: 0f 92 push r0
|
||||
234: 0f b6 in r0, 0x3f ; 63
|
||||
236: 0f 92 push r0
|
||||
238: 11 24 eor r1, r1
|
||||
23a: 2f 93 push r18
|
||||
23c: 3f 93 push r19
|
||||
23e: 4f 93 push r20
|
||||
240: 5f 93 push r21
|
||||
242: 6f 93 push r22
|
||||
244: 7f 93 push r23
|
||||
246: 8f 93 push r24
|
||||
248: 9f 93 push r25
|
||||
24a: af 93 push r26
|
||||
24c: bf 93 push r27
|
||||
24e: ef 93 push r30
|
||||
250: ff 93 push r31
|
||||
txCallback();
|
||||
252: e0 91 00 01 lds r30, 0x0100 ; 0x800100 <__data_start>
|
||||
256: f0 91 01 01 lds r31, 0x0101 ; 0x800101 <__data_start+0x1>
|
||||
25a: 09 95 icall
|
||||
25c: ff 91 pop r31
|
||||
25e: ef 91 pop r30
|
||||
260: bf 91 pop r27
|
||||
262: af 91 pop r26
|
||||
264: 9f 91 pop r25
|
||||
266: 8f 91 pop r24
|
||||
268: 7f 91 pop r23
|
||||
26a: 6f 91 pop r22
|
||||
26c: 5f 91 pop r21
|
||||
26e: 4f 91 pop r20
|
||||
270: 3f 91 pop r19
|
||||
272: 2f 91 pop r18
|
||||
274: 0f 90 pop r0
|
||||
276: 0f be out 0x3f, r0 ; 63
|
||||
278: 0f 90 pop r0
|
||||
27a: 1f 90 pop r1
|
||||
27c: 18 95 reti
|
||||
|
||||
0000027e <rxCallback>:
|
||||
{"led t", toggleLed}};
|
||||
|
||||
|
||||
void rxCallback()
|
||||
{
|
||||
char input = hal_USART_readDataReg();
|
||||
27e: 0e 94 60 00 call 0xc0 ; 0xc0 <hal_USART_readDataReg>
|
||||
|
||||
if(parse_FLG) return;
|
||||
282: 90 91 2a 01 lds r25, 0x012A ; 0x80012a <__data_end>
|
||||
286: 91 11 cpse r25, r1
|
||||
288: 27 c0 rjmp .+78 ; 0x2d8 <rxCallback+0x5a>
|
||||
|
||||
// if(input == )
|
||||
|
||||
// enter
|
||||
if(input == 13 ){
|
||||
28a: 8d 30 cpi r24, 0x0D ; 13
|
||||
28c: 51 f4 brne .+20 ; 0x2a2 <rxCallback+0x24>
|
||||
rx_buff[rx_buff_index] = '\0';
|
||||
28e: e0 91 2b 01 lds r30, 0x012B ; 0x80012b <rx_buff_index>
|
||||
292: f0 e0 ldi r31, 0x00 ; 0
|
||||
294: e4 5d subi r30, 0xD4 ; 212
|
||||
296: fe 4f sbci r31, 0xFE ; 254
|
||||
298: 10 82 st Z, r1
|
||||
parse_FLG = 1;
|
||||
29a: 81 e0 ldi r24, 0x01 ; 1
|
||||
29c: 80 93 2a 01 sts 0x012A, r24 ; 0x80012a <__data_end>
|
||||
return;
|
||||
2a0: 08 95 ret
|
||||
}
|
||||
|
||||
// backspace
|
||||
if(input == 8 && rx_buff_index > 0){
|
||||
2a2: 88 30 cpi r24, 0x08 ; 8
|
||||
2a4: a9 f4 brne .+42 ; 0x2d0 <rxCallback+0x52>
|
||||
2a6: e0 91 2b 01 lds r30, 0x012B ; 0x80012b <rx_buff_index>
|
||||
2aa: ee 23 and r30, r30
|
||||
2ac: 31 f0 breq .+12 ; 0x2ba <rxCallback+0x3c>
|
||||
rx_buff_index--;
|
||||
2ae: e1 50 subi r30, 0x01 ; 1
|
||||
2b0: e0 93 2b 01 sts 0x012B, r30 ; 0x80012b <rx_buff_index>
|
||||
hal_USART_putc(input);
|
||||
2b4: 0e 94 b3 00 call 0x166 ; 0x166 <hal_USART_putc>
|
||||
return;
|
||||
2b8: 08 95 ret
|
||||
}
|
||||
|
||||
if(rx_buff_index < (RX_BUFF_SIZE - 1) && !parse_FLG){
|
||||
rx_buff[rx_buff_index++] = input;
|
||||
2ba: 91 e0 ldi r25, 0x01 ; 1
|
||||
2bc: 9e 0f add r25, r30
|
||||
2be: 90 93 2b 01 sts 0x012B, r25 ; 0x80012b <rx_buff_index>
|
||||
2c2: f0 e0 ldi r31, 0x00 ; 0
|
||||
2c4: e4 5d subi r30, 0xD4 ; 212
|
||||
2c6: fe 4f sbci r31, 0xFE ; 254
|
||||
2c8: 80 83 st Z, r24
|
||||
hal_USART_putc(input);
|
||||
2ca: 0e 94 b3 00 call 0x166 ; 0x166 <hal_USART_putc>
|
||||
2ce: 08 95 ret
|
||||
rx_buff_index--;
|
||||
hal_USART_putc(input);
|
||||
return;
|
||||
}
|
||||
|
||||
if(rx_buff_index < (RX_BUFF_SIZE - 1) && !parse_FLG){
|
||||
2d0: e0 91 2b 01 lds r30, 0x012B ; 0x80012b <rx_buff_index>
|
||||
2d4: e3 36 cpi r30, 0x63 ; 99
|
||||
2d6: 88 f3 brcs .-30 ; 0x2ba <rxCallback+0x3c>
|
||||
2d8: 08 95 ret
|
||||
|
||||
000002da <parser>:
|
||||
hal_USART_putc(input);
|
||||
}
|
||||
}
|
||||
|
||||
void parser()
|
||||
{
|
||||
2da: ef 92 push r14
|
||||
2dc: ff 92 push r15
|
||||
2de: 0f 93 push r16
|
||||
2e0: 1f 93 push r17
|
||||
2e2: cf 93 push r28
|
||||
2e4: df 93 push r29
|
||||
uint8_t i = 0;
|
||||
if(!parse_FLG) return;
|
||||
2e6: 80 91 2a 01 lds r24, 0x012A ; 0x80012a <__data_end>
|
||||
2ea: 88 23 and r24, r24
|
||||
2ec: 59 f1 breq .+86 ; 0x344 <parser+0x6a>
|
||||
2ee: 06 e0 ldi r16, 0x06 ; 6
|
||||
2f0: 11 e0 ldi r17, 0x01 ; 1
|
||||
2f2: c0 e0 ldi r28, 0x00 ; 0
|
||||
2f4: d0 e0 ldi r29, 0x00 ; 0
|
||||
for(i = 0; i < ENTRY_LIST_SIZE && parse_FLG; i++) {
|
||||
//if(strncmp(entryList[i].name,rx_buff,rx_buff_index) == 0){
|
||||
if(strcmp(entryList[i].name,rx_buff) == 0){
|
||||
2f6: 6c e2 ldi r22, 0x2C ; 44
|
||||
2f8: 71 e0 ldi r23, 0x01 ; 1
|
||||
2fa: f8 01 movw r30, r16
|
||||
2fc: 80 81 ld r24, Z
|
||||
2fe: 91 81 ldd r25, Z+1 ; 0x01
|
||||
300: 0e 94 e3 01 call 0x3c6 ; 0x3c6 <strcmp>
|
||||
304: 89 2b or r24, r25
|
||||
306: 81 f4 brne .+32 ; 0x328 <parser+0x4e>
|
||||
entryList[i].callback();
|
||||
308: fe 01 movw r30, r28
|
||||
30a: ee 0f add r30, r30
|
||||
30c: ff 1f adc r31, r31
|
||||
30e: ee 0f add r30, r30
|
||||
310: ff 1f adc r31, r31
|
||||
312: ea 5f subi r30, 0xFA ; 250
|
||||
314: fe 4f sbci r31, 0xFE ; 254
|
||||
316: 02 80 ldd r0, Z+2 ; 0x02
|
||||
318: f3 81 ldd r31, Z+3 ; 0x03
|
||||
31a: e0 2d mov r30, r0
|
||||
31c: 09 95 icall
|
||||
rx_buff_index = 0;
|
||||
31e: 10 92 2b 01 sts 0x012B, r1 ; 0x80012b <rx_buff_index>
|
||||
parse_FLG = 0;
|
||||
322: 10 92 2a 01 sts 0x012A, r1 ; 0x80012a <__data_end>
|
||||
|
||||
#if HUMAN_READABLE
|
||||
hal_USART_puts("\n\r>>");
|
||||
#endif
|
||||
|
||||
return;
|
||||
326: 0e c0 rjmp .+28 ; 0x344 <parser+0x6a>
|
||||
328: 21 96 adiw r28, 0x01 ; 1
|
||||
32a: 0c 5f subi r16, 0xFC ; 252
|
||||
32c: 1f 4f sbci r17, 0xFF ; 255
|
||||
|
||||
void parser()
|
||||
{
|
||||
uint8_t i = 0;
|
||||
if(!parse_FLG) return;
|
||||
for(i = 0; i < ENTRY_LIST_SIZE && parse_FLG; i++) {
|
||||
32e: c3 30 cpi r28, 0x03 ; 3
|
||||
330: d1 05 cpc r29, r1
|
||||
332: 09 f7 brne .-62 ; 0x2f6 <parser+0x1c>
|
||||
}
|
||||
#if HUMAN_READABLE
|
||||
hal_USART_puts("\n\rNo match found!");
|
||||
hal_USART_puts("\n\r>>");
|
||||
#else
|
||||
hal_USART_puts("nmf\n\r");
|
||||
334: 82 e1 ldi r24, 0x12 ; 18
|
||||
336: 91 e0 ldi r25, 0x01 ; 1
|
||||
338: 0e 94 bb 00 call 0x176 ; 0x176 <hal_USART_puts>
|
||||
#endif
|
||||
|
||||
rx_buff_index = 0;
|
||||
33c: 10 92 2b 01 sts 0x012B, r1 ; 0x80012b <rx_buff_index>
|
||||
parse_FLG = 0;
|
||||
340: 10 92 2a 01 sts 0x012A, r1 ; 0x80012a <__data_end>
|
||||
}
|
||||
344: df 91 pop r29
|
||||
346: cf 91 pop r28
|
||||
348: 1f 91 pop r17
|
||||
34a: 0f 91 pop r16
|
||||
34c: ff 90 pop r15
|
||||
34e: ef 90 pop r14
|
||||
350: 08 95 ret
|
||||
|
||||
00000352 <main>:
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
ledInit();
|
||||
352: 0e 94 53 00 call 0xa6 ; 0xa6 <ledInit>
|
||||
|
||||
cli();
|
||||
356: f8 94 cli
|
||||
|
||||
hal_USART_RxEnable();
|
||||
358: 0e 94 63 00 call 0xc6 ; 0xc6 <hal_USART_RxEnable>
|
||||
hal_USART_TxEnable();
|
||||
35c: 0e 94 69 00 call 0xd2 ; 0xd2 <hal_USART_TxEnable>
|
||||
hal_USART_setCharSize(charSize_8BIT);
|
||||
360: 83 e0 ldi r24, 0x03 ; 3
|
||||
362: 0e 94 6f 00 call 0xde ; 0xde <hal_USART_setCharSize>
|
||||
hal_USART_setBaudRate(9600);
|
||||
366: 60 e8 ldi r22, 0x80 ; 128
|
||||
368: 75 e2 ldi r23, 0x25 ; 37
|
||||
36a: 80 e0 ldi r24, 0x00 ; 0
|
||||
36c: 90 e0 ldi r25, 0x00 ; 0
|
||||
36e: 0e 94 7f 00 call 0xfe ; 0xfe <hal_USART_setBaudRate>
|
||||
hal_USART_registerRxCallback(rxCallback);
|
||||
372: 8f e3 ldi r24, 0x3F ; 63
|
||||
374: 91 e0 ldi r25, 0x01 ; 1
|
||||
376: 0e 94 a9 00 call 0x152 ; 0x152 <hal_USART_registerRxCallback>
|
||||
sei();
|
||||
37a: 78 94 sei
|
||||
#endif
|
||||
|
||||
while (1)
|
||||
{
|
||||
//hal_USART_puts("\n\r>>");
|
||||
parser();
|
||||
37c: 0e 94 6d 01 call 0x2da ; 0x2da <parser>
|
||||
380: fd cf rjmp .-6 ; 0x37c <main+0x2a>
|
||||
|
||||
00000382 <__udivmodsi4>:
|
||||
382: a1 e2 ldi r26, 0x21 ; 33
|
||||
384: 1a 2e mov r1, r26
|
||||
386: aa 1b sub r26, r26
|
||||
388: bb 1b sub r27, r27
|
||||
38a: fd 01 movw r30, r26
|
||||
38c: 0d c0 rjmp .+26 ; 0x3a8 <__udivmodsi4_ep>
|
||||
|
||||
0000038e <__udivmodsi4_loop>:
|
||||
38e: aa 1f adc r26, r26
|
||||
390: bb 1f adc r27, r27
|
||||
392: ee 1f adc r30, r30
|
||||
394: ff 1f adc r31, r31
|
||||
396: a2 17 cp r26, r18
|
||||
398: b3 07 cpc r27, r19
|
||||
39a: e4 07 cpc r30, r20
|
||||
39c: f5 07 cpc r31, r21
|
||||
39e: 20 f0 brcs .+8 ; 0x3a8 <__udivmodsi4_ep>
|
||||
3a0: a2 1b sub r26, r18
|
||||
3a2: b3 0b sbc r27, r19
|
||||
3a4: e4 0b sbc r30, r20
|
||||
3a6: f5 0b sbc r31, r21
|
||||
|
||||
000003a8 <__udivmodsi4_ep>:
|
||||
3a8: 66 1f adc r22, r22
|
||||
3aa: 77 1f adc r23, r23
|
||||
3ac: 88 1f adc r24, r24
|
||||
3ae: 99 1f adc r25, r25
|
||||
3b0: 1a 94 dec r1
|
||||
3b2: 69 f7 brne .-38 ; 0x38e <__udivmodsi4_loop>
|
||||
3b4: 60 95 com r22
|
||||
3b6: 70 95 com r23
|
||||
3b8: 80 95 com r24
|
||||
3ba: 90 95 com r25
|
||||
3bc: 9b 01 movw r18, r22
|
||||
3be: ac 01 movw r20, r24
|
||||
3c0: bd 01 movw r22, r26
|
||||
3c2: cf 01 movw r24, r30
|
||||
3c4: 08 95 ret
|
||||
|
||||
000003c6 <strcmp>:
|
||||
3c6: fb 01 movw r30, r22
|
||||
3c8: dc 01 movw r26, r24
|
||||
3ca: 8d 91 ld r24, X+
|
||||
3cc: 01 90 ld r0, Z+
|
||||
3ce: 80 19 sub r24, r0
|
||||
3d0: 01 10 cpse r0, r1
|
||||
3d2: d9 f3 breq .-10 ; 0x3ca <strcmp+0x4>
|
||||
3d4: 99 0b sbc r25, r25
|
||||
3d6: 08 95 ret
|
||||
|
||||
000003d8 <_exit>:
|
||||
3d8: f8 94 cli
|
||||
|
||||
000003da <__stop_program>:
|
||||
3da: ff cf rjmp .-2 ; 0x3da <__stop_program>
|
@ -0,0 +1,644 @@
|
||||
Archive member included to satisfy reference by file (symbol)
|
||||
|
||||
c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_udivmodsi4.o)
|
||||
hal_usart.o (__udivmodsi4)
|
||||
c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o (exit)
|
||||
c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_copy_data.o)
|
||||
hal_usart.o (__do_copy_data)
|
||||
c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_clear_bss.o)
|
||||
main.o (__do_clear_bss)
|
||||
c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5\libc.a(strcmp.o)
|
||||
main.o (strcmp)
|
||||
|
||||
Allocating common symbols
|
||||
Common symbol size file
|
||||
|
||||
rx_buff 0x64 main.o
|
||||
|
||||
Discarded input sections
|
||||
|
||||
.data 0x00000000 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
.bss 0x00000000 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
.text 0x00000000 0x0 cmdp.o
|
||||
.data 0x00000000 0x0 cmdp.o
|
||||
.bss 0x00000000 0x0 cmdp.o
|
||||
.debug_info 0x00000000 0x56 cmdp.o
|
||||
.debug_abbrev 0x00000000 0x26 cmdp.o
|
||||
.debug_aranges
|
||||
0x00000000 0x18 cmdp.o
|
||||
.debug_line 0x00000000 0x1a cmdp.o
|
||||
.debug_str 0x00000000 0x165 cmdp.o
|
||||
.comment 0x00000000 0x31 cmdp.o
|
||||
.text 0x00000000 0x0 entryf.o
|
||||
.data 0x00000000 0x0 entryf.o
|
||||
.bss 0x00000000 0x0 entryf.o
|
||||
.text 0x00000000 0x0 hal_usart.o
|
||||
.data 0x00000000 0x0 hal_usart.o
|
||||
.bss 0x00000000 0x0 hal_usart.o
|
||||
.text.hal_USART_enableModule
|
||||
0x00000000 0xc hal_usart.o
|
||||
.text.hal_USART_dissableModule
|
||||
0x00000000 0xc hal_usart.o
|
||||
.text.hal_USART_readDataReg_9Bit
|
||||
0x00000000 0x16 hal_usart.o
|
||||
.text.hal_USART_writeDataReg
|
||||
0x00000000 0x6 hal_usart.o
|
||||
.text.hal_USART_writeDataReg_9Bit
|
||||
0x00000000 0x10 hal_usart.o
|
||||
.text.hal_USART_checkRxFrameErr
|
||||
0x00000000 0xa hal_usart.o
|
||||
.text.hal_USART_checkRxDataOverRun
|
||||
0x00000000 0xc hal_usart.o
|
||||
.text.hal_USART_checkRxParityErr
|
||||
0x00000000 0xc hal_usart.o
|
||||
.text.hal_USART_enableDoubleTxSpeed
|
||||
0x00000000 0xe hal_usart.o
|
||||
.text.hal_USART_dissableDoubleTxSpeed
|
||||
0x00000000 0xc hal_usart.o
|
||||
.text.hal_USART_enableMultiProcessorComMode
|
||||
0x00000000 0xe hal_usart.o
|
||||
.text.hal_USART_dissableMultiProcessorComMode
|
||||
0x00000000 0xc hal_usart.o
|
||||
.text.hal_USART_RxDissable
|
||||
0x00000000 0xc hal_usart.o
|
||||
.text.hal_USART_TxDissable
|
||||
0x00000000 0xc hal_usart.o
|
||||
.text.hal_USART_setMode
|
||||
0x00000000 0x1a hal_usart.o
|
||||
.text.hal_USART_setParityMode
|
||||
0x00000000 0x1a hal_usart.o
|
||||
.text.hal_USART_setStopBits
|
||||
0x00000000 0x1a hal_usart.o
|
||||
.text.hal_USART_setClockPolarity
|
||||
0x00000000 0x12 hal_usart.o
|
||||
.text.hal_USART_unregisterRXCallback
|
||||
0x00000000 0x18 hal_usart.o
|
||||
.text.hal_USART_registerDataRegEmptyCallback
|
||||
0x00000000 0x14 hal_usart.o
|
||||
.text.hal_USART_unregisterDataRegEmptCallback
|
||||
0x00000000 0x18 hal_usart.o
|
||||
.text.hal_USART_registerTxCallback
|
||||
0x00000000 0x14 hal_usart.o
|
||||
.text.hal_USART_unregisterTXCallback
|
||||
0x00000000 0x18 hal_usart.o
|
||||
.text 0x00000000 0x0 main.o
|
||||
.data 0x00000000 0x0 main.o
|
||||
.bss 0x00000000 0x0 main.o
|
||||
.bss.entryListIndex
|
||||
0x00000000 0x1 main.o
|
||||
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_udivmodsi4.o)
|
||||
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_udivmodsi4.o)
|
||||
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_udivmodsi4.o)
|
||||
.text.libgcc.mul
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_udivmodsi4.o)
|
||||
.text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_udivmodsi4.o)
|
||||
.text.libgcc.prologue
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_udivmodsi4.o)
|
||||
.text.libgcc.builtins
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_udivmodsi4.o)
|
||||
.text.libgcc.fmul
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_udivmodsi4.o)
|
||||
.text.libgcc.fixed
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_udivmodsi4.o)
|
||||
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
.text.libgcc.mul
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
.text.libgcc.div
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
.text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
.text.libgcc.prologue
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
.text.libgcc.builtins
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
.text.libgcc.fmul
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
.text.libgcc.fixed
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_copy_data.o)
|
||||
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_copy_data.o)
|
||||
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_copy_data.o)
|
||||
.text.libgcc.mul
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_copy_data.o)
|
||||
.text.libgcc.div
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_copy_data.o)
|
||||
.text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_copy_data.o)
|
||||
.text.libgcc.prologue
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_copy_data.o)
|
||||
.text.libgcc.builtins
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_copy_data.o)
|
||||
.text.libgcc.fmul
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_copy_data.o)
|
||||
.text.libgcc.fixed
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_copy_data.o)
|
||||
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_clear_bss.o)
|
||||
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_clear_bss.o)
|
||||
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc.mul
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc.div
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc.prologue
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc.builtins
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc.fmul
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_clear_bss.o)
|
||||
.text.libgcc.fixed
|
||||
0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_clear_bss.o)
|
||||
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5\libc.a(strcmp.o)
|
||||
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5\libc.a(strcmp.o)
|
||||
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5\libc.a(strcmp.o)
|
||||
|
||||
Memory Configuration
|
||||
|
||||
Name Origin Length Attributes
|
||||
text 0x00000000 0x00020000 xr
|
||||
data 0x00800060 0x0000ffa0 rw !x
|
||||
eeprom 0x00810000 0x00010000 rw !x
|
||||
fuse 0x00820000 0x00000003 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
|
||||
|
||||
Address of section .data set to 0x800100
|
||||
LOAD C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
LOAD cmdp.o
|
||||
LOAD entryf.o
|
||||
LOAD hal_usart.o
|
||||
LOAD main.o
|
||||
START GROUP
|
||||
LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5\libm.a
|
||||
END GROUP
|
||||
START GROUP
|
||||
LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a
|
||||
LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5\libm.a
|
||||
LOAD c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5\libc.a
|
||||
LOAD C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5\libatmega328p.a
|
||||
END GROUP
|
||||
0x00020000 __TEXT_REGION_LENGTH__ = DEFINED (__TEXT_REGION_LENGTH__)?__TEXT_REGION_LENGTH__:0x20000
|
||||
0x0000ffa0 __DATA_REGION_LENGTH__ = DEFINED (__DATA_REGION_LENGTH__)?__DATA_REGION_LENGTH__:0xffa0
|
||||
0x00010000 __EEPROM_REGION_LENGTH__ = DEFINED (__EEPROM_REGION_LENGTH__)?__EEPROM_REGION_LENGTH__:0x10000
|
||||
[0x00000003] __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 0x3dc
|
||||
*(.vectors)
|
||||
.vectors 0x00000000 0x68 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
0x00000000 __vector_default
|
||||
0x00000000 __vectors
|
||||
*(.vectors)
|
||||
*(.progmem.gcc*)
|
||||
0x00000068 . = ALIGN (0x2)
|
||||
0x00000068 __trampolines_start = .
|
||||
*(.trampolines)
|
||||
.trampolines 0x00000068 0x0 linker stubs
|
||||
*(.trampolines*)
|
||||
0x00000068 __trampolines_end = .
|
||||
*libprintf_flt.a:*(.progmem.data)
|
||||
*libc.a:*(.progmem.data)
|
||||
*(.progmem*)
|
||||
0x00000068 . = ALIGN (0x2)
|
||||
*(.jumptables)
|
||||
*(.jumptables*)
|
||||
*(.lowtext)
|
||||
*(.lowtext*)
|
||||
0x00000068 __ctors_start = .
|
||||
*(.ctors)
|
||||
0x00000068 __ctors_end = .
|
||||
0x00000068 __dtors_start = .
|
||||
*(.dtors)
|
||||
0x00000068 __dtors_end = .
|
||||
SORT(*)(.ctors)
|
||||
SORT(*)(.dtors)
|
||||
*(.init0)
|
||||
.init0 0x00000068 0x0 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
0x00000068 __init
|
||||
*(.init0)
|
||||
*(.init1)
|
||||
*(.init1)
|
||||
*(.init2)
|
||||
.init2 0x00000068 0xc C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
*(.init2)
|
||||
*(.init3)
|
||||
*(.init3)
|
||||
*(.init4)
|
||||
.init4 0x00000074 0x16 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_copy_data.o)
|
||||
0x00000074 __do_copy_data
|
||||
.init4 0x0000008a 0x10 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_clear_bss.o)
|
||||
0x0000008a __do_clear_bss
|
||||
*(.init4)
|
||||
*(.init5)
|
||||
*(.init5)
|
||||
*(.init6)
|
||||
*(.init6)
|
||||
*(.init7)
|
||||
*(.init7)
|
||||
*(.init8)
|
||||
*(.init8)
|
||||
*(.init9)
|
||||
.init9 0x0000009a 0x8 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
*(.init9)
|
||||
*(.text)
|
||||
.text 0x000000a2 0x4 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
0x000000a2 __vector_22
|
||||
0x000000a2 __vector_1
|
||||
0x000000a2 __vector_24
|
||||
0x000000a2 __vector_12
|
||||
0x000000a2 __bad_interrupt
|
||||
0x000000a2 __vector_6
|
||||
0x000000a2 __vector_3
|
||||
0x000000a2 __vector_23
|
||||
0x000000a2 __vector_25
|
||||
0x000000a2 __vector_11
|
||||
0x000000a2 __vector_13
|
||||
0x000000a2 __vector_17
|
||||
0x000000a2 __vector_7
|
||||
0x000000a2 __vector_5
|
||||
0x000000a2 __vector_4
|
||||
0x000000a2 __vector_9
|
||||
0x000000a2 __vector_2
|
||||
0x000000a2 __vector_21
|
||||
0x000000a2 __vector_15
|
||||
0x000000a2 __vector_8
|
||||
0x000000a2 __vector_14
|
||||
0x000000a2 __vector_10
|
||||
0x000000a2 __vector_16
|
||||
0x000000a6 . = ALIGN (0x2)
|
||||
*(.text.*)
|
||||
.text.ledInit 0x000000a6 0x6 entryf.o
|
||||
0x000000a6 ledInit
|
||||
.text.toggleLed
|
||||
0x000000ac 0xa entryf.o
|
||||
0x000000ac toggleLed
|
||||
.text.turnOnLed
|
||||
0x000000b6 0x4 entryf.o
|
||||
0x000000b6 turnOnLed
|
||||
.text.turnOffLed
|
||||
0x000000ba 0x4 entryf.o
|
||||
0x000000ba turnOffLed
|
||||
.text.dummy 0x000000be 0x2 hal_usart.o
|
||||
.text.hal_USART_readDataReg
|
||||
0x000000c0 0x6 hal_usart.o
|
||||
0x000000c0 hal_USART_readDataReg
|
||||
.text.hal_USART_RxEnable
|
||||
0x000000c6 0xc hal_usart.o
|
||||
0x000000c6 hal_USART_RxEnable
|
||||
.text.hal_USART_TxEnable
|
||||
0x000000d2 0xc hal_usart.o
|
||||
0x000000d2 hal_USART_TxEnable
|
||||
.text.hal_USART_setCharSize
|
||||
0x000000de 0x20 hal_usart.o
|
||||
0x000000de hal_USART_setCharSize
|
||||
.text.hal_USART_setBaudRate
|
||||
0x000000fe 0x54 hal_usart.o
|
||||
0x000000fe hal_USART_setBaudRate
|
||||
.text.hal_USART_registerRxCallback
|
||||
0x00000152 0x14 hal_usart.o
|
||||
0x00000152 hal_USART_registerRxCallback
|
||||
.text.hal_USART_putc
|
||||
0x00000166 0x10 hal_usart.o
|
||||
0x00000166 hal_USART_putc
|
||||
.text.hal_USART_puts
|
||||
0x00000176 0x1e hal_usart.o
|
||||
0x00000176 hal_USART_puts
|
||||
.text.__vector_18
|
||||
0x00000194 0x4e hal_usart.o
|
||||
0x00000194 __vector_18
|
||||
.text.__vector_19
|
||||
0x000001e2 0x4e hal_usart.o
|
||||
0x000001e2 __vector_19
|
||||
.text.__vector_20
|
||||
0x00000230 0x4e hal_usart.o
|
||||
0x00000230 __vector_20
|
||||
.text.rxCallback
|
||||
0x0000027e 0x5c main.o
|
||||
0x0000027e rxCallback
|
||||
.text.parser 0x000002da 0x78 main.o
|
||||
0x000002da parser
|
||||
.text.main 0x00000352 0x30 main.o
|
||||
0x00000352 main
|
||||
.text.libgcc.div
|
||||
0x00000382 0x44 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_udivmodsi4.o)
|
||||
0x00000382 __udivmodsi4
|
||||
.text.avr-libc
|
||||
0x000003c6 0x12 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5\libc.a(strcmp.o)
|
||||
0x000003c6 strcmp
|
||||
0x000003d8 . = ALIGN (0x2)
|
||||
*(.fini9)
|
||||
.fini9 0x000003d8 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
0x000003d8 _exit
|
||||
0x000003d8 exit
|
||||
*(.fini9)
|
||||
*(.fini8)
|
||||
*(.fini8)
|
||||
*(.fini7)
|
||||
*(.fini7)
|
||||
*(.fini6)
|
||||
*(.fini6)
|
||||
*(.fini5)
|
||||
*(.fini5)
|
||||
*(.fini4)
|
||||
*(.fini4)
|
||||
*(.fini3)
|
||||
*(.fini3)
|
||||
*(.fini2)
|
||||
*(.fini2)
|
||||
*(.fini1)
|
||||
*(.fini1)
|
||||
*(.fini0)
|
||||
.fini0 0x000003d8 0x4 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/5.4.0/avr5\libgcc.a(_exit.o)
|
||||
*(.fini0)
|
||||
0x000003dc _etext = .
|
||||
|
||||
.data 0x00800100 0x2a load address 0x000003dc
|
||||
0x00800100 PROVIDE (__data_start, .)
|
||||
*(.data)
|
||||
*(.data*)
|
||||
.data.txCallback
|
||||
0x00800100 0x2 hal_usart.o
|
||||
.data.dataRegEmptyCallback
|
||||
0x00800102 0x2 hal_usart.o
|
||||
.data.rxCallback
|
||||
0x00800104 0x2 hal_usart.o
|
||||
.data.entryList
|
||||
0x00800106 0xc main.o
|
||||
0x00800106 entryList
|
||||
*(.gnu.linkonce.d*)
|
||||
*(.rodata)
|
||||
*(.rodata*)
|
||||
.rodata.str1.1
|
||||
0x00800112 0x18 main.o
|
||||
*(.gnu.linkonce.r*)
|
||||
0x0080012a . = ALIGN (0x2)
|
||||
0x0080012a _edata = .
|
||||
0x0080012a PROVIDE (__data_end, .)
|
||||
|
||||
.bss 0x0080012a 0x66
|
||||
0x0080012a PROVIDE (__bss_start, .)
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
.bss.parse_FLG
|
||||
0x0080012a 0x1 main.o
|
||||
0x0080012a parse_FLG
|
||||
.bss.rx_buff_index
|
||||
0x0080012b 0x1 main.o
|
||||
0x0080012b rx_buff_index
|
||||
*(COMMON)
|
||||
COMMON 0x0080012c 0x64 main.o
|
||||
0x0080012c rx_buff
|
||||
0x00800190 PROVIDE (__bss_end, .)
|
||||
0x000003dc __data_load_start = LOADADDR (.data)
|
||||
0x00000406 __data_load_end = (__data_load_start + SIZEOF (.data))
|
||||
|
||||
.noinit 0x00800190 0x0
|
||||
[!provide] PROVIDE (__noinit_start, .)
|
||||
*(.noinit*)
|
||||
[!provide] PROVIDE (__noinit_end, .)
|
||||
0x00800190 _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 0x30
|
||||
*(.comment)
|
||||
.comment 0x00000000 0x30 entryf.o
|
||||
0x31 (size before relaxing)
|
||||
.comment 0x00000030 0x31 hal_usart.o
|
||||
.comment 0x00000030 0x31 main.o
|
||||
|
||||
.note.gnu.avr.deviceinfo
|
||||
0x00000000 0x40
|
||||
.note.gnu.avr.deviceinfo
|
||||
0x00000000 0x40 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
|
||||
.note.gnu.build-id
|
||||
*(.note.gnu.build-id)
|
||||
|
||||
.debug
|
||||
*(.debug)
|
||||
|
||||
.line
|
||||
*(.line)
|
||||
|
||||
.debug_srcinfo
|
||||
*(.debug_srcinfo)
|
||||
|
||||
.debug_sfnames
|
||||
*(.debug_sfnames)
|
||||
|
||||
.debug_aranges 0x00000000 0x198
|
||||
*(.debug_aranges)
|
||||
.debug_aranges
|
||||
0x00000000 0x38 entryf.o
|
||||
.debug_aranges
|
||||
0x00000038 0x130 hal_usart.o
|
||||
.debug_aranges
|
||||
0x00000168 0x30 main.o
|
||||
|
||||
.debug_pubnames
|
||||
*(.debug_pubnames)
|
||||
|
||||
.debug_info 0x00000000 0xfa7
|
||||
*(.debug_info .gnu.linkonce.wi.*)
|
||||
.debug_info 0x00000000 0x5f4 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
.debug_info 0x000005f4 0xc1 entryf.o
|
||||
.debug_info 0x000006b5 0x5cb hal_usart.o
|
||||
.debug_info 0x00000c80 0x327 main.o
|
||||
|
||||
.debug_abbrev 0x00000000 0x8a7
|
||||
*(.debug_abbrev)
|
||||
.debug_abbrev 0x00000000 0x5a2 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
.debug_abbrev 0x000005a2 0x4f entryf.o
|
||||
.debug_abbrev 0x000005f1 0x14f hal_usart.o
|
||||
.debug_abbrev 0x00000740 0x167 main.o
|
||||
|
||||
.debug_line 0x00000000 0x889
|
||||
*(.debug_line .debug_line.* .debug_line_end)
|
||||
.debug_line 0x00000000 0x133 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
.debug_line 0x00000133 0xeb entryf.o
|
||||
.debug_line 0x0000021e 0x4ad hal_usart.o
|
||||
.debug_line 0x000006cb 0x1be main.o
|
||||
|
||||
.debug_frame 0x00000000 0x3e0
|
||||
*(.debug_frame)
|
||||
.debug_frame 0x00000000 0x54 entryf.o
|
||||
.debug_frame 0x00000054 0x328 hal_usart.o
|
||||
.debug_frame 0x0000037c 0x64 main.o
|
||||
|
||||
.debug_str 0x00000000 0x8f8
|
||||
*(.debug_str)
|
||||
.debug_str 0x00000000 0x208 C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/gcc/dev/atmega328p/avr5/crtatmega328p.o
|
||||
.debug_str 0x00000208 0x162 entryf.o
|
||||
0x196 (size before relaxing)
|
||||
.debug_str 0x0000036a 0x50f hal_usart.o
|
||||
0x675 (size before relaxing)
|
||||
.debug_str 0x00000879 0x7f main.o
|
||||
0x2ea (size before relaxing)
|
||||
|
||||
.debug_loc 0x00000000 0x4aa
|
||||
*(.debug_loc)
|
||||
.debug_loc 0x00000000 0x3dc hal_usart.o
|
||||
.debug_loc 0x000003dc 0xce main.o
|
||||
|
||||
.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 0x168
|
||||
*(.debug_ranges)
|
||||
.debug_ranges 0x00000000 0x28 entryf.o
|
||||
.debug_ranges 0x00000028 0x120 hal_usart.o
|
||||
.debug_ranges 0x00000148 0x20 main.o
|
||||
|
||||
.debug_macro
|
||||
*(.debug_macro)
|
||||
OUTPUT(comand_parser.elf elf32-avr)
|
||||
LOAD linker stubs
|
@ -0,0 +1,67 @@
|
||||
S0150000636F6D616E645F7061727365722E73726563B1
|
||||
S11300000C9434000C9451000C9451000C94510045
|
||||
S11300100C9451000C9451000C9451000C94510018
|
||||
S11300200C9451000C9451000C9451000C94510008
|
||||
S11300300C9451000C9451000C9451000C945100F8
|
||||
S11300400C9451000C9451000C94CA000C94F100CF
|
||||
S11300500C9418010C9451000C9451000C94510010
|
||||
S11300600C9451000C94510011241FBECFEFD8E022
|
||||
S1130070DEBFCDBF11E0A0E0B1E0ECEDF3E002C0E3
|
||||
S113008005900D92AA32B107D9F721E0AAE2B1E0B6
|
||||
S113009001C01D92A039B207E1F70E94A9010C9496
|
||||
S11300A0EC010C940000259A2D98089595B180E2F6
|
||||
S11300B0892785B908952D9A08952D98089508954E
|
||||
S11300C08091C6000895E1ECF0E080818061808336
|
||||
S11300D00895E1ECF0E08081886080830895E1EC8C
|
||||
S11300E0F0E090819B7F9083E2ECF0E09081997F37
|
||||
S11300F0908390818370880F982B90830895DC01FE
|
||||
S1130100CB01880F991FAA1FBB1F880F991FAA1F15
|
||||
S1130110BB1F9C01AD01220F331F441F551F220F2B
|
||||
S1130120331F441F551F60E074E284EF90E00E9487
|
||||
S1130130C1018FEF820F8093C400DA01C9010197D6
|
||||
S1130140A109B109892F9A2FAB2FBB278093C50032
|
||||
S113015008959093050180930401E1ECF0E080811F
|
||||
S1130160806880830895E0ECF0E0908195FFFDCFF6
|
||||
S11301708093C6000895CF93DF93EC018881882390
|
||||
S113018031F021960E94B30089918111FBCFDF9158
|
||||
S1130190CF9108951F920F920FB60F9211242F93AF
|
||||
S11301A03F934F935F936F937F938F939F93AF93FB
|
||||
S11301B0BF93EF93FF93E0910401F091050109953A
|
||||
S11301C0FF91EF91BF91AF919F918F917F916F912B
|
||||
S11301D05F914F913F912F910F900FBE0F901F9001
|
||||
S11301E018951F920F920FB60F9211242F933F93DD
|
||||
S11301F04F935F936F937F938F939F93AF93BF932B
|
||||
S1130200EF93FF93E0910201F09103010995FF91AF
|
||||
S1130210EF91BF91AF919F918F917F916F915F917A
|
||||
S11302204F913F912F910F900FBE0F901F901895F3
|
||||
S11302301F920F920FB60F9211242F933F934F9357
|
||||
S11302405F936F937F938F939F93AF93BF93EF933A
|
||||
S1130250FF93E0910001F09101010995FF91EF9165
|
||||
S1130260BF91AF919F918F917F916F915F914F91CA
|
||||
S11302703F912F910F900FBE0F901F9018950E94E1
|
||||
S1130280600090912A01911127C08D3051F4E091C2
|
||||
S11302902B01F0E0E45DFE4F108281E080932A019F
|
||||
S11302A008958830A9F4E0912B01EE2331F0E15058
|
||||
S11302B0E0932B010E94B300089591E09E0F909368
|
||||
S11302C02B01F0E0E45DFE4F80830E94B3000895AB
|
||||
S11302D0E0912B01E33688F30895EF92FF920F9398
|
||||
S11302E01F93CF93DF9380912A01882359F106E06D
|
||||
S11302F011E0C0E0D0E06CE271E0F801808191810E
|
||||
S11303000E94E301892B81F4FE01EE0FFF1FEE0F23
|
||||
S1130310FF1FEA5FFE4F0280F381E02D09951092E2
|
||||
S11303202B0110922A010EC021960C5F1F4FC3307F
|
||||
S1130330D10509F782E191E00E94BB0010922B01E4
|
||||
S113034010922A01DF91CF911F910F91FF90EF90AE
|
||||
S113035008950E945300F8940E9463000E9469006B
|
||||
S113036083E00E946F0060E875E280E090E00E9404
|
||||
S11303707F008FE391E00E94A90078940E946D01B0
|
||||
S1130380FDCFA1E21A2EAA1BBB1BFD010DC0AA1FA3
|
||||
S1130390BB1FEE1FFF1FA217B307E407F50720F0EA
|
||||
S11303A0A21BB30BE40BF50B661F771F881F991F65
|
||||
S11303B01A9469F760957095809590959B01AC01AE
|
||||
S11303C0BD01CF010895FB01DC018D9101908019DD
|
||||
S10F03D00110D9F3990B0895F894FFCFA5
|
||||
S11303DC5F005F005F0018015B001E015D002401DB
|
||||
S11303EC56006E6D660A0D006C65642031006C65F8
|
||||
S10D03FC642030006C656420740076
|
||||
S9030000FC
|
@ -0,0 +1,36 @@
|
||||
entryf.d entryf.o: .././entryf.c .././entryf.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \
|
||||
C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\include/avr/iom328p.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h
|
||||
|
||||
.././entryf.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h:
|
||||
|
||||
C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\include/avr/iom328p.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h:
|
@ -0,0 +1,42 @@
|
||||
hal_usart.d hal_usart.o: .././hal_usart.c .././hal_usart.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \
|
||||
C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\include/avr/iom328p.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \
|
||||
.././dummy.h
|
||||
|
||||
.././hal_usart.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h:
|
||||
|
||||
C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\include/avr/iom328p.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h:
|
||||
|
||||
.././dummy.h:
|
@ -0,0 +1,48 @@
|
||||
main.d main.o: .././main.c \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h \
|
||||
C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\include/avr/iom328p.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\string.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h \
|
||||
.././entryf.h .././hal_usart.h \
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\io.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\sfr_defs.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\inttypes.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stdint.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\stdint.h:
|
||||
|
||||
C:\Program\ Files\ (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\include/avr/iom328p.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\portpins.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\common.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\version.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\fuse.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\lock.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\string.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\lib\gcc\avr\5.4.0\include\stddef.h:
|
||||
|
||||
.././entryf.h:
|
||||
|
||||
.././hal_usart.h:
|
||||
|
||||
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\interrupt.h:
|
@ -0,0 +1,12 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit or delete the file
|
||||
################################################################################
|
||||
|
||||
cmdp.c
|
||||
|
||||
entryf.c
|
||||
|
||||
hal_usart.c
|
||||
|
||||
main.c
|
||||
|
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* cmdp.c
|
||||
*
|
||||
* Created: 23-Feb-19 18:00:00
|
||||
* Author: Edwin
|
||||
*/
|
||||
|
||||
#include "cmdp.h"
|
||||
/*
|
||||
void output()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void parse(char *input)
|
||||
{
|
||||
uint8_t i = 0;
|
||||
uint8_t t = 0;
|
||||
|
||||
for(i = 0; i < cmbd_ENTRY_LIST_SIZE; i++) {
|
||||
if(strcmp(entryList[i].name,input)){
|
||||
entryList[i].callback();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
output("\n\r command unknown!");
|
||||
}
|
||||
*/
|
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* cmdp.h
|
||||
*
|
||||
* Created: 23-Feb-19 17:59:45
|
||||
* Author: Edwin
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CMDP_H_
|
||||
#define CMDP_H_
|
||||
|
||||
#define cmbd_ENTRY_LIST_SIZE 1
|
||||
|
||||
#include "entryf.h"
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
/*
|
||||
typedef (*callback_t)();
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
callback_t callback;
|
||||
}entry_t;
|
||||
|
||||
entry_t entryList[cmbd_ENTRY_LIST_SIZE] = {"led on", turnOnLed, "led off",turnOffLed};
|
||||
|
||||
void parse(char *input);
|
||||
*/
|
||||
#endif /* CMDP_H_ */
|
@ -0,0 +1,163 @@
|
||||
<?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>dce6c7e3-ee26-4d79-826b-08594b9ad897</ProjectGuid>
|
||||
<avrdevice>ATmega328P</avrdevice>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<OutputType>Executable</OutputType>
|
||||
<Language>C</Language>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.elf</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<AssemblyName>comand_parser</AssemblyName>
|
||||
<Name>comand_parser</Name>
|
||||
<RootNamespace>comand_parser</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress>0x20000000</RamSnippetAddress>
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue>exception_table</OverrideVtorValue>
|
||||
<BootSegment>2</BootSegment>
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>1</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.40.0" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
<avrtool>com.atmel.avrdbg.tool.medbg</avrtool>
|
||||
<avrtoolserialnumber>ATML2323041800001239</avrtoolserialnumber>
|
||||
<avrdeviceexpectedsignature>0x1E950F</avrdeviceexpectedsignature>
|
||||
<com_atmel_avrdbg_tool_medbg>
|
||||
<ToolOptions>
|
||||
<InterfaceProperties>
|
||||
</InterfaceProperties>
|
||||
<InterfaceName>debugWIRE</InterfaceName>
|
||||
</ToolOptions>
|
||||
<ToolType>com.atmel.avrdbg.tool.medbg</ToolType>
|
||||
<ToolNumber>ATML2323041800001239</ToolNumber>
|
||||
<ToolName>mEDBG</ToolName>
|
||||
</com_atmel_avrdbg_tool_medbg>
|
||||
<avrtoolinterface>debugWIRE</avrtoolinterface>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrGcc>
|
||||
<avrgcc.common.Device>-mmcu=atmega328p -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\gcc\dev\atmega328p"</avrgcc.common.Device>
|
||||
<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.2.209\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.2.209\include</Value>
|
||||
</ListValues>
|
||||
</avrgcc.assembler.general.IncludePaths>
|
||||
</AvrGcc>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrGcc>
|
||||
<avrgcc.common.Device>-mmcu=atmega328p -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\gcc\dev\atmega328p"</avrgcc.common.Device>
|
||||
<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.2.209\include</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.directories.IncludePaths>
|
||||
<avrgcc.compiler.optimization.level>Optimize (-O1)</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.2.209\include</Value>
|
||||
</ListValues>
|
||||
</avrgcc.assembler.general.IncludePaths>
|
||||
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
|
||||
</AvrGcc>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="cmdp.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="cmdp.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="dummy.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="entryf.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="entryf.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="hal_usart.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="hal_usart.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="main.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
|
||||
</Project>
|
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* dummy.h
|
||||
*
|
||||
* Created: 26-Oct-18 08:49:49
|
||||
* Author: Edwin
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DUMMY_H_
|
||||
#define DUMMY_H_
|
||||
|
||||
static void dummy()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif /* DUMMY_H_ */
|
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* entryf.c
|
||||
*
|
||||
* Created: 23-Feb-19 18:03:36
|
||||
* Author: Edwin
|
||||
*/
|
||||
#include "entryf.h"
|
||||
#include <avr/io.h>
|
||||
|
||||
void ledInit()
|
||||
{
|
||||
DDRB |= (1 << PINB5);
|
||||
PORTB &= ~(1 << PINB5);
|
||||
}
|
||||
|
||||
void toggleLed()
|
||||
{
|
||||
PORTB ^= (1 << PINB5);
|
||||
}
|
||||
|
||||
void turnOnLed()
|
||||
{
|
||||
PORTB |= (1 << PINB5);
|
||||
}
|
||||
|
||||
void turnOffLed()
|
||||
{
|
||||
PORTB &= ~(1 << PINB5);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* entryf.h
|
||||
*
|
||||
* Created: 23-Feb-19 18:03:14
|
||||
* Author: Edwin
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ENTRYF_H_
|
||||
#define ENTRYF_H_
|
||||
|
||||
void ledInit();
|
||||
|
||||
void turnOnLed();
|
||||
|
||||
void turnOffLed();
|
||||
|
||||
void toggleLed();
|
||||
|
||||
#endif /* ENTRYF_H_ */
|
@ -0,0 +1,235 @@
|
||||
/*
|
||||
* hal_usart.c
|
||||
*
|
||||
* Created: 08-Nov-18 17:40:43
|
||||
* Author: Edwin
|
||||
*/
|
||||
|
||||
|
||||
// http://ee-classes.usc.edu/ee459/library/documents/avr_intr_vectors/
|
||||
|
||||
#define BAUD_PRESCALE(baude_val) (((F_CPU / (baude_val * 16UL))) - 1)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "hal_usart.h"
|
||||
#include "dummy.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
static charSize_t charakterSize = charSize_8BIT;
|
||||
|
||||
static fptr_t rxCallback = dummy;
|
||||
static fptr_t dataRegEmptyCallback = dummy;
|
||||
static fptr_t txCallback = dummy;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void hal_USART_enableModule()
|
||||
{
|
||||
PRR &= ~(1 <<PRUSART0);
|
||||
}
|
||||
|
||||
void hal_USART_dissableModule()
|
||||
{
|
||||
PRR |= (1 <<PRUSART0);
|
||||
}
|
||||
|
||||
uint8_t hal_USART_readDataReg()
|
||||
{
|
||||
return UDR0;
|
||||
}
|
||||
|
||||
uint16_t hal_USART_readDataReg_9Bit()
|
||||
{
|
||||
return (((UCSR0B & 0x01) << 8) | UDR0);
|
||||
}
|
||||
|
||||
void hal_USART_writeDataReg(uint8_t data)
|
||||
{
|
||||
UDR0 = data;
|
||||
}
|
||||
|
||||
void hal_USART_writeDataReg_9Bit(uint16_t data)
|
||||
{
|
||||
UCSR0B |= (data >> 8);
|
||||
UDR0 = data;
|
||||
}
|
||||
|
||||
// not sure yet
|
||||
uint8_t hal_USART_checkRxFrameErr()
|
||||
{
|
||||
return ((UCSR0A & (1 << FE0)) >> FE0);
|
||||
}
|
||||
// not sure yet
|
||||
uint8_t hal_USART_checkRxDataOverRun()
|
||||
{
|
||||
return ((UCSR0A & (1 << DOR0)) >> DOR0);
|
||||
}
|
||||
|
||||
uint8_t hal_USART_checkRxParityErr()
|
||||
{
|
||||
return ((UCSR0A & (1 << UPE0)) >> UPE0);
|
||||
}
|
||||
|
||||
void hal_USART_enableDoubleTxSpeed()
|
||||
{
|
||||
UCSR0A = (UCSR0A & (1 << MPCM0)) | (1 << U2X0);
|
||||
}
|
||||
|
||||
void hal_USART_dissableDoubleTxSpeed()
|
||||
{
|
||||
UCSR0A = (UCSR0A & (1 << MPCM0));
|
||||
}
|
||||
|
||||
void hal_USART_enableMultiProcessorComMode()
|
||||
{
|
||||
UCSR0A = (UCSR0A & (1 << U2X0)) | (1 << MPCM0);
|
||||
}
|
||||
|
||||
void hal_USART_dissableMultiProcessorComMode()
|
||||
{
|
||||
UCSR0A = (UCSR0A & (1 << U2X0));
|
||||
}
|
||||
|
||||
void hal_USART_RxEnable()
|
||||
{
|
||||
UCSR0B |= (1 << RXEN0);
|
||||
}
|
||||
|
||||
void hal_USART_RxDissable()
|
||||
{
|
||||
UCSR0B &= ~(1 << RXEN0);
|
||||
}
|
||||
|
||||
void hal_USART_TxEnable()
|
||||
{
|
||||
UCSR0B |= (1 << TXEN0);
|
||||
}
|
||||
|
||||
void hal_USART_TxDissable()
|
||||
{
|
||||
UCSR0B &= ~(1 << TXEN0);
|
||||
}
|
||||
|
||||
void hal_USART_setMode(mode_t mode)
|
||||
{
|
||||
UCSR0C &= ~((1 << UMSEL00) | (1 << UMSEL01));
|
||||
UCSR0C |= (mode << UMSEL00);
|
||||
}
|
||||
|
||||
void hal_USART_setParityMode(parityMode_t mode)
|
||||
{
|
||||
UCSR0C &= ~((1 << UPM00) | (1 << UPM01));
|
||||
UCSR0C |= (mode << UPM00);
|
||||
}
|
||||
|
||||
void hal_USART_setStopBits(stopBit_t bit)
|
||||
{
|
||||
UCSR0C &= ~(1 << USBS0);
|
||||
UCSR0C |= (bit << USBS0);
|
||||
}
|
||||
|
||||
void hal_USART_setCharSize(charSize_t size)
|
||||
{
|
||||
/*
|
||||
UCSR0C &= ~((1 << UCSZ00) | (1 << UCSZ01));
|
||||
//UCSR0C |= (1 << UCSZ00) | (1 << UCSZ01);
|
||||
UCSR0C |= (size & 0x03) << 1;
|
||||
*/
|
||||
charakterSize = size;
|
||||
size &= 0x07;
|
||||
|
||||
UCSR0B &= ~(1 << UCSZ02);
|
||||
UCSR0C &= ~((1 << UCSZ00) | (1 << UCSZ01));
|
||||
|
||||
//UCSR0B |= size & 0x04;
|
||||
UCSR0C |= (size & 0x03) << 1;
|
||||
|
||||
}
|
||||
|
||||
void hal_USART_setClockPolarity(clkPol_t polarity)
|
||||
{
|
||||
UCSR0C &= ~(1 << UCPOL0);
|
||||
UCSR0C |= (polarity << UCPOL0);
|
||||
}
|
||||
|
||||
void hal_USART_setBaudRate(uint32_t baudRate)
|
||||
{
|
||||
//baudRate &= 0x0FFF;
|
||||
UBRR0L = ((((F_CPU / (baudRate * 16UL))) - 1));
|
||||
UBRR0H = (((((F_CPU / (baudRate * 16UL))) - 1)) >> 8);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void hal_USART_registerRxCallback(fptr_t callback)
|
||||
{
|
||||
rxCallback = callback;
|
||||
UCSR0B |= (1 << RXCIE0);
|
||||
}
|
||||
|
||||
void hal_USART_unregisterRXCallback()
|
||||
{
|
||||
UCSR0B &= ~(1 << RXCIE0);
|
||||
rxCallback = dummy;
|
||||
}
|
||||
|
||||
void hal_USART_registerDataRegEmptyCallback(fptr_t callback)
|
||||
{
|
||||
UCSR0B |= (1 << UDRIE0);
|
||||
dataRegEmptyCallback = callback;
|
||||
}
|
||||
|
||||
void hal_USART_unregisterDataRegEmptCallback()
|
||||
{
|
||||
UCSR0B &= ~(1 << UDRIE0);
|
||||
dataRegEmptyCallback = dummy;
|
||||
}
|
||||
|
||||
void hal_USART_registerTxCallback(fptr_t callback)
|
||||
{
|
||||
UCSR0B |= (1 << TXCIE0);
|
||||
txCallback = callback;
|
||||
}
|
||||
|
||||
void hal_USART_unregisterTXCallback()
|
||||
{
|
||||
UCSR0B &= ~(1 << TXCIE0);
|
||||
txCallback = dummy;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void hal_USART_putc(const char send)
|
||||
{
|
||||
// Do nothing for a bit if there is already
|
||||
// data waiting in the hardware to be sent
|
||||
while ((UCSR0A & (1 << UDRE0)) == 0);
|
||||
UDR0 = send;
|
||||
}
|
||||
|
||||
void hal_USART_puts(const char *send)
|
||||
{
|
||||
// Cycle through each character individually
|
||||
while (*send != '\0')
|
||||
{
|
||||
hal_USART_putc(*send++);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ISR (USART_RX_vect)
|
||||
{
|
||||
rxCallback();
|
||||
}
|
||||
|
||||
ISR(USART_UDRE_vect)
|
||||
{
|
||||
dataRegEmptyCallback();
|
||||
}
|
||||
|
||||
ISR(USART_TX_vect)
|
||||
{
|
||||
txCallback();
|
||||
}
|
@ -0,0 +1,133 @@
|
||||
/*
|
||||
* hal_usart.h
|
||||
*
|
||||
* Created: 08-Nov-18 17:40:59
|
||||
* Author: Edwin
|
||||
*/
|
||||
|
||||
#ifndef HAL_USART_H_
|
||||
#define HAL_USART_H_
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <avr/interrupt.h>
|
||||
#include <stdint.h>
|
||||
#include <avr/io.h>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#define F_CPU 16000000UL
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#define BAUD_PRESCALER(BAUD,CLK) (((CLK / (BAUD * 16UL))) - 1)
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef void (*fptr_t) (); /*<*/
|
||||
|
||||
typedef enum
|
||||
{
|
||||
mode_ASYNCHRON_USART,
|
||||
mode_SYNCHRONOUS_USART
|
||||
//mode_MASTER_SPI = 3
|
||||
|
||||
}mode_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
parityMode_DISSABELD,
|
||||
parityMode_EVEN_PARITY = 2,
|
||||
parityMode_ODD_PARITY
|
||||
}parityMode_t;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
stopBit_1_BIT,
|
||||
stopBit_2_BIT
|
||||
}stopBit_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
charSize_5BIT = 0,
|
||||
charSize_6BIT = 1,
|
||||
charSize_7BIT = 2,
|
||||
charSize_8BIT = 3,
|
||||
charSize_9BIT = 7
|
||||
}charSize_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
clkPol_NONINVERTED,
|
||||
clkPol_INVERTED
|
||||
}clkPol_t;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void hal_USART_enableModule();
|
||||
|
||||
void hal_USART_dissableModule();
|
||||
|
||||
uint8_t hal_USART_readDataReg();
|
||||
|
||||
uint16_t hal_USART_readDataReg_9Bit();
|
||||
|
||||
void hal_USART_writeDataReg(uint8_t data);
|
||||
|
||||
void hal_USART_writeDataReg_9Bit(uint16_t data);
|
||||
|
||||
uint8_t hal_USART_checkRxFrameErr();
|
||||
|
||||
uint8_t hal_USART_checkRxDataOverRun();
|
||||
|
||||
uint8_t hal_USART_checkRxParityErr();
|
||||
|
||||
void hal_USART_enableDoubleTxSpeed();
|
||||
|
||||
void hal_USART_dissableDoubleTxSpeed();
|
||||
|
||||
void hal_USART_enableMultiProcessorComMode();
|
||||
|
||||
void hal_USART_dissableMultiProcessorComMode();
|
||||
|
||||
void hal_USART_RxEnable();
|
||||
|
||||
void hal_USART_RxDissable();
|
||||
|
||||
void hal_USART_TxEnable();
|
||||
|
||||
void hal_USART_TxDissable();
|
||||
|
||||
void hal_USART_setMode(mode_t mode);
|
||||
|
||||
void hal_USART_setParityMode(parityMode_t mode);
|
||||
|
||||
void hal_USART_setStopBits(stopBit_t bit);
|
||||
|
||||
void hal_USART_setCharSize(charSize_t size);
|
||||
|
||||
void hal_USART_setClockPolarity(clkPol_t polarity);
|
||||
|
||||
void hal_USART_setBaudRate(uint32_t baudRate);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void hal_USART_registerRxCallback(fptr_t callback);
|
||||
|
||||
void hal_USART_unregisterRXCallback();
|
||||
|
||||
void hal_USART_registerDataRegEmptyCallback(fptr_t callback);
|
||||
|
||||
void hal_USART_unregisterDataRegEmptCallback();
|
||||
|
||||
void hal_USART_registerTxCallback(fptr_t callback);
|
||||
|
||||
void hal_USART_unregisterTXCallback();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void hal_USART_putc (const char send);
|
||||
|
||||
void hal_USART_puts (const char *send);
|
||||
|
||||
#endif /* HAL_USART_H_ */
|
@ -0,0 +1,117 @@
|
||||
/*
|
||||
* comand_parser.c
|
||||
*
|
||||
* Created: 23-Feb-19 17:58:28
|
||||
* Author : Edwin
|
||||
*/
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include "entryf.h"
|
||||
#include "hal_usart.h"
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
#define RX_BUFF_SIZE 100
|
||||
#define ENTRY_LIST_SIZE 3
|
||||
#define HUMAN_READABLE 0
|
||||
|
||||
char rx_buff[RX_BUFF_SIZE];
|
||||
uint8_t rx_buff_index = 0;
|
||||
uint8_t parse_FLG = 0;
|
||||
|
||||
typedef (*callback_t)();
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
callback_t callback;
|
||||
}entry_t;
|
||||
|
||||
uint8_t entryListIndex = 0;
|
||||
entry_t entryList[ENTRY_LIST_SIZE]={{"led 1", turnOnLed},
|
||||
{"led 0", turnOffLed},
|
||||
{"led t", toggleLed}};
|
||||
|
||||
|
||||
void rxCallback()
|
||||
{
|
||||
char input = hal_USART_readDataReg();
|
||||
|
||||
if(parse_FLG) return;
|
||||
|
||||
// if(input == )
|
||||
|
||||
// enter
|
||||
if(input == 13 ){
|
||||
rx_buff[rx_buff_index] = '\0';
|
||||
parse_FLG = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
// backspace
|
||||
if(input == 8 && rx_buff_index > 0){
|
||||
rx_buff_index--;
|
||||
hal_USART_putc(input);
|
||||
return;
|
||||
}
|
||||
|
||||
if(rx_buff_index < (RX_BUFF_SIZE - 1) && !parse_FLG){
|
||||
rx_buff[rx_buff_index++] = input;
|
||||
hal_USART_putc(input);
|
||||
}
|
||||
}
|
||||
|
||||
void parser()
|
||||
{
|
||||
uint8_t i = 0;
|
||||
if(!parse_FLG) return;
|
||||
for(i = 0; i < ENTRY_LIST_SIZE && parse_FLG; i++) {
|
||||
//if(strncmp(entryList[i].name,rx_buff,rx_buff_index) == 0){
|
||||
if(strcmp(entryList[i].name,rx_buff) == 0){
|
||||
entryList[i].callback();
|
||||
rx_buff_index = 0;
|
||||
parse_FLG = 0;
|
||||
|
||||
#if HUMAN_READABLE
|
||||
hal_USART_puts("\n\r>>");
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
#if HUMAN_READABLE
|
||||
hal_USART_puts("\n\rNo match found!");
|
||||
hal_USART_puts("\n\r>>");
|
||||
#else
|
||||
hal_USART_puts("nmf\n\r");
|
||||
#endif
|
||||
|
||||
rx_buff_index = 0;
|
||||
parse_FLG = 0;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
ledInit();
|
||||
|
||||
cli();
|
||||
|
||||
hal_USART_RxEnable();
|
||||
hal_USART_TxEnable();
|
||||
hal_USART_setCharSize(charSize_8BIT);
|
||||
hal_USART_setBaudRate(9600);
|
||||
hal_USART_registerRxCallback(rxCallback);
|
||||
sei();
|
||||
|
||||
#if HUMAN_READABLE
|
||||
hal_USART_puts("\n\r>>");
|
||||
#endif
|
||||
|
||||
while (1)
|
||||
{
|
||||
parser();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
cpp_src = $(wildcard *.cpp)
|
||||
|
||||
cpp_obj = $(cpp_src:.cpp=.o)
|
||||
c_obj = $(c_src:.c=.o)
|
||||
CC = g++
|
||||
CFLAGS = -Wall -pedantic -li2c
|
||||
LDFLAGS =
|
||||
EXEC = runtest
|
||||
|
||||
|
||||
all : $(EXEC)
|
||||
|
||||
$(EXEC): $(cpp_obj) $(c_obj)
|
||||
$(CC) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -rf $(c_obj) $(cpp_obj) $(EXEC)
|
||||
|
||||
cleanall:
|
||||
rm -rf $(c_obj) $(cpp_obj) $(EXEC)
|
@ -0,0 +1,21 @@
|
||||
#ifndef _GYROSCOPE_HPP_
|
||||
#define _GYROSCOPE_HPP_
|
||||
|
||||
#include <memory>
|
||||
|
||||
class Gyroscope
|
||||
{
|
||||
public:
|
||||
Gyroscope();
|
||||
~Gyroscope();
|
||||
|
||||
void getOrientation();
|
||||
|
||||
private:
|
||||
class GyroscopeImpl; // forward declaration
|
||||
std::unique_ptr<GyroscopeImpl> impl;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // _GYROSCOPE_HPP_
|
@ -0,0 +1,44 @@
|
||||
// based on https://www.youtube.com/watch?v=lETcZQuKQBs
|
||||
#include "gyroscope.hpp"
|
||||
#include <iostream>
|
||||
//
|
||||
// definition of gyroscope
|
||||
//
|
||||
|
||||
class Gyroscope::GyroscopeImpl
|
||||
{
|
||||
public:
|
||||
GyroscopeImpl()
|
||||
{
|
||||
std::cout << "Ctor GyroscopeImpl" << std::endl;
|
||||
}
|
||||
|
||||
void getOrientation()
|
||||
{
|
||||
std::cout << "GyroscopeImpl::getOrientation()" << std::endl;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
Gyroscope::Gyroscope() :
|
||||
impl{std::make_unique<GyroscopeImpl>()}
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Gyroscope::~Gyroscope()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Gyroscope::getOrientation()
|
||||
{
|
||||
impl->getOrientation();
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
#include <iostream>
|
||||
#include "gyroscope.hpp"
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
std::cout << "pImpl Idom" << std::endl;
|
||||
|
||||
Gyroscope gyroscope;
|
||||
|
||||
gyroscope.getOrientation();
|
||||
|
||||
return 0;
|
||||
}
|
Binary file not shown.
@ -0,0 +1,73 @@
|
||||
/**
|
||||
* @file BitField.h
|
||||
* @author Edwin Koch (eddyed.k@gmail.com)
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2020-12-19
|
||||
*
|
||||
* @copyright Copyright (c) 2020
|
||||
*
|
||||
*/
|
||||
|
||||
// Based on:
|
||||
// https://www.youtube.com/watch?v=TYqbgvHfxjM
|
||||
// https://stackoverflow.com/questions/31726191/is-there-a-portable-alternative-to-c-bitfields
|
||||
// https://stackoverflow.com/questions/1392059/algorithm-to-generate-bit-mask
|
||||
|
||||
|
||||
/**
|
||||
* @brief Template class for portable Bitfields
|
||||
*
|
||||
* @tparam T type of variable in which the bitfield resides
|
||||
* @tparam START bit index starting from LSB where the bitfield starts
|
||||
* @tparam SIZE number of bits
|
||||
*/
|
||||
template<typename T, uint8_t START, uint8_t SIZE>
|
||||
struct BitField
|
||||
{
|
||||
/**
|
||||
* @brief Construct a new Bit Field object
|
||||
*
|
||||
*/
|
||||
BitField()
|
||||
{
|
||||
static_assert(SIZE != 0, "Bitfield SIZE must be > 0!");
|
||||
static_assert(START < sizeof(T) * 8, "START exceeds number of bits of the chosen typename T!");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief assignment operator
|
||||
*
|
||||
* @param v value to be written in the bitfield
|
||||
* @return BitField&
|
||||
*/
|
||||
BitField& operator =(T v)
|
||||
{
|
||||
// mask creation for v : https://stackoverflow.com/questions/1392059/algorithm-to-generate-bit-mask
|
||||
_raw = ((v & ((1ULL << SIZE)-1)) << START) ;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief return the value inside the bitfield
|
||||
*
|
||||
* @return T
|
||||
*/
|
||||
operator T() const
|
||||
{
|
||||
return _raw >> START;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief return the raw value
|
||||
*
|
||||
* @return T
|
||||
*/
|
||||
T operator ()() const
|
||||
{
|
||||
return _raw;
|
||||
}
|
||||
|
||||
private:
|
||||
T _raw;
|
||||
};
|
@ -0,0 +1,67 @@
|
||||
// Based on:
|
||||
// https://www.youtube.com/watch?v=TYqbgvHfxjM
|
||||
// https://stackoverflow.com/questions/31726191/is-there-a-portable-alternative-to-c-bitfields
|
||||
// https://stackoverflow.com/questions/1392059/algorithm-to-generate-bit-mask
|
||||
|
||||
#include <iostream>
|
||||
#include <stdint.h>
|
||||
|
||||
template<typename T, uint8_t START, uint8_t SIZE>
|
||||
struct Bits
|
||||
{
|
||||
Bits()
|
||||
{
|
||||
static_assert(SIZE != 0, "Bitfield SIZE must be > 0!");
|
||||
static_assert(START < sizeof(T) * 8, "START exceeds number of bits of the chosen typename T!");
|
||||
}
|
||||
|
||||
Bits& operator =(T v)
|
||||
{
|
||||
// mask creation for v : https://stackoverflow.com/questions/1392059/algorithm-to-generate-bit-mask
|
||||
_raw = ((v & ((1ULL << SIZE)-1)) << START) ;
|
||||
return *this;
|
||||
}
|
||||
|
||||
operator T() const
|
||||
{
|
||||
return _raw >> START;
|
||||
}
|
||||
|
||||
T operator ()() const
|
||||
{
|
||||
return _raw;
|
||||
}
|
||||
|
||||
private:
|
||||
T _raw;
|
||||
};
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
uint8_t d = 0;
|
||||
Bits<uint8_t, 2,2> bitField;
|
||||
|
||||
|
||||
std::cout << "out 1" << std::endl;
|
||||
std::cout << +bitField << std::endl;
|
||||
|
||||
bitField = 3;
|
||||
|
||||
std::cout << +bitField << std::endl;
|
||||
|
||||
bitField = 5;
|
||||
|
||||
std::cout << +bitField << std::endl;
|
||||
std::cout << +bitField() << std::endl;
|
||||
std::cout << "done!" << std::endl;
|
||||
|
||||
uint8_t mask;
|
||||
uint8_t param = 3;
|
||||
mask = (1 << param) - 1;
|
||||
std::cout << +mask << std::endl;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
// https://www.youtube.com/watch?v=TYqbgvHfxjM
|
||||
|
||||
// Deeply Embedded C++ - John Hinke - Meeting C++ 2015
|
||||
|
||||
template<class T, uint8_t START, uint8_t SIZE>
|
||||
struct Bits {
|
||||
Bits& operator=(T v)
|
||||
{
|
||||
this._raw |= v << START;
|
||||
return this;
|
||||
}
|
||||
|
||||
operator T() const {}
|
||||
|
||||
private:
|
||||
T _raw;
|
||||
};
|
||||
|
||||
union Control {
|
||||
struct OPM{
|
||||
typedef Bits<uint16_t, 10, 2> bits;
|
||||
enum { NO_CHANGE = 0, AS_STANDBY = 1};
|
||||
};
|
||||
struct CTRL_BR{
|
||||
enum { NO_CHANGE = 0, BRANCH_NORMAL = 1};
|
||||
};
|
||||
struct CTRL_BR1 : CTRL_BR{
|
||||
typedef Bits<uint16_t, 8, 2> bits;
|
||||
};
|
||||
struct CTRL_BR2 : CTRL_BR{
|
||||
typedef Bits<uint16_t, 6, 2> bits;
|
||||
};
|
||||
|
||||
union Bits {
|
||||
Control::OPM::bits OPM;
|
||||
Control::CTRL_BR1::bits CTRL_BR1;
|
||||
Control::CTRL_BR2::bits CTRL_BR2;
|
||||
} bits;
|
||||
uint16_t raw;
|
||||
};
|
||||
|
||||
|
||||
Control r;
|
||||
|
||||
r.bits.OPM = Control::OPM::AS_STANDBY;
|
||||
|
||||
|
||||
Control r;
|
||||
device.read(r);
|
||||
|
||||
if(r.bits.OPM == Control::OPM::AS_STANDBY) {
|
||||
// ...
|
||||
}
|
Loading…
Reference in new issue