eepromのテストプログラム
@@ -0,0 +1,41 @@ | ||
1 | +GccApplication1_eeprom.d GccApplication1_eeprom.o: \ | |
2 | + .././GccApplication1_eeprom.c \ | |
3 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h \ | |
4 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h \ | |
5 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h \ | |
6 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h \ | |
7 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h \ | |
8 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom88p.h \ | |
9 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h \ | |
10 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h \ | |
11 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h \ | |
12 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h \ | |
13 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h \ | |
14 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/eeprom.h \ | |
15 | + c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stddef.h | |
16 | + | |
17 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/io.h: | |
18 | + | |
19 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/sfr_defs.h: | |
20 | + | |
21 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/inttypes.h: | |
22 | + | |
23 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stdint.h: | |
24 | + | |
25 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/stdint.h: | |
26 | + | |
27 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/iom88p.h: | |
28 | + | |
29 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/portpins.h: | |
30 | + | |
31 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/common.h: | |
32 | + | |
33 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/version.h: | |
34 | + | |
35 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/fuse.h: | |
36 | + | |
37 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/lock.h: | |
38 | + | |
39 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/../../../../avr/include/avr/eeprom.h: | |
40 | + | |
41 | +c:\program\ files\ (x86)\atmel\atmel\ toolchain\avr8\ gcc\native\3.4.2.1002\avr8-gnu-toolchain\bin\../lib/gcc/avr/4.7.2/include/stddef.h: |
@@ -0,0 +1,125 @@ | ||
1 | +################################################################################ | |
2 | +# Automatically-generated file. Do not edit! | |
3 | +################################################################################ | |
4 | + | |
5 | +SHELL := cmd.exe | |
6 | +RM := rm -rf | |
7 | + | |
8 | +USER_OBJS := | |
9 | + | |
10 | +LIBS := | |
11 | +PROJ := | |
12 | + | |
13 | +O_SRCS := | |
14 | +C_SRCS := | |
15 | +S_SRCS := | |
16 | +S_UPPER_SRCS := | |
17 | +OBJ_SRCS := | |
18 | +ASM_SRCS := | |
19 | +PREPROCESSING_SRCS := | |
20 | +OBJS := | |
21 | +OBJS_AS_ARGS := | |
22 | +C_DEPS := | |
23 | +C_DEPS_AS_ARGS := | |
24 | +EXECUTABLES := | |
25 | +OUTPUT_FILE_PATH := | |
26 | +OUTPUT_FILE_PATH_AS_ARGS := | |
27 | +AVR_APP_PATH :=$$$AVR_APP_PATH$$$ | |
28 | +QUOTE := " | |
29 | +ADDITIONAL_DEPENDENCIES:= | |
30 | +OUTPUT_FILE_DEP:= | |
31 | +LIB_DEP:= | |
32 | + | |
33 | +# Every subdirectory with source files must be described here | |
34 | +SUBDIRS := | |
35 | + | |
36 | + | |
37 | +# Add inputs and outputs from these tool invocations to the build variables | |
38 | +C_SRCS += \ | |
39 | +../GccApplication1_eeprom.c | |
40 | + | |
41 | + | |
42 | +PREPROCESSING_SRCS += | |
43 | + | |
44 | + | |
45 | +ASM_SRCS += | |
46 | + | |
47 | + | |
48 | +OBJS += \ | |
49 | +GccApplication1_eeprom.o | |
50 | + | |
51 | +OBJS_AS_ARGS += \ | |
52 | +GccApplication1_eeprom.o | |
53 | + | |
54 | +C_DEPS += \ | |
55 | +GccApplication1_eeprom.d | |
56 | + | |
57 | +C_DEPS_AS_ARGS += \ | |
58 | +GccApplication1_eeprom.d | |
59 | + | |
60 | +OUTPUT_FILE_PATH +=GccApplication1_eeprom.elf | |
61 | + | |
62 | +OUTPUT_FILE_PATH_AS_ARGS +=GccApplication1_eeprom.elf | |
63 | + | |
64 | +ADDITIONAL_DEPENDENCIES:= | |
65 | + | |
66 | +OUTPUT_FILE_DEP:= ./makedep.mk | |
67 | + | |
68 | +LIB_DEP+= | |
69 | + | |
70 | +# AVR32/GNU C Compiler | |
71 | + | |
72 | + | |
73 | + | |
74 | +./%.o: .././%.c | |
75 | + @echo Building file: $< | |
76 | + @echo Invoking: AVR/GNU C Compiler : 3.4.2 | |
77 | + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -funsigned-char -funsigned-bitfields -DDEBUG -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega88p -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<" | |
78 | + @echo Finished building: $< | |
79 | + | |
80 | + | |
81 | + | |
82 | + | |
83 | +# AVR32/GNU Preprocessing Assembler | |
84 | + | |
85 | + | |
86 | + | |
87 | +# AVR32/GNU Assembler | |
88 | + | |
89 | + | |
90 | + | |
91 | + | |
92 | +ifneq ($(MAKECMDGOALS),clean) | |
93 | +ifneq ($(strip $(C_DEPS)),) | |
94 | +-include $(C_DEPS) | |
95 | +endif | |
96 | +endif | |
97 | + | |
98 | +# Add inputs and outputs from these tool invocations to the build variables | |
99 | + | |
100 | +# All Target | |
101 | +all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES) | |
102 | + | |
103 | +$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) | |
104 | + @echo Building target: $@ | |
105 | + @echo Invoking: AVR/GNU Linker : 3.4.2 | |
106 | + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="GccApplication1_eeprom.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega88p | |
107 | + @echo Finished building target: $@ | |
108 | + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature "GccApplication1_eeprom.elf" "GccApplication1_eeprom.hex" | |
109 | + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\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 "GccApplication1_eeprom.elf" "GccApplication1_eeprom.eep" || exit 0 | |
110 | + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "GccApplication1_eeprom.elf" > "GccApplication1_eeprom.lss" | |
111 | + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature "GccApplication1_eeprom.elf" "GccApplication1_eeprom.srec" | |
112 | + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-size.exe" "GccApplication1_eeprom.elf" | |
113 | + | |
114 | + | |
115 | + | |
116 | + | |
117 | + | |
118 | + | |
119 | + | |
120 | +# Other Targets | |
121 | +clean: | |
122 | + -$(RM) $(OBJS_AS_ARGS) $(EXECUTABLES) | |
123 | + -$(RM) $(C_DEPS_AS_ARGS) | |
124 | + rm -rf "GccApplication1_eeprom.elf" "GccApplication1_eeprom.a" "GccApplication1_eeprom.hex" "GccApplication1_eeprom.lss" "GccApplication1_eeprom.eep" "GccApplication1_eeprom.map" "GccApplication1_eeprom.srec" | |
125 | + | |
\ No newline at end of file |
@@ -0,0 +1,34 @@ | ||
1 | +/* | |
2 | + * GccApplication1_eeprom.c | |
3 | + * | |
4 | + * Created: 2014-04-19 20:43:12 | |
5 | + * Author: kmaehara | |
6 | + */ | |
7 | + | |
8 | + | |
9 | +#include <avr/io.h> | |
10 | +#include <avr/eeprom.h> | |
11 | + | |
12 | +uint8_t ee01 EEMEM = 0x37; | |
13 | +uint8_t ee02 EEMEM = 0x5C; | |
14 | +uint8_t ee03 EEMEM = 0xBF; | |
15 | +uint8_t ee04 EEMEM = 0xE2; | |
16 | + | |
17 | +uint8_t ram01, ram02, ram03, ram04; | |
18 | + | |
19 | + | |
20 | +int main(void) | |
21 | +{ | |
22 | + | |
23 | + ram01 = eeprom_read_byte(&ee01); | |
24 | + ram02 = eeprom_read_byte(&ee02); | |
25 | + ram03 = eeprom_read_byte(&ee03); | |
26 | + ram04 = eeprom_read_byte(&ee04); | |
27 | + | |
28 | + | |
29 | + while(1) | |
30 | + { | |
31 | + //TODO:: Please write your application code | |
32 | + | |
33 | + } | |
34 | +} | |
\ No newline at end of file |