AVR¾®¥Í¥¿¤¿¤Á

º£²ó¤ÏAVR¥Þ¥¤¥³¥ó¤Ë¤Þ¤Ä¤ï¤ë¤³¤È¤ò¤¤¤í¤¤¤í»î¤·¤Æ¤¤¤­¤Þ¤¹¡£


¡üavr-gcc¤¬14¤Ë¤Ê¤Ã¤Æ¤¤¤¿
·îÆü¤Îή¤ì¤Ï®¤¤¤â¤Î¤ÇGCC14¤¬¾¯¤·Á°¤Ë¥ê¥ê¡¼¥¹¤µ¤ì¤Æ¤¤¤Þ¤·¤¿¤¬
avr-gcc¤Ë¤âŬÍѤµ¤ì¤Æ¤ª¤ê¤Þ¤¹¡£

Windows¸þ¤±¤Î¤â¤Î¤Ïzakkemble»á¤Î»ä²È¥Ó¥ë¥ÉÈǤ¬ÍøÍѲÄǽ¤Ê¤â¤Î
¤È¤Ê¤Ã¤Æ¤ª¤ê¤Þ¤¹¡£Àµ³Î¤Ê¥Ð¡¼¥¸¥ç¥ó¤ÏGCC14.1.0¤È¤Î¤³¤È¡£

zakkemble»á¤Î¥Ó¥ë¥É¤ÏAVR-LibC¤â2.2.0¤Ë¥¢¥Ã¥×¤·¤Æ¤ª¤êºÇ¿·¤Î
AVR¤Ë¤âÂбþ¤·¤Æ¤ª¤ê¤Þ¤¹¡£¤â¤¦microchip¤Î¥µ¥¤¥È¤«¤éDFP½¦¤Ã¤Æ¤­¤Æ
¤¢¤ì¤ä¤³¤ì¤ä¤ä¤é¤Ê¤¯¤Æ¤è¤¯¤Ê¤Ã¤¿¤Î¤Ç
¤á¤Ã¤Á¤ã³Ú¤Ç¤¹¡ª

º£²ó¤ÎGCC14¤ÎÌ̤ܶÏAVR64DD28¤È¤«¤ÎAVR-Dx,AVR-Ex·Ï¤Ç¥Õ¥é¥Ã¥·¥å
¥á¥â¥êÎΰ褬64kB¤òĶ¤¨¤ëÉʼï¤Ë¤ª¤¤¤ÆPROGMEM¤Ê¤·¤Ç32kByte¤Þ¤Ç
const¥Ç¡¼¥¿¤òÇÛÃ֤Ǥ­¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¤³¤È¤Ç¤¹
¡£

°ÊÁ°¤Í¤à¤¤¤µ¤ó¤Ï¥ê¥ó¥«¥¹¥¯¥ê¥×¥È¤òÏ®¤Ã¤Æ32kByteʬ¤Îrodata¤ò
¥Ç¡¼¥¿Îΰè¤Ë¥Þ¥Ã¥Ô¥ó¥°¤¹¤ëµ»
¤ò¤ä¤Ã¤Æ¤¤¤Þ¤·¤¿¤¬GCC14¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç
¤½¤¦¤¹¤ë¤è¤¦¤ËÊѹ¹¤µ¤ì¤Æ¤ª¤ê¤Þ¤¹¡£

¤³¤ì¤ÇAVR64DD28¤äAVR128DB28¤È¤«¤Ç¤â32kByte¤Þ¤Ç¤Ê¤éPROGMEM
̵¤·¤Ç¤âconst¥Ç¡¼¥¿¤òÃÖ¤­¤Þ¤¯¤ì¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡Ä¡ª¤ä¤Ã¤¿¡ª

¤·¤«¤·¡Ä

¤Í¤à¤¤¤µ¤ó¤¬²áµî¤Ë¸ø³«¤·¤Æ¤¤¤ëAVR-Dx¸þ¤±¤Î¥×¥í¥¸¥§¥¯¥È¤Ï̵Íý¤¯¤½
¥ê¥ó¥«¥¹¥¯¥ê¥×¥È¤ò¤¤¤¸¤Ã¤Æ¥Þ¥Ã¥Ô¥ó¥°¤·¤Æ¤¤¤ëÅۤȤ֤Ĥ«¤Ã¤Æ¤·¤Þ¤¤
GCC14¤Ç¤Þ¤È¤â¤Ë¥Ó¥ë¥É¤Ç¤­¤Ê¤¯¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤·¤¿¡£
¤½¤³¤Çº£²ó¸åÊý¸ß´¹À­¤òÊݤÁ¤Ä¤ÄGCC14¤Ç¤â¥Ó¥ë¥É¤Ç¤­¤ë¤è¤¦¤Ëmakefile
¤Ë»Å¹þ¤ß¤ò¹Ô¤¤¤Þ¤·¤¿¡£

#============================================================================
# Define programs and commands.
SHELL = sh
CC = avr-gcc
OBJCOPY = avr-objcopy
OBJDUMP = avr-objdump
SIZE = avr-size
NM = avr-nm
AVRDUDE = avrdude
REMOVE = rm -f
REMOVEDIR = rm -rf
COPY = cp
WINSHELL = cmd
# Detect GCC version
GCCVERSION:= $(shell $(CC) -dumpversion)
dot:=.
empty:=
space:= $(empty) $(empty)
GCCVERSION:= $(subst $(dot),$(space), $(GCCVERSION))
GCCMAJOR:= $(word 1, $(GCCVERSION))
GCCMINOR:= $(word 2, $(GCCVERSION))


¤³¤¦¤¤¤ä¤Ã¤ÆGCC¤Î¥á¥¸¥ã¡¼¥Ð¡¼¥¸¥ç¥ó¤òmakefileÆâ¤Ç¼èÆÀ¤·¤Æ¡Ä

# If GCC 14+ Add -mrodata-in-ram to get backward compatibility on AVR uC
ifeq (1,$(shell expr $(GCCMAJOR) ¥>= 14))
ifneq ($(MCU),avr32da28)
ifeq ($(USE_SECTOR_MIRROR),SECTOR_MIRRORED)
CFLAGS += -mrodata-in-ram
endif
endif
endif

GCC14¤Ç¥Ó¥ë¥É¤¹¤ë¾ì¹ç¤ÏCFLAGS¤Ërodata¤Î¥Þ¥Ã¥Ô¥ó¥°¤ò̵¸ú²½¤¹¤ë
"-mrodata-in-ram"¤òÉÕÍ¿¤·¤ÆGCC13°ÊÁ°¤ÈƱ¤¸¤è¤¦¤Ë¥Ó¥ë¥É¤¹¤ë¤è¤¦¤Ë
¤·¤Æ¤ª¤ê¤Þ¤¹¡Ä
¤»¤Ã¤«¤¯ÊØÍø¤Êµ¡Ç½¤¬¤Ç¤­¤¿¤Î¤Ë¤ï¤¶¤ï¤¶°ÊÁ°¤Î¾õÂÖ¤ËÌ᤹¤è¤¦¤Ê¶ò¹Ô
¤ò¤·¤Á¤ã¤Ã¤Æ¤Þ¤¹¤¬¤Þ¤¡»þÂå¤ÎÊÑÁ«¤ÎµØ²Ö¤È¤¤¤¦¤³¤È¤Ç¡Ä

¤Á¤Ê¤ß¤ËmakefileÃæ¤ÎGCC¥Ð¡¼¥¸¥ç¥ó¼èÆÀ¤Ï¤³¤Á¤é¤ÎÊý¤Îµ­»ö¤ò»²¹Í¤Ë
¤µ¤»¤Æ¤¤¤¿¤À¤­¤Þ¤·¤¿¡ª

¤Þ¤¡¿·µ¬¤Ë¥×¥í¥¸¥§¥¯¥Èºî¤ëºÝ¤Ï"-mrodata-in-ram"¤Î»Å¹þ¤ß¤ÏÉÔÍפÊ
¤è¤¦¤Ë¤·¤¿¤¤¤È»×¤¤¤Þ¤¹¡£
¤½¤ó¤Ê¤ï¤±¤ÇAVR-Dx¸þ¤±¤Î¥×¥í¥¸¥§¥¯¥È¤âGCC14¤ËÂбþ¤·¤Æ¤ß¤Þ¤·¤¿¤Î¤Ç
¶½Ì£¤¢¤ëÊý¤ÏÇÁ¤¤¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£

¤Þ¤¿GCC14¤Ç¤Ï"-fanalyzer"¤Ê¤ë¥ª¥×¥·¥ç¥ó¤âÄɲ䵤ì¤Æ¤¤¤Þ¤¹¡£
¤³¤ì¤òÍ­¸ú¤Ë¤¹¤ë¤È°Ê²¼¤Î¤è¤¦¤ËÌäÂê¤Î¤¢¤ëÉôʬ¤ò²òÀ⤷¤Æ¤¯¤ì¤Þ¤¹¡£
Compiling: src/xprintf_avr.c
avr-gcc -c -mmcu=avr128da48 -std=gnu99 -g -gdwarf-2 -Os -mrelax -mcall-prologues -fno-strict-aliasing -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-common -fanalyzer -fno-split-wide-types -fno-tree-scev-cprop -fpack-struct -fshort-enums -Wall -Wstrict-prototypes --param=min-pagesize=0 -Wa,-adhlns=src/xprintf_avr.lst -DCURIOSITY_NANO -DMPU_SUBMODEL=¥"avr128da48¥" -DAPP_VERSION=¥"W.I.P.¥" -DF_CPU=24000000UL -DSECTOR_SEL=UL -I. -I ./inc -I ./lib/ff -MD src/xprintf_avr.c -o src/xprintf_avr.o
src/xprintf_avr.c: In function 'xvprintf':
src/xprintf_avr.c:131:27: warning: 'va_arg' expected 'char *' but received 'long unsigned int' for variadic argument 1 of 'arp' [CWE-686] [-Wanalyzer-va-arg-type-mismatch]
131 | p = va_arg(arp, char*);
| ^
'put_dump': events 1-2
|
| 247 | void put_dump (
| | ^~~~~~~~
| | |
| | (1) entry to 'put_dump'
|......
| 260 | xprintf(PFSTR("%08lX "), addr); /* address */
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (2) calling 'xprintf' from 'put_dump' with 1 variadic argument
|
+--> 'xprintf': events 3-4
|
| 187 | void xprintf ( /* Put a formatted string to the default device */
| | ^~~~~~~
| | |
| | (3) entry to 'xprintf'
|......
| 196 | xvprintf(fmt, arp);
| | ~~~~~~~~~~~~~~~~~~
| | |
| | (4) calling 'xvprintf' from 'xprintf'
|
+--> 'xvprintf': events 5-8
|
| 96 | void xvprintf (
| | ^~~~~~~~
| | |
| | (5) entry to 'xvprintf'
|......
| 108 | if (!c) break; /* End of format? */
| | ~
| | |
| | (6) following 'false' branch (when '__result != 0')...
| 109 | if (c != '%') { /* Pass through it if not a % sequense */
| | ~
| | |
| | (7) ...to here
| | (8) following 'false' branch (when '__result == 37')...
|
'xvprintf': event 9
|
| 113 | c = PGM_READ_BYTE(fmt++); /* Get first char of the sequense */
src/xprintf_avr.c:113:21: note: in expansion of macro 'PGM_READ_BYTE'
| 113 | c = PGM_READ_BYTE(fmt++); /* Get first char of the sequense */
| | ^~~~~~~~~~~~~
|
'xvprintf': event 10
|
| 114 | if (c == '0') { /* Flag: '0' padded */
| | ^
| | |
| | (10) following 'true' branch (when '__result == 48')...
|
'xvprintf': event 11
|
| 115 | f = 1; c = PGM_READ_BYTE(fmt++);
src/xprintf_avr.c:115:36: note: in expansion of macro 'PGM_READ_BYTE'
| 115 | f = 1; c = PGM_READ_BYTE(fmt++);
| | ^~~~~~~~~~~~~
|
'xvprintf': events 12-15
|
| 121 | for (w = 0; c >= '0' && c <= '9'; c = PGM_READ_BYTE(fmt++)) /* Minimum width */
| | ~~~~~~~~~^~~~~~~~~~~
| | |
| | (12) following 'false' branch...
| 122 | w = w * 10 + c - '0';
| 123 | if (c == 'l' || c == 'L') { /* Prefix: Size is long int */
| | ~
| | |
| | (13) ...to here
|......
| 126 | if (!c) break; /* End of format? */
| | ~
| | |
| | (14) following 'false' branch (when 'c != 0')...
|......
| 129 | switch (d) { /* Type is... */
| | ~~~~~~
| | |
| | (15) ...to here
|
'xvprintf': event 16
|
| 131 | p = va_arg(arp, char*);
| | ^
| | |
| | (16) 'va_arg' expected 'char *' but received 'long unsigned int' for variadic argument 1 of 'arp'
|

¤È¤³¤ó¤Ê´¶¤¸¤ËÌäÂê¤Î¸Ä½ê¤ò¾ÜºÙ¤Ë²òÀ⤷¤Æ¤¯¤ì¤Þ¤¹¡£


¡üAVR-EA¥·¥ê¡¼¥º¤ò»È¤Ã¤Æ¤ß¤ë

STM32U0¥Þ¥¤¥³¥óÇã¤Ã¤¿¤Ä¤¤¤Ç¤ËÇã¤Ã¤¿¤Î¤Ç¤¹¤¬AVR64EA28¤âÇã¤Ã¤Æ¤ß¤Þ¤·¤¿¡£
AVR-Dx¥·¥ê¡¼¥º¤È¤ÎºÇÂç¤Î°ã¤¤¤ÏÆâÉô¥ì¥®¥å¥ì¡¼¥¿¤¬Ìµ¤¤¤Î¤ÇÅÅ°µ¤Ë¤è¤êÆ°ºî
²Äǽ¤Ê¥¯¥í¥Ã¥¯¾å¸Â(MAX20MHz)¤¬¤¢¤ë¤³¤È¤Ç¤¹¡£
¤É¤Á¤é¤«¤È¤¤¤¦¤ÈAVRTiny-0/1/2¥·¥ê¡¼¥º¤Ë¶á¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¤Í¡£

¤½¤ó¤Ê¤ï¤±¤ÇAVR64EA28¤ò»ÈÍѤ·¤¿¥×¥í¥¸¥§¥¯¥È¤â¥µ¥¯¤Ã¤Èºî¤Ã¤Æ¤ß¤Þ¤·¤¿¤Î¤Ç
¾Ò²ð¤·¤Þ¤¹¡£1É䴤ȤËLED¤òÅÀÌǤµ¤»¤Ä¤ÄÆâÉô²¹Åٷפθ½ºß²¹ÅÙ¤òUART¤ÇÁ÷½Ð
¤¹¤ë¤¤¤¿¤Ã¤Æ¥·¥ó¥×¥ë¤Ê¹½À®¤Ç¤¹¡£¤Þ¤¡´ðËܤδðËܤǤ¹¤Í¡£


¤È¤³¤í¤ÇAVR-EA¤ÈAVR-DD¤Ï¥Ò¥å¡¼¥ºÀßÄê¤ÇUPDI¤äRESET¥Ô¥ó¤òGPIO¤È¤·¤Æ»ÈÍÑ
¤Ç¤­¤Þ¤¹¤¬GPIO²½¤·¤¿¾õÂÖ¤ÇUPDI¤ò³èÀ­²½¤µ¤»¤ë¤¿¤á¤Ë¤ÏRESET¤Ë¹âÅÅ°µ(HV)¤ò
°õ²Ã¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤Ê¤ªRESET¥Ô¥ó¤ÎÀäÂкÇÂçÄê³Ê¤Ï9V¤Î¤¿¤á¡¢ATTINY202
¤Î»þ¤ß¤¿¤¤¤Ëµ¤·Ú¤Ë12V¤ò°õ²Ä¤·¤Æ¤·¤Þ¤¦¤Èµ¤·Ú¤Ë»à¤Ë¤Þ¤¹Ž¥Ž¥Ž¥(AVR-DD¤âƱ¤¸)¡£

¤¸¤ã¤¡²¿V²Ã¤¨¤¿¤é¤¤¤¤¤Î¤«¤È¤¤¤¦ÏäǤ¹¤¬¥Ç¡¼¥¿¥·¡¼¥È¤Î¤É¤³¤ò¸«¤Æ¤â»ä¤Î
Ǿ¤ß¤½¤Ç¤ÏŬÀÚ¤ÊÅÅ°µ¤Ï¤ï¤«¤é¤º(¤â¤Á¤í¤ó9V¤â¤¢¤«¤ó¤È»×¤¤¤Þ¤¹)¡¢UPDI¤È
RESET¥Ô¥ó¤Ï̵Íý¤ËGPIO¤È¤·¤Æ»ÈÍѤ¹¤ë¤Î¤Ï¤ä¤á¤è¤¦¤È»×¤¤¤Þ¤·¡¢¤¿¡ª

AVR-EA/EB¥·¥ê¡¼¥º¤Ë¾Ü¤·¤¤askn»á¤ÏHV¤ò9V¤è¤ê¤Á¤ç¤Ã¤ÈÄ㤤8.2V¤È
¤µ¤ì¤Æ¤¤¤ë¤è¤¦¤Ç¤¹¤Í¡£

20240624ÄÉ:
AVR64DD28¤Î¥Ç¡¼¥¿¥·¡¼¥È¤¬2024ǯ2·îÉդǹ¹¿·¤µ¤ì¤Æ¤¤¤ë¤Î¤Ëº£¹¹
µ¤¤Å¤¤¤¿¤Î¤Ç¤¹¤¬RESET¹âÅÅ°µ¤ÎÄêµÁ¤¬¤è¤¦¤ä¤¯ÌÀ³Î¤Ëµ­¤µ¤ì¤Æ¤ª¤ê¤Þ¤·¤¿¡Ä¡£

TypÃÍ7.5V¤Ç¤¹¤Ã¤Æ¡Ä¡ª¡ª
²¿¸Î¤³¤ó¤Ê½ÅÍפʾðÊó¤ò²¿Ç¯¤â¸øɽ¤»¤ºÊüÃÖ¤·¤Æ¤¤¤ä¤¬¤Ã¤¿¤Î¤Ç¤·¤ç¤¦¤«(ŽËŽßŽ·ŽËŽßŽ·
AVR-Ex¥·¥ê¡¼¥º¤â¿ʬƱ¤¸´¶¤¸¤Ç¤·¤ç¤¦¤«¤éRESET¹âÅÅ°µ¤Ï7.5V¤¯¤é¤¤¤ò
°õ²Ã¤¹¤ì¤Ð¤¦¤Þ¤¯¤¤¤¯¤È»×¤¤¤Þ¤¹¤¬¤ä¤Ã¤Ñ¤êUPDI¤ÈRESET¥Ô¥ó¤Ï̵Íý¤Ë
GPIO¤È¤·¤Æ»ÈÍѤ¹¤ë¤Î¤Ï¤ä¤á¤è¤¦¤È»×¤¤¤Þ¤·¡¢¤¿¡ª

20240624ÄÉ:
AVR-EB¥·¥ê¡¼¥º¤âRESET¹âÅÅ°µ¤ÎTypÃͤ¬7.5V¤Ç¤·¤¿¡Ä(2023ǯ½©¹¹¿·)
AVR-EA¤Î¥Ç¡¼¥¿¥·¡¼¥È¤â¤µ¤Ã¤µ¤È¹¹¿·¤·¤Æ¤Û¤·¤¤¤ó¤Ç¤¹¤±¤©¡ª¡ª


¡üavrdude v7.3¥ê¥ê¡¼¥¹¡ª¡ª
☝¤Ç½ñ¤¤¤¿AVR-EA¥·¥ê¡¼¥º¤Î¥×¥í¥°¥é¥à¤¬¤Ç¤­¤Þ¤¹¡ª¡ª¡ª(HV½ü¤¯)
ºÇ¿·¤Î¥Ñ¥Ã¥Á¤òÅö¤Æ¤¿WindowsÍѥХ¤¥Ê¥ê¤ò¸ø³«¤·¤Æ¤ª¤ê¤Þ¤¹¤Î¤Ç
¤É¤·¤É¤·¤´ÍøÍѤ¯¤À¤µ¤¤¡ª¡ª¡ª¡ª¡ª



¡üavr-gcc¤Îdelay´Ø¿ô¤ÎÊÑÁ«
avr-gcc¤Ç¤ÏmSec,uSecñ°Ì¤òÂԤĤΤËÊØÍø¤Ê_delay_ms(),_delay_us()
¤È¤¤¤¦Èó¾ï¤ËÊØÍø¤Ê´Ø¿ô¤¬¤¢¤ê¤Þ¤¹¡£¤ª¤½¤é¤¯¤â¤Ã¤È¤â¥Ý¥Ô¥å¥é¡¼¤Ê
´Ø¿ô¤Ç¤¹¤¬¤³¤Î´Ø¿ô¤â¤¤¤í¤ó¤ÊÊÑÁ«¤ò¤¿¤É¤Ã¤Æ¤¤¤Þ¤¹¡£

­¡2005ǯ¤¯¤é¤¤
_delay_ms()¤Ï262.14mSec/F_CPU(MHz)¤Þ¤ÇÀßÄê²Äǽ¡£
°ú¿ô¤Ïdouble¤Ê¤Î¤Ç¼Â¿ô¤â²Äǽ¡£
F_CPU=8000000(8MHz)¤Î¾ì¹ç¡¢32.7675mSec¤Þ¤Ç¤ÏÊݾڤµ¤ì¤ë¡£

_delay_us()¤Ï768uSec/F_CPU(MHz)¤Þ¤ÇÀßÄê²Äǽ¡£
°ú¿ô¤Ïdouble¤Ê¤Î¤Ç¼Â¿ô¤â²Äǽ¡£


­¢2007ǯ¤¯¤é¤¤
_delay_ms()¤Ï262.14mSec/F_CPU(MHz)¤Þ¤ÇÀßÄê²Äǽ
¤½¤ì¤òĶ¤¨¤ë¤È1/10mSec¤ËÀºÅÙ¤¬Íî¤Á¤ë¤¬F_CPU¤ÎÀßÄê¤Ë¤«¤«¤ï¤é¤º
6.5535Sec¤Þ¤ÇÀßÄê²Äǽ¡£

_delay_us()¤Ï768uSec/F_CPU(MHz)¤Þ¤ÇÀßÄê²Äǽ¡£
¤½¤ì¤òĶ¤¨¤ë¤È_delay_ms()¤¬¸Æ¤Ó½Ð¤µ¤ì¤ë¡£

­£2010ǯÁ°È¾¤¯¤é¤¤
__builtin_avr_delay_cycles()¤¬Äɲ䵤줿¡£
__HAS_DELAY_CYCLE¤ò1¤Ë¤·¤ÆºÇŬ²½¥ª¥×¥·¥ç¥ó¤ò-O1°Ê¾å¤Ë¤¹¤ë¤È
__builtin_avr_delay_cycles()¤¬¸Æ¤Ó½Ð¤µ¤ì¤ë¡£
¤³¤Î¾ì¹ç_delay_ms()¤Ï4294967.295mSec/F_CPU(MHz)¤Þ¤ÇÀßÄ꤬²Äǽ¤Ë¤Ê¤ë¡£
F_CPU=8000000(8MHz)¤Î¾ì¹ç¡¢536870.911875mSec¤Þ¤Ç¤ÏÊݾڤµ¤ì¤ë¡£
¤½¤ì°Ê¾å¤ÎÃͤòÀßÄꤷ¤¿¾ì¹ç0mSec¤Ë¤Ê¤ë¡£
_delay_us()¤â4294967.295uSec/F_CPU(MHz)¤Þ¤ÇÀßÄ꤬²Äǽ¤Ë¤Ê¤ë¡£
¤½¤ì°Ê¾å¤ÎÃͤòÀßÄꤷ¤¿¾ì¹ç0uSec¤Ë¤Ê¤ë¡£

¤Þ¤¿¡¢__HAS_DELAY_CYCLE¤ò0¤Ë¤¹¤ë¤â¤·¤¯¤ÏºÇŬ²½¥ª¥×¥·¥ç¥ó¤ò-O0¤Ë
¤·¤¿¾ì¹ç¤Ï­¢¤ÈƱ¤¸¤Ë¤Ê¤ë¡£

13ǯ°ÌÁ°¤ËXMEGA¿¨¤Ã¤¿¤È¤­¤Ë¤³¤ì¤Ë°ú¤Ã¤«¤«¤Ã¤Æ¤·¤Þ¤Ã¤Æ¤Þ¤·¤¿¤Í¡£
¢¨º£¤Ç¤ÏÉÔÍפÊÂнèË¡¤Ç¤¹¤¬

­¤2010ǯ¸åȾ¤¯¤é¤¤
¥³¥ó¥Ñ¥¤¥ë»þ¤Ë__DELAY_ROUND_DOWN__,__DELAY_ROUND_CLOSEST__¤Î
¥¹¥¤¥Ã¥ÁÄɲᣤޤ¿­£¤Îµ¡Ç½¤Ï__DELAY_BACKWARD_COMPATIBLE__¤ò
¥³¥ó¥Ñ¥¤¥é¤ËÅϤ¹¤È­¢¤ÈƱ¤¸¤Ë¤Ê¤ë¤è¤¦¤ËÊѹ¹¡£

­¥2011ǯ¤¯¤é¤¤
­¤¤Ë²Ã¤¨¤Æ"-fno-hosted"¤È"-ffreestanding"¤¬¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó¤Ë
¤¢¤Ã¤¿¾ì¹ç­¢¤ÈƱ¤¸¤Ë¤Ê¤ë¤è¤¦¤ËÊѹ¹¡£


­¦2013ǯ¤¯¤é¤¤
­¢¤Î_delay_us()¤Î_delay_ms()¤ò¸Æ¤Ó½Ð¤¹»ÅÁȤߤ˥¨¥ó¥Ð¥°¤µ¤ì¤Æ¤·¤Þ¤¦¡ª

­§2020ǯ¤¯¤é¤¤
­¦¤Î¥Ð¥°¤è¤¦¤ä¤¯½¤Àµ¤µ¤ì¤ë(¤¬¡¢GCC13¤Þ¤Ç¼è¤ê¹þ¤Þ¤ì¤Æ¤¤¤Ê¤«¤Ã¤¿)


¤Ê¤ó¤Èº£²ó¤ÎAVR-GCC14¤¯¤é¤¤¤Þ¤Ç10ǯ¤¯¤é¤¤¥Ð¥°¤¬ÊüÃÖ¤µ¤ì¤Æ¤¤¤¿¤Î
¤Ç¤¹¤¬Æüì¤Ê»È¤¤Êý¤ò¤·¤Ê¤¤¸Â¤ê¤Ïï¤âƧ¤Þ¤Ê¤«¤Ã¤¿¤È»×¤¤¤Þ¤¹¤Î¤Ç
¤¿¤Ö¤óÂç¾æÉפÀ¤È»×¤¤¤Þ¤·¤¿¡ª
¤Í¤à¤¤¤µ¤ó¤Ï¤ª¤â¤¤¤¯¤½Æ§¤ó¤Ç¤·¤Þ¤¤¤Þ¤·¤¿¡ª¡ª£±¡ª¡ª¡ª

¤Á¤Ê¤ß¤Ë¶ñÂÎŪ¤Ê¥³¡¼¥É¤ÎÊÑÁ«¤Ï¤³¤Á¤é¤Ç¸«¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£



¤È¤¤¤¦¤ï¤±¤Ç¤´¤Á¤ã¤´¤Á¤ã¤È½ñ¤­¤Þ¤·¤¿¤¬2024ǯ¸½ºßGCC14¤ò»ÈÍѤ¹¤ë
__builtin_avr_delay_cycles()¸Æ¤Ó½Ð¤¹Êý¼°¤Çdelay¤·¤¿¤¤¾ì¹ç¤Ï¡Ä

¡¦"-fno-hosted"¤È"-ffreestanding"¤ò¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó¤Ë²Ã¤¨¤Ê¤¤
¡¦ºÇŬ²½¥ª¥×¥·¥ç¥ó¤Ï-O1°Ê¾å¤Ë¤¹¤ë

¤Ç¤ª¤Ã¤±¡¼¤Ç¤¹¡£´Êñ¤Ë¸«¤¨¤ë´Ø¿ô¤â¤·¤Ã¤«¤êÃæ¿ÈÍý²ò¤·¤Æ¤Ê¤¤¤È
»×¤ï¤Ì¤È¤³¤í¤Ç¥Ï¥Þ¤Ã¤Æ¤·¤Þ¤¦¤È¤¤¤¦¤ªÏäǤ·¤¿¡£


º£²ó¤Î½¤Àµ¤ò²Ã¤¨¤¿¤Í¤à¤¤¤µ¤ó¤ÎAVR·Ï¤Î¥×¥í¥¸¥§¥¯¥È¤ò¹¹¿·¤·¤Þ¤·¤¿¤Î¤Ç
¶½Ì£¤¬¤¢¤ëÊý¤Ï¤´»²¹Í¤Ë¡Ä
*ATTINY202
*AVR-Dx
*AVR-EA
*ATXMEGA128A1/A1U

½©·îȯÇäµ­Ç°¡ªAVR64DD28¤ò»È¤Ã¤Æ¤ß¤ë¡ª

¤¢¤±¤Þ¤·¤Æ¤ª¤á¤Ç¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£

º£Ç¯¤ÏºÇ½é¤«¤éºÒÆñ³¤­¤Ç¤´¤¶¤¤¤Þ¤¹¤¬¡¢¤Ç¤­¤ë¤³¤È¤òÀº°ìÇÕ´èÄ¥¤Ã¤Æ
¤Þ¤¤¤ê¤Þ¤·¤ç¤¦¡ª¡ª


º£²ó¤ÏºòǯËö¤Ë½©·îÅÅ»ÒÄ̾¦¤«¤éÈÎÇ䤵¤ì¤¿AVR-DD¥·¥ê¡¼¥º¤Î
ºÇÂçÍÆÎÌÉʤǤ¢¤ëAVR64DD28
¤Î¾Ò²ð¤ò¤·¤Æ¤¤¤³¤¦¤È»×¤¤¤Þ¤¹¡£


AVR-DD¥·¥ê¡¼¥º¤ÏAVR-DB¥·¥ê¡¼¥º¤Î¾®µ¬Ìϲ½¤·¤¿¥Ç¥Ð¥¤¥¹¤È¤Ê¤ê¤Þ¤¹¡£
DxCore¤ÎÉʼïÈæ³Óɽ¤¬¤ï¤«¤ê¤ä¤¹¤¤¤Ç¤¹¡£¤Þ¤¿DB¥·¥ê¡¼¥º¤Ç¸ºß¤·¤¿
¥¨¥é¥Ã¥¿¤¬¤¤¤¯¤Ä¤«½¤Àµ¤µ¤ì¤Æ¤¤¤ë¤Î¤âÆÃħ¤Ç¤¹¡£

´ðËÜŪ¤Êµ¡Ç½¤ÏAVR-DB¤ò°ú¤­·Ñ¤¤¤Ç¤¤¤Þ¤¹¤Î¤ÇAVR64DD28¤Ï¸½»þÅÀ¤Ç
Èó¾ï¤Ë»È¤¤¾¡¼ê¤¬¤è¤¤AVR¤È¤Ê¤ê¡¢¾­ÍèŪ¤Ë¤ÏATMega328P¤òÃÖ¤­´¹¤¨¤Æ
¤¤¤¯¤³¤È¤Ç¤·¤ç¤¦¡£

¡üAVR64DD28¤Î¥×¥í¥°¥é¥à¥á¥â¥ê¹½À®¤Èrodata¤Î¼è¤ê°·¤¤¤Ë¤Ä¤¤¤Æ
AVR-Dx¥·¥ê¡¼¥º¤Ï¥Ç¡¼¥¿Îΰè¤Ë¥×¥í¥°¥é¥àÎΰè¤Î°ìÉô¤¬¥Þ¥Ã¥Ô¥ó¥°
¤µ¤ì¤Æ¤ª¤ê¡¢LPMÌ¿Îá¤ò»ÈÍѤ·¤Ê¤¤¤Ç¤âÄ̾ï¤ÎLDÌ¿Î᤬»ÈÍѲÄǽ¤Ê
Îΰ褬¸ºß¤·¤Æ¤ª¤ê¤Þ¤¹¡£


AVR64DD28¤Ë¤ª¤¤¤Æ¤Ï64kByte¤¢¤ë¥×¥í¥°¥é¥à¥á¥â¥ê¤Î¸åȾ32kByteʬ¤¬
¥Ç¡¼¥¿Îΰè¤Ë¥Ç¥Õ¥©¥ë¥È¤Ç¥Þ¥Ã¥Ô¥ó¥°¤µ¤ì¤Æ¤ª¤ê¤Þ¤¹¡£»ÄÇ°¤Ê¤¬¤é
64KByteÉʤǤÏÁ´Îΰè¤È¤Ï¤Ê¤é¤ºÈ¾Ê¬¤Î32kByteʬ¤È¤Ê¤ê¤Þ¤¹¡£
32kByte°Ê²¼¤ÎÍÆÎÌÉʤǤÏÁ´Îΰ褬¥Þ¥Ã¥Ô¥ó¥°¤µ¤ì¤Æ¤ª¤ê¤Þ¤¹¡£


¤Á¤Ê¤ß¤ËNVM¥â¥¸¥å¡¼¥ë¤ÎCTRLB¥ì¥¸¥¹¥¿¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç¸åȾ32kByteʬ
¤Î¥Þ¥Ã¥Ô¥ó¥°ÀßÄê¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤¿¤áÄ̾ï»È¤¤¤Î¾ì¹ç¤ÏÆäËÀßÄê¤Ï
ÉÔÍפǸåȾ32kByteʬ¤Ï¥Ç¡¼¥¿Îΰè¤È¤·¤Æ¥¢¥¯¥»¥¹¤Ç¤­¤ë¤ï¤±¤Ç¤¹¡£


¤¬¡ª




AVR128DA48¤È¤«AVR128DB28¤ò»È¤Ã¤¿¤È¤­¤Ë¤âƱ¤¸²òÀâ¤ò¤·¤Æ¤ª¤ê¤Þ¤¹¤¬¡¢
AVR64DD28¤È¤¤¤¦¤«AVR-Dx¥·¥ê¡¼¥º¤Î64kByte°Ê¾å¤Î¥Õ¥é¥Ã¥·¥åÍÆÎ̤Î
Éʼï¤Ç¤Ï²¿¤â¹Í¤¨¤Ê¤¤¤Ç¥Ó¥ë¥É¤¹¤ë¤Èavr-gccÆâ¤Ë¥Ó¥ë¥É¥¤¥ó¤µ¤ì¤¿
¥Ç¥Õ¥©¥ë¥È¤Î¥ê¥ó¥«¥¹¥¯¥ê¥×¥È(AVR64DD28¤Ç¤Ïavrxmega2.xn)¤òÁªÂò¤·¤Æ
¤·¤Þ¤¦¤¿¤á¡¢¾åµ­¤Î¤è¤¦¤Ê¥Ç¡¼¥¿Îΰè¤Î¥Þ¥Ã¥Ô¥ó¥°¤ò°Õ¼±¤·¤Ê¤¤¥á¥â¥ê¤Î
¼è¤ê°·¤¤¤ò¤·¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
¤³¤ì¤Ç¤ÏµìAVRÀ½ÉʤΤ褦¤ËÌÌÅݤÊPROGMEM¤¬É¬ÍפȤʤäƤ·¤Þ¤¤¤Þ¤¹¡£


¤Í¤à¤¤¤µ¤ó¤Ï64KByteÃæ¸åȾ32kByte¤òrodata¤È¤¹¤ë¤è¤¦¤ÊÆÃÊ̤ʥê¥ó¥«
¥¹¥¯¥ê¥×¥È¤òºîÀ®¤·¤ÆPROGMEM»È¤ï¤Ê¤¯¤Æ¤âSTM32¤ß¤¿¤¤¤ËÉáÄ̤Ëconst¤ò
¼è¤ê°·¤¨¤ë¤è¤¦¤Ë¤·¤Æ¤ß¤Þ¤·¤¿¡£
¤Þ¤¡AVR¤È¤·¤Æ¤Ï¥×¥í¥°¥é¥àÎΰè32kByte¤ÈrodataÎΰè32kByte¤Ï½½Ê¬¤¹¤®¤ë
¹­¤µ¤È¤Ê¤ë¤Ç¤·¤ç¤¦¡Á
¥×¥í¥¸¥§¥¯¥ÈÃæ¤Ë¤â¤¢¤ê¤Þ¤¹¤¬°ì±þ»ä¤¬ºî¤Ã¤¿¥ê¥ó¥«¥¹¥¯¥ê¥×¥ÈŽ¤Ã¤Æ¤ª¤­¤Þ¤¹¡£

/* Script for -n */
/* Copyright (C) 2014-2023 Free Software Foundation, Inc.
Copying and distribution of this script, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. */
OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
OUTPUT_ARCH(avr:102)
__TEXT_REGION_ORIGIN__ = DEFINED(__TEXT_REGION_ORIGIN__) ? __TEXT_REGION_ORIGIN__ : 0;
__DATA_REGION_ORIGIN__ = DEFINED(__DATA_REGION_ORIGIN__) ? __DATA_REGION_ORIGIN__ : 0x802000;
__TEXT_REGION_LENGTH__ = DEFINED(__TEXT_REGION_LENGTH__) ? __TEXT_REGION_LENGTH__ : 1024K;
__DATA_REGION_LENGTH__ = DEFINED(__DATA_REGION_LENGTH__) ? __DATA_REGION_LENGTH__ : 0xffa0;
__EEPROM_REGION_LENGTH__ = DEFINED(__EEPROM_REGION_LENGTH__) ? __EEPROM_REGION_LENGTH__ : 64K;
__FUSE_REGION_LENGTH__ = DEFINED(__FUSE_REGION_LENGTH__) ? __FUSE_REGION_LENGTH__ : 1K;
__LOCK_REGION_LENGTH__ = DEFINED(__LOCK_REGION_LENGTH__) ? __LOCK_REGION_LENGTH__ : 1K;
__SIGNATURE_REGION_LENGTH__ = DEFINED(__SIGNATURE_REGION_LENGTH__) ? __SIGNATURE_REGION_LENGTH__ : 1K;
__USER_SIGNATURE_REGION_LENGTH__ = DEFINED(__USER_SIGNATURE_REGION_LENGTH__) ? __USER_SIGNATURE_REGION_LENGTH__ : 1K;
__RODATA_PM_OFFSET__ = DEFINED(__RODATA_PM_OFFSET__) ? __RODATA_PM_OFFSET__ : 0x8000;
MEMORY
{
text (rx) : ORIGIN = __TEXT_REGION_ORIGIN__, LENGTH = __TEXT_REGION_LENGTH__-32K
rodata (rx) : ORIGIN = __TEXT_REGION_LENGTH__-32K, LENGTH = 32K
data (rw!x) : ORIGIN = __DATA_REGION_ORIGIN__, LENGTH = __DATA_REGION_LENGTH__
eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = __EEPROM_REGION_LENGTH__
fuse (rw!x) : ORIGIN = 0x820000, LENGTH = __FUSE_REGION_LENGTH__
lock (rw!x) : ORIGIN = 0x830000, LENGTH = __LOCK_REGION_LENGTH__
signature (rw!x) : ORIGIN = 0x840000, LENGTH = __SIGNATURE_REGION_LENGTH__
user_signatures (rw!x) : ORIGIN = 0x850000, LENGTH = __USER_SIGNATURE_REGION_LENGTH__
}
SECTIONS
{
/* Read-only sections, merged into text segment: */
.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) }
/* Internal text space or external memory. */
.text :
{
*(.vectors)
KEEP(*(.vectors))
/* For data that needs to reside in the lower 64k of progmem. */
*(.progmem.gcc*)
/* PR 13812: Placing the trampolines here gives a better chance
that they will be in range of the code that uses them. */
. = ALIGN(2);
__trampolines_start = . ;
/* The jump trampolines for the 16-bit limited relocs will reside here. */
*(.trampolines)
*(.trampolines*)
__trampolines_end = . ;
/* avr-libc expects these data to reside in lower 64K. */
*libprintf_flt.a:*(.progmem.data)
*libc.a:*(.progmem.data)
*(.progmem.*)
. = ALIGN(2);
/* For code that needs to reside in the lower 128k progmem. */
*(.lowtext)
*(.lowtext*)
__ctors_start = . ;
*(.ctors)
__ctors_end = . ;
__dtors_start = . ;
*(.dtors)
__dtors_end = . ;
KEEP(SORT(*)(.ctors))
KEEP(SORT(*)(.dtors))
/* From this point on, we do not bother about whether the insns are
below or above the 16 bits boundary. */
*(.init0) /* Start here after reset. */
KEEP (*(.init0))
*(.init1)
KEEP (*(.init1))
*(.init2) /* Clear __zero_reg__, set up stack pointer. */
KEEP (*(.init2))
*(.init3)
KEEP (*(.init3))
*(.init4) /* Initialize data and BSS. */
KEEP (*(.init4))
*(.init5)
KEEP (*(.init5))
*(.init6) /* C++ constructors. */
KEEP (*(.init6))
*(.init7)
KEEP (*(.init7))
*(.init8)
KEEP (*(.init8))
*(.init9) /* Call main(). */
KEEP (*(.init9))
*(.text)
. = ALIGN(2);
*(.text.*)
. = ALIGN(2);
*(.fini9) /* _exit() starts here. */
KEEP (*(.fini9))
*(.fini8)
KEEP (*(.fini8))
*(.fini7)
KEEP (*(.fini7))
*(.fini6) /* C++ destructors. */
KEEP (*(.fini6))
*(.fini5)
KEEP (*(.fini5))
*(.fini4)
KEEP (*(.fini4))
*(.fini3)
KEEP (*(.fini3))
*(.fini2)
KEEP (*(.fini2))
*(.fini1)
KEEP (*(.fini1))
*(.fini0) /* Infinite loop after program termination. */
KEEP (*(.fini0))
/* For code that needs not to reside in the lower progmem. */
*(.hightext)
*(.hightext*)
*(.progmemx.*)
. = ALIGN(2);
/* For tablejump instruction arrays. We do not relax
JMP / CALL instructions within these sections. */
*(.jumptables)
*(.jumptables*)
_etext = . ;
} > text
.data :
{
PROVIDE (__data_start = .) ;
*(.data)
*(.data*)
*(.gnu.linkonce.d*)
. = ALIGN(2);
_edata = . ;
PROVIDE (__data_end = .) ;
} > data AT> text
.bss ADDR(.data) + SIZEOF (.data) : AT (ADDR (.bss))
{
PROVIDE (__bss_start = .) ;
*(.bss)
*(.bss*)
*(COMMON)
PROVIDE (__bss_end = .) ;
} > data
__data_load_start = LOADADDR(.data);
__data_load_end = __data_load_start + SIZEOF(.data);
/* Global data not cleared after reset. */
.noinit ADDR(.bss) + SIZEOF (.bss) : AT (ADDR (.noinit))
{
PROVIDE (__noinit_start = .) ;
*(.noinit .noinit.* .gnu.linkonce.n.*)
PROVIDE (__noinit_end = .) ;
_end = . ;
PROVIDE (__heap_start = .) ;
} > data
.rodata :
{
*(.rodata)
*(.rodata*)
*(.gnu.linkonce.r*)
} > rodata
.eeprom :
{
/* See .data above... */
KEEP(*(.eeprom*))
__eeprom_end = . ;
} > eeprom
.fuse :
{
KEEP(*(.fuse))
KEEP(*(.lfuse))
KEEP(*(.hfuse))
KEEP(*(.efuse))
} > fuse
.lock :
{
KEEP(*(.lock*))
} > lock
.signature :
{
KEEP(*(.signature*))
} > signature
.user_signatures :
{
KEEP(*(.user_signatures*))
} > user_signatures
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) }
.note.gnu.build-id : { *(.note.gnu.build-id) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1. */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions. */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2. */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2. */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions. */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* DWARF 3. */
.debug_pubtypes 0 : { *(.debug_pubtypes) }
.debug_ranges 0 : { *(.debug_ranges) }
/* DWARF 5. */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.debug_sup 0 : { *(.debug_sup) }
}

¤³¤ì¤òLDFLAGS¤Ë¿©¤ï¤»¤Æ¤ä¤ì¤Ð¤³¤Á¤é¤¬Í¥À褵¤ì¤Æ¾åµ­¤Î¤è¤¦¤Ë¥á¥â¥ê¤¬
ÇÛÃÖ¤µ¤ì¤ë»ÅÁȤߤˤʤäƤ¤¤Þ¤¹¡£¾ÜºÙ¤Ï»ä¤Î¥×¥í¥¸¥§¥¯¥ÈÆâmakefile¤Î
274¹ÔÌܤ¢¤¿¤ê¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£

¤Í¤à¤¤¤µ¤ó¼°¥ê¥ó¥«¥¹¥¯¥ê¥×¥È
data¥»¥¯¥·¥ç¥ó¤Î»ÈÍÑÎΰ褬¸º¤ê¤Þ¤·¤¿¡£¤µ¤é¤ËrodataÎΰè¤Ë
Æɤ߼è¤êÀìÍѤΥǡ¼¥¿¤¬³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤Þ¤¹¡£
Memory region         Used Size  Region Size  %age Used
text: 2796 B 32 KB 8.53%
rodata: 144 B 32 KB 0.44%
data: 144 B 8 KB 1.76%
eeprom: 0 GB 256 B 0.00%
fuse: 0 GB 16 B 0.00%
lock: 0 GB 1 KB 0.00%
signature: 0 GB 1 KB 0.00%
user_signatures: 0 GB 1 KB 0.00%
°ìÊý¥Ç¥Õ¥©¥ë¥È¥ê¥ó¥«¥¹¥¯¥ê¥×¥È¤Î¥á¥â¥ê»ÈÍÑÎΰè¤Ï¡Ä
data¥»¥¯¥·¥ç¥ó¤Ë¼è¤é¤ì¤Æ¤·¤Þ¤¤ÌµÂ̤˥á¥â¥êÎΰè¤ò°µÇ÷¤·¤Æ¤Þ¤¹¡£
Memory region         Used Size  Region Size  %age Used
text: 2940 B 64 KB 4.49%
data: 288 B 8 KB 3.52%
eeprom: 0 GB 256 B 0.00%
fuse: 0 GB 16 B 0.00%
lock: 0 GB 1 KB 0.00%
signature: 0 GB 1 KB 0.00%
user_signatures: 0 GB 1 KB 0.00%




20240123ÄÉ:
GCC14¤Ç¤Ï¥³¥ó¥Ñ¥¤¥ë»þ¤Î¥¹¥¤¥Ã¥Á¤Ç¥ê¥Þ¥Ã¥×¤ËÂбþ¤¹¤ë¤è¤¦¤Ç¤¹¡ª¡ª¡ª
¤³¤¦¤´´üÂÔ¡ª¡ª¡ª

20240123ÄÉ:



¡üAVR64DD28¸þ¤±¤Î¥Ð¥¤¥Ê¥ê¤òAVR-GCC¤Ç¥Ó¥ë¥É¤¹¤ëÊýË¡
¿ôǯÁ°¤«¤é¤ªÅÁ¤¨¤·¤Æ¤¤¤ëÄ̤ꡢavr-gcc¤ÇAVR64DD28¤È¤«¤ÎºÇ¿·¤ÎÉʼï¤ò
¥Ó¥ë¥É¤¹¤ë¤¿¤á¤Ë¤Ï¼«Ê¬¤Ç¥ª¥Ö¥¸¥§¥¯¥È¤È¤«¥Ç¥Ð¥¤¥¹ÄêµÁ¥Õ¥¡¥¤¥ë¤ò
Äɲ䷤Ƥä¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£º£²ó¤Ïavr-gcc¤ÎƳÆþ¤«¤é²þ¤á¤Æ²òÀ⤷¤Æ
¤¤¤³¤¦¤È»×¤¤¤Þ¤¹¡£64bitÈÇWindows10´Ä¶­²¼¤òÁÛÄꤷ¤Æ¤ª¤ê¤Þ¤¹¡£


1.Windows¸þ¤±avr-gcc¤ò¼èÆÀ¤¹¤ë
Zak's Electronics Blog¤Î"AVR-GCC 13.2.0 for Windows"¤ò¥À¥¦¥ó¥í¡¼¥É
¤·¤Þ¤¹¡£GCC¤¬ºÇ¿·¤Î13.2.0¤È¤Ê¤Ã¤Æ¤ª¤ê¤Þ¤¹¤¬ÆÃÉ®¤¹¤Ù¤­¤Ï¥Ó¥ë¥É¥¤¥ó
¤µ¤ì¤¿¥ê¥ó¥«¥¹¥¯¥ê¥×¥È¤Ë"__DATA_REGION_ORIGIN__"¤¬Äɲ䵤ì¤ë¤è¤¦¤Ë
¤Ê¤Ã¤¿¤Î¤Ç¤¹¤¬¤³¤ì¤á¤Ã¤Á¤ã½ÅÍפʽ¤Àµ¤Ê¤Î¤Çɬ¤º13.2.0¤Î¥Ð¥¤¥Ê¥ê¤ò
»ÈÍѤ¹¤ë¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡ª¡ª


¤Í¤à¤¤¤µ¤ó¤Î´Ä¶­¤Ç¤ÏARM³«È¯´Ä¶­¤ËÊï¤Ã¤Æ²¼µ­¥Ç¥£¥ì¥¯¥È¥ê¤ËŸ³«¤·¤Þ¤¹¡£
C:¥Devz¥AVR¥avr-gcc



avr-gcc¥Ç¥£¥ì¥¯¥È¥êÆâ¤Ï¤³¤¦¤Ê¤ê¤Þ¤¹¡£
¤Þ¤¿make¤Î¸Æ¤Ó½Ð¤·Êý¤ÏARM¤È¤Þ¤Ã¤¿¤¯¶¦Ä̤ʤΤÇARM¥Þ¥¤¥³¥ó¤Î¥Ó¥ë¥É
´Ä¶­¹½ÃÛË¡
¤ÎCoreutils¤ÎÀßÄê¤ò»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£


2.Microchip¤Î¥µ¥¤¥È¤«¤éDeviceFamilyPacks(DFP)¤ò¼èÆÀ¤¹¤ë
¤³¤Ã¤«¤é¤¬¤À¤¤¤ÖÌÌÅݤǤ¹¡£"Microchip Packs Repository"¤«¤é
"Microchip AVR-Dx Series Device Support"¤ò¥À¥¦¥ó¥í¡¼¥É¤·¤Þ¤¹¡£
³ÈÄ¥»Ò¤¬atpack¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¤¬¼ÂÂÖ¤Ïzip°µ½Ì¥Õ¥¡¥¤¥ë¤Ç¤¹¡£
°Ê²¼7z¤Î»ÈÍѤòÁÛÄꤷ¤Æ¿Ê¤á¤Æ¤¤¤­¤Þ¤¹¡£

3.DFP¤«¤é¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤È¤«¥Ç¥Ð¥¤¥¹ÄêµÁ¥Õ¥¡¥¤¥ëÃê½Ð¤·¤ÆÄɲÃ
a.¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤ÎÄɲÃ
°µ½Ì¥Õ¥¡¥¤¥ëÆâ¤Î"¥include"¤Ë¿Ê¤ß¤Þ¤¹¡£

"C:¥Devz¥AVR¥avr-gcc¥avr¥include"Æâ¤Ëavr¥Õ¥©¥ë¥À¤ò¥³¥Ô¡¼¤·¤Þ¤¹¡£

b.device-specs¤ÎÄɲÃ
°µ½Ì¥Õ¥¡¥¤¥ëÆâ¤Î"¥gcc¥dev¥avr64dd28"¤È¿Ê¤ß¤Þ¤¹¡£

"C:¥Devz¥AVR¥avr-gcc¥lib¥gcc¥avr¥13.2.0"Æâ¤Ëdevice-specs¥Õ¥©¥ë¥À¤ò
¥³¥Ô¡¼¤·¤Þ¤¹¡£

c.¥¹¥¿¡¼¥È¥¢¥Ã¥×¥Õ¥¡¥¤¥ë¤ÎÄɲÃ

"C:¥Devz¥AVR¥avr-gcc¥avr¥lib"Æâ¤Ëavrxmega2¥Õ¥©¥ë¥À¤ò¥³¥Ô¡¼¤·¤Þ¤¹¡£

¤¢¤¢¤¢¤á¤ó¤É¤¯¤µ¤¤¡Ä
¤È¤Ë¤«¤¯¤³¤ì¤ÇÁ°½àÈ÷¤¬½ª¤ï¤ê¤Þ¤·¤¿¡Ä

¤Û¤«¤ÎÉʼï¤Ç¤â¤³¤ÎÁàºî¤ò¹Ô¤¦¤³¤È¤Ë¤è¤Ã¤ÆºÇ¿·¤ÎAVR¤¬¥Ó¥ë¥É¤Ç¤­¤Þ¤¹¡£





¤½¤ì¤Ç¤Ï²þ¤á¤Æ¤Í¤à¤¤¤µ¤ó¤Î¥×¥í¥¸¥§¥¯¥È¤Î¾åµ­¤ÎÉôʬ¤òavr64dd28¤Ë¤·¤Æ
¥Ó¥ë¥É¤·¤Þ¤¹¡£

¤Á¤ã¤ó¤ÈÀßÄ꤬¤Ç¤­¤Æ¤¤¤¿¤é¥Ó¥ë¥É¤¬»Ï¤Þ¤ê¡Ä

¤¹¤°½ª¤ï¤Ã¤¿¡Ä


½ñ¤­¹þ¤ß¤Ïavrdude¤ò»ÈÍѤ·¤Þ¤¹¡£
½ñ¤­¹þ¤ßÊýË¡¤Ï¤³¤Á¤é¤ÎserialUPDI¤Îµ­»ö¤ò»²¹Í¤Ë¡Ä



¥×¥í¥°¥é¥à¤ÏAVR128DA/DB¤È¶¦Ä̤ǥǥХ¤¥¹¤Î¸ÇÍ­¥·¥ê¥¢¥ëÈÖ¹æ¤òɽ¼¨
¤·¤¿¸å1É䴤Ȥ˥Á¥Ã¥×²¹ÅÙ¤òUART¤ÇÁ÷½Ð¤¹¤ë¤â¤Î¤Ç¤¹¡£
ADC¤ÈUART(¥Î¥ó¥Ö¥í¥Ã¥­¥ó¥°)¤ò»ÈÍѤ·¤Æ¤ª¤ê¤Þ¤¹¡£
¥Á¥Ã¥×ñÂΤǤǤ­¤ë´ðËÜŪ¤Ê¤³¤È¤òÌÖÍ夷¤Æ¤ª¤ê¤Þ¤¹¡£





º£²ó¤â¤°¤À¤°¤À¤È¤·¤¿ÆâÍƤˤʤäƤ·¤Þ¤¤¤Þ¤·¤¿¤¬¡¢¤Í¤à¤¤¤µ¤ó¤Î
¤Ö¤í¤°¤ò¸«¤Æ¤ë¿Í¤Ï¤Í¤à¤¤¤µ¤ó¤è¤êµ»½ÑÎϤ¬¹â¤¤Êý¤Ð¤Ã¤«¤ê¤Ê¤Î¤Ç
¿ʬÍý²ò¤·¤Æ¤¯¤ì¤ÆÂç¾æÉפÀ¤È»×¤¤¤Þ¤¹¡Ä


¤½¤ó¤Ê¤ï¤±¤Ç¤³¤ó¤Ê´¶¤¸¤ÇÀº¤¤¤Ã¤Ñ¤¤¤¬¤à¤Ð¤Ã¤Æ¤¤¤³¤¦¤È»×¤¤¤Þ¤¹¡Ä!

XMEGA¤ò»È¤Ã¤Æ¤ß¤ë6 -¤É¤¦¤·¤Æ¤â³°ÉÕ¤±SRAM¤Ä¤±¤¿¤«¤Ã¤¿¤Î¤Ç-

¡üXMEGA¤è¡¢¤ä¤Ï¤ê¤ªÁ°¤òµß¤¤¤¿¤¤
º£¤«¤éÌó10ǯÁ°¡¢¤Í¤à¤¤¤µ¤ó¤ÏXMEGA¤ò¤¤¤¸¤Ã¤Æ¤ª¤ê¤Þ¤·¤¿¤¬FatFs¤ò¼ÂÁõ¤·¡¢
SPI¤ÎDMA²½¤ÇÎÏ¿Ô¤­¤Þ¤·¤¿¡£¤Û¤ó¤È¤Ï256kByte¤¯¤é¤¤¤ÎSRAM¤ò³°ÉÕ¤±¤·¤¿¤ê
¤·¤Æ¤ä¤ê¤¿¤«¤Ã¤¿¤Î¤Ç¤¹¤¬»ÄÇ°¤Ê¤¬¤éÅö»þ¹ØÆþ¤·¤¿ATXMEGA128A1¤Ç¤Ï¥Á¥Ã¥×
ñÂΤǤÏEBI¤ò4PORTSRAM¥â¡¼¥É¤ÇÆ°ºî¤µ¤»¤Æ¤â¥¢¥É¥ì¥¹¥Ð¥¹¤ËÅö¤¿¤ë°ìÉô¤Î
¥Ô¥ó¤¬³°Éô¤Ë½Ð¤Æ¤ª¤é¤º¡¢SRAM¤òÆ°ºî¤»¤·¤á¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£
(¥¢¥É¥ì¥¹¤¬1¤Ä¤À¤±¤Ç¤è¤¤TFT-LCD¤È¤«¤Ê¤é¤Ê¤ó¤ÎÌäÂê¤â¤Ê¤¤)

¤½¤Î¸åUSBµ¡Ç½ÉÕ¤­¤ÎATXMEGA128A1U¤¬Åо줷¡¢¥¢¥É¥ì¥¹¥Ð¥¹¤òÊ̤Υݡ¼¥È¤Ë
³ä¤êÅö¤Æ¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤È¤Î¤³¤È¤ÇÆþ¼ê¤»¤ó¤È»î¤ß¼ºÇÔ¤·¤¿¤Î¤¬Á°²ó¤Ç¤¹¡£

¤³¤ÎȾƳÂÎÉÔ­¤Ç²¿¤È¤«¼ê¤ËÆþ¤ì¤é¤ì¤Ê¤¤¤â¤Î¤«¤È»×°Æ¤·¤¿·ë²Ì¡¢ÉôÉʤ¬
¤À¤á¤Ê¤éÀ½ÉʤòÇ㤨¤Ð¤è¤¤¡ª
¤È»ê¤Ã¤Æµ×¡¹¤ËAliexpress¤Ç¤ªÇ㤤ʪ¤ò¤·¤Þ¤·¤¿¡£




MCUZONEÀ½¤ÎATXMEGA128A1U¥Ü¡¼¥É¡£
USB¥Ö¡¼¥È¥í¡¼¥À¤Ï¤Á¤ã¤ó¤ÈÆ°¤¤¤¿¤Î¤ÇËÜʪ¤Ç¤·¤¿!


¿µ½Å¤Ë¥Á¥Ã¥×¤ò¤Ï¤¬¤·¤ÆºÜ¤»Âؤ¨¤Æ¤ß¤Þ¤·¤¿¡£


¤Á¤Ê¤ß¤ËATXMEGA128A1¤Î¥É¥¢¥Ã¥×¼Ì¿¿¤ò¡£


¥ª¥ê¥¸¥Ê¥ëATXMEGA128A1


Ææ¤Î½Ä¤¸¤Þ¤¬¤¢¤ë¤Ñ¤Á¤â¤ó¡£
ATXMEGA128A1U¤Ç¤Ï¤Ê¤¯ATXMEGA128A1¤ò¥ê¥Þ¡¼¥¯¤·¤¿¤â¤Î¡£


ËÜʪ¤ÎATXMEGA128A1U¡ª



¡ü³°ÉÕ¤±SRAM

º£²ó»ÈÍѤ¹¤ë³°ÉÕ¤±¤ÎSRAM¤Ï8bit¥Ð¥¹,2Mbit(256kByte)¤Î
CY7C1010DV33-10ZSXI¤Ç¤¹¡£
10ǯ°Ê¾åÁ°¤Ë¥Ç¥¸¥­¤Ç¤«¤Ã¤Æ±öÄÒ¤±¤Ë¤·¤Æ°ÊÍè¤Î³èÌö¤Ç¤¹¡£À½Â¤¥á¡¼¥«¤Î
Cypress¤Ï¤¹¤Ç¤ËInfineon¤Ë¿©¤Ù¤é¤ì¤Æ¤·¤Þ¤Ã¤Æ¤¤¤Þ¤¹¤Í¡£



SRAM¤âÉÕ¤±¤¿XMEGA´ðÈĤÎɽ΢¤Ï¤³¤ó¤Ê´¶¤¸¤Ç¤¹¡Ä
ÆóÅ٤ȥХ¹¤ÎÇÛÀþ¤È¤«¤ä¤ê¤Þ¤»¤ó¤è¤â¤¦¡ª



¡ü²óÏ©¤È¥³¡¼¥É


¤¹¤ß¤Þ¤»¤ó²óÏ©¿Þ¤á¤ó¤É¤¯¤µ¤¯¤Æ10ǯÁ°¤«¤é½ñ¤¤¤Æ¤Þ¤»¤ó¤¬³ä¤ê¿¶¤êɽ¤Ï¤¢¤ë¤Î¤Ç
¤Þ¤Í¤µ¤ì¤ëÊý¤Ï¤½¤ì¤ò»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
TFT-LCD¶îÆ°ÍѤËCS0¤ò¤Ä¤«¤Ã¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë¤Î¤ÇSRAM¤ÏCS1¤È¤·¤Þ¤¹¡£


³°ÉÕ¤±SRAMÍÑ4Port-EBI¤ÎÀßÄê¤Ç¤¹¡£¼Â¹Ô¤¹¤ë´Ø¿ô¤Ïmain´Ø¿ô¤è¤êÁ᤯¼Â¹Ô¤·¤¿
¤Û¤¦¤¬Îɤ¤¤Î¤Ç".init5"¥»¥¯¥·¥ç¥ó¤ËÇÛÃÖ¤·¤Þ¤¹¡£


EBI¤ÎÀßÄê¤Î¤Û¤«¤ËheapÎΰè¤Ï³°ÉôRAM¤Ç¹Ô¤¨¤ë¤è¤¦¤Ëheap¤Î½é´üÀßÄê¤â¹Ô¤¤¤Þ¤¹¡£
__malloc_heap_start__malloc_heap_end¤ËheapÎΰè¤ò¼¨¤¹¥¢¥É¥ì¥¹¤òÂåÆþ¤·¤Þ¤¹¡£
__malloc_heap_end¤Ã¤Æ¤Ê¤ó¤Ç¸ÇÄêÃÍ0xFFFF¤Ê¤Î¤«¤Ë¤Ä¤¤¤Æ¤ÏºÇ¸å¤Ë²òÀ⤷¤Þ¤¹


¤Þ¤¿¡¢¾åµ­¤Î¥³¡¼¥É¤Ç½ñ¤¤¤Æ¤¢¤Ã¤¿ÊÑ¿ô"__extram_end"¤Ï¥ê¥ó¥«¥¹¥¯¥ê¥×¥ÈÆâ¤Ç
ÄêµÁ¤·¤Þ¤¹¡£¥³¡¼¥ÉÆâ¤ÇÃͤÎÀßÄê¤ò¹Ô¤¦¤È¤­¤Ï&¤ò˺¤ì¤º¤Ë¡£


°Ê¾å¤Ç³°ÉÕ¤±SRAM¤ò»È¤¦½àÈ÷¤¬¤Ç¤­¤Þ¤·¤¿¡£


¡üÆ°¤¤¤¿¡ª¡Ä¤·¤«¤·


ºÜ¤»Âؤ¨¤¿XEGA¤Ë¥×¥í¥°¥é¥à¤ò½ñ¤­¹þ¤ßFatfs¤ÎÆ°ºî¤ò³Îǧ¤Ç¤¹¡£
¥Á¥Ã¥×¥ê¥Ó¥¸¥ç¥ó¤ÏATXMEGAA1U¤ò¼¨¤¹'L'¤Ë¤Ê¤Ã¤Æ¤Þ¤¹¤Í¡£


malloc¤ÇÎΰè³ÎÊݤ·¤¿¤ê¤Á¤ã¤ó¤È¤Ç¤­¤Æ¤Þ¤¹¤Í¡ú



ÆÃÉ®¤¹¤ëÅÀ¤ÏFatFs¤ÎžÁ÷¥¹¥Ô¡¼¥É¤Ç¤¹¡ª
Æâ¢RAM¤Ï8kByte¤·¤«¤Ê¤¤¤Î¤ÇžÁ÷ÍѤΥХåե¡¤â¾¯¤·¤·¤«¼è¤ì¤ºDMA¤Î
²¸·Ã¤Ëͤ«¤ì¤Ê¤«¤Ã¤¿¤Î¤Ç¤¹¤¬¡¢³°ÉÕ¤±¤Ç32kByte¤È¤Ã¤Æ¤ä¤ë¤ÈÃÇÁ³°ã¤¤¤Þ¤¹¡ª
¤³¤ì¤À¤±¤Ç¤â¤ï¤¶¤ï¤¶ATXMEGA128A1U¤ò¼ê¤ËÆþ¤ì¤¿¹ÃÈ夬¤¢¤ê¤Þ¤·¤¿¡ª

¤·¤«¤·¡Ä

¡üΩ¤Á¤Ï¤À¤«¤ë16bit¤ÎÊÉ

¤µ¤Æ¡¢¾å¤Ç¤µ¤é¤Ã¤È½Ò¤Ù¤Þ¤·¤¿¤¬²¿¤â¹Í¤¨¤Ê¤¤¤ÇÆâ¢RAM¤Î¤è¤¦¤Ëµ¤·Ú¤Ë»ÈÍÑ
¤Ç¤­¤ë¤Î¤Ï¥á¥â¥ê¤Î¥¢¥É¥ì¥¹¤¬0xFFFF¤Þ¤Ç¤Ç¤¹¡£¤Ä¤Þ¤êºÇÂç¤Ç¤â64kByte¤Þ¤Ç
¤·¤«¤À¤á¤Ç¤¹¡£º£²ó¤ÎºîÎã¤Ç¤Ï¥á¥â¥ê¥¢¥É¥ì¥¹0x005000¤«¤é³«»Ï¤·¤Æ¤¤¤ë¤Î¤Ç
0xFFFF-0x5000=0xAFFF¤Ç¡¢10¿Ê¿ô¤Ë¼£¤¹¤È45055Byteʬ¤·¤«³Ú¤Ë»È¤¨¤Þ¤»¤ó¡£

¤½¤³¤«¤éÀè¤ÎÀ¤³¦¤ËƧ¤ß½Ð¤½¤¦¤È¤¹¤ë¤È10ǯ°Ê¾åÁ°¤ËƬ¤òÊú¤¨¤¿24bit¥¢¥É¥ì¥¹ÌäÂê¤Ë
ľÌ̤¹¤ë¤³¤È¤È¤Ê¤ê¤Þ¤¹¡£»ä¤ÎºîÎã¤Ç¤Ï°ì±þ24bit¥¢¥É¥ì¥¹¥¢¥¯¥»¥¹¥ë¡¼¥Á¥ó¤â
¥Æ¥¹¥È¤Î°ìÉô¤È¤·¤ÆÆþ¤ì¤Æ¤ª¤ê¤Þ¤¹¡£DMA¤Ë´Ø¤·¤Æ¤ÏºÇ½é¤Ã¤«¤é24bitʬ¥ì¥¸¥¹¥¿¤¬
ÍÑ°Õ¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç¿´ÇۤϤ¢¤ê¤Þ¤»¤ó¡£

¤È¤¤¤¦¤ï¤±¤Ç¤¬¤ó¤à¤Ð¤Ã¤Æ256kByte¤ÎSRAM¤¯¤Ã¤Ä¤±¤Æ¤¿¤Î¤¬¤Ä¤±¤Æ¤«¤é64KByteʬ
¤¯¤é¤¤¤·¤«ÆÀ¤·¤Ê¤¤¤³¤È¤òµ¤¤Å¤¤¤Æ¤·¤Þ¤¤¤Þ¤·¤¿¤¬10ǯÍè¿´¤ËÊú¤¨Â³¤±¤Æ¤¤¤¿¤â¤Î¤Ë
·èÃå¤ò¤Ä¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤·¤¿¡£

À¤´Ö¤ÏUPDI¤ÊAVR-DB¥·¥ê¡¼¥º¤Ë°Ü¹Ô¤·¤Æ¤¤¤ëÃæ¤ÇÀ¹Âç¤Ê´ó¤êÆ»¤ò¤·¤Æ
¤·¤Þ¤¤¤Þ¤·¤¿¤¬º£²óƬ¤òÓ¹¤é¤»¤¿·Ð¸³¤Ï¤­¤Ã¤ÈÌò¤ËΩ¤Ä¤Ç¤·¤ç¤¦¡Á♨
(¤ä¤Ð¤¤»×ÁۤˤϤޤäƤ¤¤ëÌܤÇ)¡£


º£²ó¤ÎÀ®²Ì¤òÈ¿±Ç¤·¤¿¤â¤Î¤ò¤ª¤­¤Ñ¤Ë¤ª¤¤¤Æ¤ª¤­¤Þ¤¹¡£
˺¤ì¤¿¤³¤í¤ËXMEGA¿¨¤ë¿Í¤Ë¾¯¤·¤¯¤é¤¤Ìò¤ËΩ¤Ä¤È´üÂÔ¤·¤Æ¤ª¤ê¤Þ¤¹¡£

ATTINY202(¤È¤½¤Î¾)¤ò»È¤Ã¤Æ¤ß¤ë3 -UPDIÆṉ̃ÌäÂê²ò·è¤Î·ï-

¡ü»ä¤ÎÃæ¤ÇUPDIÆṉ̃ÌäÂê¤Ë½ª»ßÉ䤬¡ª¡ª
¿·¤·¤¤À¤Âå¤ÎAVR¥·¥ê¡¼¥º¤Ï½¾Í褫¤é¤ÎISP,JTAG,PDI,TPI,dWire¤È¤Ï
Á´¤¯ÊÌ¤Î¥×¥í¥°¥é¥ß¥ó¥°¡¦¥Ç¥Ð¥Ã¥°¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹(UPDI)¤È¤Ê¤Ã¤Æ
¤¤¤ë¤Î¤Ï¤´Â¸¤¸¤ÎÄ̤꤫¤È»×¤¤¤Þ¤¹¡£
¤Í¤à¤¤¤µ¤ó¤âPDI,TPI¤Þ¤Ç¤Ï¼ê»ý¤Á¤Î¥Ç¥Ð¥Ã¥¬¡¦¥é¥¤¥¿¥Ï¡¼¥É¥¦¥¨¥¢¤Ç
¤Ç²¿¤È¤«¤·¤Î¤²¤Æ¤¤¤¿¤Î¤Ç¤¹¤¬UPDI¤Ë´Ø¤·¤Æ¤Ï»ÔÈΤÎɾ²Á´ðÈĤ«¤éÀþ¤ò°ú¤­½Ð¤·¤Æ
¤½¤ì¤ËÂбþ¤·¤¿ÆÃÊ̤Êavrdude¤ò»ÈÍѤ·¤ÆÃã¤òÂù¤·¤Æ¤ª¤ê¤Þ¤·¤¿
¡£

¤½¤·¤Æ¤½¤Î¸å¤ËpyUPDI¤È¤¤¤¦COM¥Ý¡¼¥È¤ÎÄÌ¿®¤À¤±¤ÇUPDI¤Î
¥×¥í¥°¥é¥ß¥ó¥°¤ò¤ª¼ê·Ú¤Ë¤Ç¤­¤ëÂåʪ¤¬À¤¤Ë¹­¤Þ¤Ã¤Æ¤¤¤­¡¢
Ó˸ơĤ³¤ì¤¬avrdude¤Ë¤â¼ÂÁõ¤µ¤ì¤¿¤é¤Ê¤¡¡Ä
¡Ä¤È¤º¤Ã¤È´ê¤Ã¤Æ¤ª¤ê¤Þ¤·¤¿¤¬º£Ç¯¤ËÆþ¤Ã¤Æ¤Ä¤¤¤Ë¡ª¤Ä¤¤¤Ë!
¤½¤ì¤¬¼Â¸½¤·¤Þ¤·¤¿¡ª¡ª


¡ü¥Ï¡¼¥É¥¦¥¨¥¢¤òÍÑ°Õ¤¹¤ë
avrdude¤Ïsvn¤«¤égit¤Ë°Ü¹Ô¤·¤¿»þ¤«¤éµ´¤Î¤è¤¦¤ÊÀª¤¤¤Çfix¤¬Æþ¤ê¤Þ¤¯¤ê
Æü¡¹À®Ä¹¤ò¹­¤²¤Æ¤ª¤ê¤Þ¤¹¡£¤Í¤à¤¤¤µ¤ó¤âgit¤«¤é¥¯¥í¡¼¥ó¤·¤¿¤ä¤Ä¤«¤é
¥Ó¥ë¥É¤·¤Æ»î¤·¤Æ¤ß¤Þ¤·¤¿¡£¤Ê¤ªº£²ó¾Ò²ð¤¹¤ë¤ª¼ê·ÚCOM¥Ý¡¼¥ÈUPDI¤Ï
avrdudeÆâ¤Ç¤Ïserialupdi¤È¸Æ¤Ð¤ì¤Æ¤¤¤ë¤Î¤Ç°Ê²¼¤½¤ì¤ËÊ襤¤Þ¤¹¡£


»ÈÍѤ¹¤ëCOM¥Ý¡¼¥È¤Ë¤Ä¤¤¤Æ¤ÏUSB¥·¥ê¥¢¥ëÊÑ´¹¥Á¥Ã¥×¤¬ÌÞÏÀ»ÈÍѤǤ­¤Þ¤¹¡£
°ÂʪÃæ²Ú¥Á¥Ã¥×¤Ç¤â¤½¤ì¤Ê¤ê¤ËÆ°¤­¤Þ¤¹¤¬5V¥È¥ì¥é¥ó¥È¤ä¹â¤¤¥Ü¡¼¥ì¡¼¥È¤¬
Êݾڤµ¤ì¤Æ¤ëFTDI·Ï¤Î¤â¤Î¤¬¤ä¤Ï¤ê°Â¿´¤Ç¤¹¡£
(Ãí¡§¸å½Ò¤·¤Þ¤¹¤¬FTDI¤Ë´Ø¤·¤Æ¤Ï¥Ç¥Ð¥¤¥¹¥É¥é¥¤¥Ð¤ÎÀßÄêɬ¿Ü)

¤Í¤à¤¤¤µ¤ó¤Ï☝¼Ì¿¿¤Î½©·îÀ½¤ÎFT23x¥â¥¸¥å¡¼¥ë¤ò°¦ÍѤ·¤Æ¤¤¤Þ¤¹¡£



¤½¤·¤ÆUPDI¼Â¸½¤Î¤¿¤á¤ÎÄɲåϡ¼¥É¥¦¥¨¥¢¤Ï¤¿¤Ã¤¿¤³¤ì¤À¤±¡ª
AVR¦¤ÎÅŸ»¤ÏÊ̸ý¤«¤é¤È¤ë¤³¤È¤òÁÛÄꤷ¤Æ¤ª¤ê¤Þ¤¹¡£¤Þ¤¿¡¢FT234x¤Ê¤é
+5V¿®¹æ¤ò¼õ¤±¤é¤ì¤ë¤Î¤Ç¡¢3.3~5V¤ÎÈϰϤʤé¤ÐÅÅ°µ¥ì¥Ù¥ëÊÑ´¹¤Ê¤É¤Î
¹Íθ¤âÉÔÍפǤ¹¡£


¤³¤ó¤Ê´¶¤¸¤Ç¥æ¥Ë¥Ð¡¼¥µ¥ë´ðÈĤΤ­¤ì¤Ã¤Ñ¤ò»ÈÍѤ·¤Æ¥³¥Í¥¯¥¿¤ÈÉôÉʤò
¼ÂÁõ¤·¤ÆæÃå²Äǽ¥¢¥À¥×¥¿¡¼·Á¼°¤Ë¤·¤Æ¤ß¤Þ¤·¤¿¡£



¡ü¼ÂºÝ¤Ë»È¤Ã¤Æ¤ß¤è¤¦

¤Þ¤º¤Ï»ä¤â»È¤Ã¤Æ¤¤¤ëATTINY202¤ò»ÈÍѤ·¤Þ¤·¤ç¤¦¡£¤Á¤Ê¤ß¤Ëºòǯ²Æ°Ì¤Ë
pyUPDI¤¬¸øɽ¤µ¤ì¤Æ¤«¤éUPDI¤Î¥Ï¡¼¥É¥ë¤¬°ìµ¤¤Ë²¼¤¬¤Ã¤¿¤»¤¤¤«½©·î¤Ç°ì½Ö¤Ç
Çä¤êÀÚ¤ì¤Æ¤·¤Þ¤·¤¿¤¬È¾Æ³ÂÎÉÔ­¤ÎÇȤâĶ¤¨º£¤Ç¤Ï°ÂÄꤷ¤ÆÆþ¼ê²Äǽ¤È¤Ê¤Ã¤Æ
¤¤¤Þ¤¹¤¬¤¿¤¯¤µ¤óÇ㤤¤¹¤®¤ë¤Ê¤è¡ª

avrdude¤Ï¤Í¤à¤¤¤µ¤óÆÃÀ½¥Ó¥ë¥É¤Î¤â¤Î¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£ºÇ¿·¤Î¥³¥ß¥Ã¥È¤Î¤Û¤«¤Ë
avrftdi¤Î¥Ð¥°¤Î½¤Àµ¤äLUFA¤ÎAVRISP2¥¨¥ß¥å¤ÎÉÔ¶ñ¹ç½¤Àµ¥Ñ¥Ã¥Á¤â¤¢¤Æ¤Æ¤¤¤Þ¤¹¡£


avrdude¤ËÍ¿¤¨¤ë¥Ï¡¼¥É¥¦¥¨¥¢Ì¾¤Ï"serialupdi"¡¢»ÈÍѤ¹¤ë¥Ý¡¼¥È¤Ï
¾åµ­¤Î¤è¤¦¤Ë"COM"+"¥Ý¡¼¥ÈÈÖ¹æ"¤È¥Ü¡¼¥ì¡¼¥È¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£



¤È¤½¤ÎÁ°¤Ë¡ª
FTDI·Ï¤Î¥Á¥Ã¥×¤ò»ÈÍѤ¹¤ëºÝ¤Ï¥É¥é¥¤¥Ð¤ÎÀßÄê(¥Ç¥Ð¥¤¥¹¥Þ¥Í¡¼¥¸¥ã¤«¤é
COM¥Ý¡¼¥È¤Î¥×¥í¥Ñ¥Æ¥£->¾ÜºÙÀßÄê)¤ÇBM¥ª¥×¥·¥ç¥ó¤ÎÂÔ¤Á»þ´Ö¤ò1mSec¤Ë
¤·¤Ê¤¤¤ÈËÜÍè¤Î¥¹¥Ô¡¼¥É¤¬½Ð¤Þ¤»¤ó¡£

¤³¤ì²¿¤«¤È¤¤¤¦¤ÈFTDI·Ï¤ÏÁ÷¿®¥Ð¥Ã¥Õ¥¡¤¬¤½¤ì¤¾¤ì¤Î¥Ç¥Ð¥¤¥¹¤Î¾å¸Â¤Ë
㤷¤¿¤éUSBžÁ÷³«»Ï¤â¤·¤¯¤Ï¾åµ­ÂÔ¤Á»þ´Ö(latency_timer¤È¤¤¤¦)¤Î»þ´Ö¤¬
²á¤®¤¿¤é¤È¤ê¤¢¤¨¤ºUSBžÁ÷¤¹¤ë»ÅÍͤȤʤäƤª¤ê¡¢ºÇ¾®¤Î1mSec¤Ë¤¹¤ì¤Ð
USB¥Õ¥ë¥¹¥Ô¡¼¥É¤Î1¥Õ¥ì¡¼¥à´Ö³Ö(1mSec)¤Ç¤È¤Ë¤«¤¯·ä´Ö¤Ê¤¯Å¾Á÷¤µ¤ì¤ë
¤³¤È¤Ë¤Ê¤êCPU¥Ñ¥ï¡¼¤Ï¿©¤¤¤Þ¤¹¤¬¾¯Î̤ΥХ¤¥È¿ô¤ÎžÁ÷¤Î¾ì¹ç¤Ë¸úΨ¤¬
Îɤ¯¤Ê¤ê¤Þ¤¹¡£

jtag2updi¤Î¥µ¥¤¥È¤Ë¿¼¤¤µ­½Ò¤¬¤¢¤ë¤Î¤Ç¤³¤Á¤é¤â½ÏÆɤ·¤Æ¤¯¤À¤µ¤¤¡£

> "C:¥Devz¥Coreutils¥bin¥make.exe" program
C:/Devz/AVR/avrdude/avrdude -v -p attiny202 -P com3 -b230400 -c serialupdi -U flash:w:main.hex

avrdude: Version 6.99-20211218
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch

System wide configuration file is "C:/Devz/AVR/avrdude/avrdude.conf"

Using Port : com3
Using Programmer : serialupdi
Overriding Baud Rate : 230400
avrdude: serial_baud_lookup(): Using non-standard baud rate: 230400 AVR Part : ATtiny202
RESET disposition : dedicated
RETRY pulse : SCK
Serial program mode : yes
Parallel program mode : yes
Memory Detail :

Block Poll Page Polled
Memory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 61 61 0 0 0 0x00 0x00
sernum 0 0 0 0 no 10 1 0 0 0 0x00 0x00
osccal16 0 0 0 0 no 2 1 0 0 0 0x00 0x00
osccal20 0 0 0 0 no 2 1 0 0 0 0x00 0x00
tempsense 0 0 0 0 no 2 1 0 0 0 0x00 0x00
osc16err 0 0 0 0 no 2 1 0 0 0 0x00 0x00
osc20err 0 0 0 0 no 2 1 0 0 0 0x00 0x00
fuses 0 0 0 0 no 9 10 0 0 0 0x00 0x00
fuse0 wdtcfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse1 bodcfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse2 osccfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse4 tcd0cfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse5 syscfg0 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse6 syscfg1 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse7 append 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse8 bootend 0 0 0 0 no 1 1 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 1 0 0 0 0x00 0x00
data 0 0 0 0 no 0 1 0 0 0 0x00 0x00
userrow usersig 0 0 0 0 no 32 32 0 0 0 0x00 0x00
flash 0 0 0 0 no 2048 64 0 0 0 0x00 0x00
eeprom 0 0 0 0 no 64 32 0 0 0 0x00 0x00

Programmer Type : serialupdi
Description : SerialUPDI

avrdude: UPDI link initialization OK
avrdude: NVM type 0: 16-bit, page oriented write
avrdude: Entering NVM programming mode
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% -0.00s

avrdude: Device signature = 0x1e9123 (probably t202)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (1592 bytes):

Writing | ################################################## | 100% 0.36s

avrdude: 1592 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: input file main.hex auto detected as Intel Hex

Reading | ################################################## | 100% 0.14s

avrdude: 1592 bytes of flash verified
avrdude: Leaving NVM programming mode

avrdude done. Thank you.


> Process Exit Code: 0
> Time Taken: 00:02

æÀþ¤·¤Þ¤·¤¿¤¬½ñ¤­¹þ¤ß¤Ï¤³¤ó¤Ê´¶¤¸¤Ç¤¹¡£
ATTINY202¤ÏROMÍÆÎ̤¬¾¯¤Ê¤¤¤Î¤ÇÁᤤ¤Î¤«ÃÙ¤¤¤Î¤«¤è¤¯¤ï¤«¤ê¤Þ¤»¤ó¤¬¡Ä



¤Ç¤ÏAVR128DB28¤Ç12kByte¤¯¤é¤¤¤Î¥Ð¥¤¥Ê¥ê¤ò½ñ¤­¹þ¤ó¤Ç³Î¤«¤á¤Æ¤ß¤¿
curiocity nano¤ÎmDBG
> "C:¥Devz¥Coreutils¥bin¥make.exe" program
C:/Devz/AVR/avrdude/avrdude -v -p avr128db28 -P usb -c pkobn_updi -U flash:w:main.hex

avrdude: Version 6.99-20211218
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch

System wide configuration file is "C:/Devz/AVR/avrdude/avrdude.conf"

Using Port : usb
Using Programmer : pkobn_updi
avrdude: Found CMSIS-DAP compliant device, using EDBG protocol
AVR Part : AVR128DB28
RESET disposition : dedicated
RETRY pulse : SCK
Serial program mode : yes
Parallel program mode : yes
Memory Detail :

Block Poll Page Polled
Memory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 125 125 0 0 0 0x00 0x00
tempsense 0 0 0 0 no 2 1 0 0 0 0x00 0x00
sernum 0 0 0 0 no 16 1 0 0 0 0x00 0x00
fuses 0 0 0 0 no 9 16 0 0 0 0x00 0x00
fuse0 wdtcfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse1 bodcfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse2 osccfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse4 tcd0cfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse5 syscfg0 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse6 syscfg1 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse7 codesize 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse8 bootsize 0 0 0 0 no 1 1 0 0 0 0x00 0x00
lock 0 0 0 0 no 4 1 0 0 0 0x00 0x00
userrow usersig 0 0 0 0 no 32 32 0 0 0 0x00 0x00
data 0 0 0 0 no 0 1 0 0 0 0x00 0x00
flash 0 0 0 0 no 131072 512 0 0 0 0x00 0x00
eeprom 0 0 0 0 no 512 1 0 0 0 0x00 0x00

Programmer Type : JTAGICE3_UPDI
Description : Curiosity nano (nEDBG) in UPDI mode
ICE HW version : 0
ICE FW version : 1.21 (rel. 37)
Serial number : MCHP3280031800001375
Vtarget : 3.31 V
PDI/UPDI clock Xmega/megaAVR : 100 kHz

avrdude: Partial Family_ID returned: "AVR "
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% -0.00s

avrdude: Device signature = 0x1e970e (probably avr128db28)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (12076 bytes):

Writing | ################################################## | 100% 3.75s

avrdude: 12076 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: input file main.hex auto detected as Intel Hex

Reading | ################################################## | 100% 2.06s

avrdude: 12076 bytes of flash verified

avrdude done. Thank you.


> Process Exit Code: 0
> Time Taken: 00:07

serialupdi
> "C:¥Devz¥Coreutils¥bin¥make.exe" program
C:/Devz/AVR/avrdude/avrdude -v -p avr128db28 -P com3 -b230400 -c serialupdi -U flash:w:main.hex

avrdude: Version 6.99-20211218
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch

System wide configuration file is "C:/Devz/AVR/avrdude/avrdude.conf"

Using Port : com3
Using Programmer : serialupdi
Overriding Baud Rate : 230400
avrdude: serial_baud_lookup(): Using non-standard baud rate: 230400 AVR Part : AVR128DB28
RESET disposition : dedicated
RETRY pulse : SCK
Serial program mode : yes
Parallel program mode : yes
Memory Detail :

Block Poll Page Polled
Memory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 125 125 0 0 0 0x00 0x00
tempsense 0 0 0 0 no 2 1 0 0 0 0x00 0x00
sernum 0 0 0 0 no 16 1 0 0 0 0x00 0x00
fuses 0 0 0 0 no 9 16 0 0 0 0x00 0x00
fuse0 wdtcfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse1 bodcfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse2 osccfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse4 tcd0cfg 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse5 syscfg0 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse6 syscfg1 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse7 codesize 0 0 0 0 no 1 1 0 0 0 0x00 0x00
fuse8 bootsize 0 0 0 0 no 1 1 0 0 0 0x00 0x00
lock 0 0 0 0 no 4 1 0 0 0 0x00 0x00
userrow usersig 0 0 0 0 no 32 32 0 0 0 0x00 0x00
data 0 0 0 0 no 0 1 0 0 0 0x00 0x00
flash 0 0 0 0 no 131072 512 0 0 0 0x00 0x00
eeprom 0 0 0 0 no 512 1 0 0 0 0x00 0x00

Programmer Type : serialupdi
Description : SerialUPDI

avrdude: serial_baud_lookup(): Using non-standard baud rate: 230400avrdude: UPDI link initialization OK
avrdude: NVM type 2: 24-bit, word oriented write
avrdude: Entering NVM programming mode
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% -0.00s

avrdude: Device signature = 0x1e970e (probably avr128db28)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (12076 bytes):

Writing | ################################################## | 100% 0.85s

avrdude: 12076 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: input file main.hex auto detected as Intel Hex

Reading | ################################################## | 100% 0.78s

avrdude: 12076 bytes of flash verified
avrdude: Leaving NVM programming mode

avrdude done. Thank you.


> Process Exit Code: 0
> Time Taken: 00:05


>curiocity nano¤ÎmDBG
·×7ÉÃ
>serialupdi
·×5ÉÃ
¤¢¤ì¡Ä¥¤¥±¤Æ¤ë¤¸¤ã¤Ê¤¤¤Ç¤¹¤«¡Ä¡ù
¤·¤«¤â½ã¿è¤Ê½ñ¤­¹þ¤ß»þ´Ö¤À¤±¸«¤¿¤é3.75secÂÐ0.85Sec¤Ç°µ¾¡¤Ç¤¹¤Í¡ª

¤È¤¤¤¦¤ï¤±¤Ç¼ÂÁ©¤Ç¤â·ë¹½»È¤¨¤ëUSB¥·¥ê¥¢¥ë¤Èavrdude¤ò»È¤Ã¤¿
¤ª¼ê·ÚUPDI¤Ï¤³¤ì¤«¤éÇúȯŪ¤Ëή¹Ô¤Ã¤Æ¤¯¤ë¤È¤ª¤â¤¤¤Þ¤¹¡ª
¤Í¤à¤¤¤µ¤ó¤¬µ­»ö¤Ë¤·¤¿¤»¤¤¤ÇATTINY202¤Îºß¸Ë¤¬¤Þ¤¿ÀÚ¤ì¤Æ
¤·¤Þ¤¦¤«¤â¤·¤ì¤Ê¤¤¤Î¤Ç²¿ÅÙ¤â¸À¤¤¤Þ¤¹¤¬°ì¿Í¤ÇÇ㤤Àê¤á¤Á¤ã¥À¥á¤À¥¾¡ª


¡ùserialupdiÂбþ¤Îavrdude-windows32bit¥Ð¥¤¥Ê¥ê¤Ï¤³¤Á¤é¡ù

ºß¸ËÉü³èµ­Ç°¡ª¡ªATTINY202¤ò¸Â³¦¤Þ¤Ç»È¤¤Åݤ¹¡ª

¡üATTINY202ÉüŽ¯³èŽ¯¡ª
¥×¡¼¥Á¥ó¤¬ÆÍÁ³¤±¤©¤Ã¤Æ´é¿¿¤ÃÀ֤ˤ·¤Æ¥¦¥¯¥é¥¤¥Ê¤Ë¿¯¹¶¤·¤Æ¤«¤é
ȾƳÂΤÎǼ´ü¤¬¤µ¤é¤Ë°­²½¤¹¤ëÃû¤·¤ò¸«¤»¤ä¤¬¤Ã¤Æ¤ª¤ê¤Þ¤¹¤¬¡¢¤½¤ÎÃæ¤Ç
ATTINY202¤Îºß¸Ë¤¬½©·îÅÅ»ÒÄ̾¦¤µ¤ó¤ËÉü³è¤·¤Þ¤·¤¿¡ª¡ª

¤Ê¤ó¤«20±ßÃ;夬¤ê¤·¤Æ¤ëµ¤¤¬¤·¤Þ¤¹¤¬¤¿¤Ö¤óµ¤¤Î¤»¤¤¤Ç¤·¤ç¤¦¡Ä
¤½¤ó¤Ê¤³¤Èµ¤¤Ë¤¹¤ë¤è¤êºß¸Ë¤¬Éü³è¤¹¤ë¤Î¤¬Ä¶½ÅÍ×»ö¹à¤Ê¤Î¤Ç¤¹¡ª¡ª¡ª¡ª

°·¤¤¤¬Èó¾ï¤Ë´Êñ¤«¤ÄÈó¾ï¤Ë°Â²Á¤Ë»È¤¤¤Þ¤ï¤»¤ë¤Î¤ÇÍÍ¡¹¤Ê
¥·¡¼¥ó¤Ç³èÌö¤·¤Æ¤¤¤¯¤³¤È¤Ç¤·¤ç¤¦¡ª¡ª


¡ü¤Æ¤¤¤¦¤ï¤±¤Ç¤Í¤à¤¤¤µ¤ó¤âËܹøÆþ¤ì¤Æ»È¤Ã¤Æ¤ß¤Þ¤·¤¿
ºòǯ¤Ë¤Ê¤Ã¤ÆATTINY202¤Î¥Ý¥Æ¥ó¥·¥ã¥ë¤Ëµ¤ÉÕ¤¤¤¿Êý¡¹¤¬ÇúÇ㤤¤ËÁö¤ê
µ¤¤Å¤¤¤¿»þ¤Ë¤Ï¤¹¤Ã¤«¤é¤«¤ó¤È¤Ê¤Ã¤Æ¤ª¤ê¤Þ¤·¤¿¡£¤Í¤à¤¤¤µ¤ó¤â¤Á¤ç¤Ã¤È
Æ°¤«¤·¤ÆËþ­¤·¤Æ¤Û¤Ã¤Ý¤Ã¤Æ¤¤¤Þ¤·¤¿¤¬
¾¤ÎÊý¤Î»ÈÍÑÎã¤Ë»É·ã¤µ¤ì¤Æ
ATTINY202¤ÎROMÍÆÎ̸³¦¤Þ¤Ç»È¤Ã¤Æ¤ß¤Þ¤·¤¿¡ª¡ª¡ª


¤Ê¤ª,ATTINY202¤Ï¥á¥â¥ê¥ê¥½¡¼¥¹¤¬Èó¾ï¤Ë¾¯¤Ê¤¤¤Ç¤¹¡Ä¡£
ROM:2048Byte
RAM:128Byte


¤Í¤à¤¤¤µ¤ó¤¤¤Ä¤âSTM32H7Åù¤ÎÂçÍÆÎÌ¥á¥â¥ê¤ò°·¤Ã¤Æ¤¿¤Î¤Ç¥Ñ¥ï¡¼¥²¡¼¥à¤Ë
´·¤ì¤­¤Ã¤Æ¤·¤Þ¤Ã¤¿¤»¤¤¤«µÕ¤Ë¾¯¤Ê¤¤¥ê¥½¡¼¥¹¤Î¥Þ¥¤¥³¥ó¤Ï¿·Á¯¤Ë´¶¤¸¤Þ¤¹¡£

»ä¤Î¥â¥Ã¥È¡¼¤È¤·¤Æ¤Ï
£±¡¥¥¹¥¿¥Ã¥¯¤ò¹Íθ¤·¤ÆRAM¤Ï¤Ê¤ë¤Ù¤¯»ÈÍѤ·¤Ê¤¤¡£
£²¡¥ROM¤â¥á¥â¥êÍÆÎÌ°µ½Ì¤·¤Ä¤Ä¥®¥Ã¥Á¥®¥Á¤Ë»È¤¦


¤Ç¹¶¤á¤Æ¤ß¤Þ¤¹¡ª

¡üºîÎã1¡§1-Wire²¹¼¾ÅÙ·×
²áµî¤ËSTM32G0¤ò»ÈÍѤ·¤¿¤È¤­¤ÎAosongÀ½AM2322B¤òº£²ó¤âºÎÍѤ·¤Æ
½ÐÎϤòUART¤«¤éÅǤ¯¤è¤¦¤Ê¥×¥í¥°¥é¥à¤òºî¤Ã¤Æ¤ß¤Þ¤·¤¿¡ª


ROMÍÆÎ̤Ï2037Byte....2048¥Ð¥¤¥È¤Þ¤Ç10¥Ð¥¤¥È¼å¡Ä¤³¤ì¤ÏŽ·ŽÞŽØŽ·ŽÞŽØ


-fno-split-wide-types¤ò¥³¥á¥ó¥È¥¢¥¦¥È¤·¤Æ¤ß¤Þ¤·¤¿¡Ä
2¥Ð¥¤¥Èºï¸º¡Ä¤â¤Ï¤ä¿ô¥Ð¥¤¥È¤ÎÀ襤¡ª


´Ø¿ôÆÍÆþ»þ¤Î¥×¥í¥í¡¼¥°/¥¨¥Ô¥í¡¼¥°¥ë¡¼¥Á¥ó¤ò¤¢¤é¤«¤¸¤áºî¤Ã¤ÆROMÍÆÎ̤ò
ºï¸º¤¹¤ë¸ú²Ì¤¬¤¢¤ë-mcall-prologues¤ò¤¢¤¨¤Æ¥³¥á¥ó¥È¥¢¥¦¥È¡ª
»ÈÍѤ¹¤ë´Ø¿ô¤¬¤´¤¯¾¯¤Ê¤¤¾ì¹ç¤ÏµÕ¤Ë¥³¥á¥ó¥È¥¢¥¦¥È¤·¤¿¤Û¤¦¤¬ROMÍÆÎ̤¬
¸º¤Ã¤Æ¤ªÆÀ¤Ç¤¹¡ù¤³¤ì¤Ç2027¥Ð¥¤¥È¡Ä¤Þ¤¡¤³¤ì¤Ç¤è¤¤¤Ç¤·¤ç¤¦¡Ä¡ª

¤Ê¤ª¡¢XMEGA¤È¤«¤Ç¤³¤Î¥ª¥×¥·¥ç¥ó¤Á¤ã¤ó¤ÈÉÕ¤±¤Æ¤Ê¤¤¤È³Î¼Â¤ËÍÆÎ̤¬
ËĤì¾å¤¬¤Ã¤ÆÇú»à¤·¤Þ¤¹☠



Æ°¤¤¤¿¤È¤³¤í¤Ï¤³¤ó¤Ê´¶¤¸¤Ç¤¹¡£
Æ⢥¯¥í¥Ã¥¯¤¬20MHz¤â¤¢¤ë¤Î¤Ç230400bps¤Ç¤â;͵¤Ç¤¹¡ù


¡üºîÎã2:2-Wire¤ÇÄêÈÖLCD(IC:HD44780)¤òÆ°¤«¤¹
¤¹¤Ç¤ËI2C¤Ç¥­¥ã¥é¥¯¥¿±Õ¾½Æ°¤«¤¹¥Í¥¿¤Ï¤Û¤«¤Î¿Í¤¬¤ä¤Ã¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë¤Î¤Ç
¤Ò¤Í¤¯¤ì¼Ô¤Î¤Í¤à¤¤¤µ¤ó¤Ï11ǯÁ°¤Î̵Íý¤ä¤ê¤¹¤®¤ë¤ä¤Ä¤ò¤ä¤Ã¤Æ¤ß¤Þ¤·¤¿¡ª
SUNLIKEÀ½¤Î°Â¤¯¹ØÆþ¤Ç¤­¤ë¤â¤Î¤ËÂåɽ¤µ¤ì¤ë2¹Ô16ʸ»ú¤ÇÆâ¡¥³¥ó¥È¥í¡¼¥é
IC¤¬HD44780¸ß´¹¤Ê¥­¥ã¥é¥¯¥¿±Õ¾½¥â¥¸¥å¡¼¥ë¤ò¼õÆ°ÉôÉʤòÄɲ䷤Ƥ¿¤Ã¤¿¤Î
2Àþ¤ÇÆ°¤«¤·¤Á¤ã¤¦¼ÂÍÑÀ­³§Ìµ¤ÎĶÎϵ»
¤Ç¤¹¡ªÃæ¹ñ¤À¤â¤ó¤Ê¥¢¡Ä
¢¬¤Î¥ê¥ó¥¯Àè¤Çµí¤È¤¤¤¦Ã±¸ì¤¬»¶¸«¤·¤Þ¤¹¤¬Ãæ¹ñ¤Ç¤Ïµí¤ò¹ÎÄêŪ¤Ê°ÕÌ£¤Ç»ÈÍÑ
¡¡¤µ¤ì¤ë¤³¤È¤¬¤¢¤ë¤È¤Î¤³¤È¤Ç¤¹¡£¤³¤ÎÎ϶ȤÏʸ»úÄ̤궯¤¤µí¤ò¸«¤ë¤è¤¦¤À¡£



¥½¡¼¥¹¥³¡¼¥É¤Ï¾å¥ê¥ó¥¯¤ÎÃæ¹ñ¤Î¿Í¤ÎATMega16¤Î¤â¤Î¤ò¥Ù¡¼¥¹¤ËÈÆÍѤÇÉý¹­¤¯
»È¤¨¤ë¤è¤¦¤Ë°ìÈ̸ø³«¸þ¤±¤Ë¸½ºßÀ°È÷Ãæ¤Ç¤¹¡ª
´Ö¤Ë¹ç¤ï¤Ê¤«¤Ã¤¿¤ï¤±¤¸¤ã¤Ê¤¤¤è¡ª



¤·¤«¤·¡Ä


¤½¤³¤ËΩ¤Á¤Õ¤µ¤¬¤ëROMÍÆÎ̤ÎÊÉ¡ªorz
¤¢¤¢¤Ã¤Ä!Ž¢ºîÎã1¡§1-Wire²¹¼¾Åٷפη׬Ž£·ë²Ì¤òUART½ÐÎϤÎÂå¤ï¤ê¤Ë
¤«¤Ã¤³¤è¤¯É½¼¨¤·¤Æº£²ó¤Îµ­»ö¤ò¡º¤¿¤«¤Ã¤¿¤Î¤ËÍÆÎ̤¼¤ó¤¼¤ó­¤é¤Ê¤¤¡Ä¡ª
¤¢¤È500Byte¤¢¤ì¤Ð¡Ä


Ž¥Ž¥Ž¥


15ʬ¤Û¤É´èÄ¥¤ê¤Þ¤·¤¿¤¬ºÃ¤±¤Æ¤·¤Þ¤¤Ê¸»úÎóɽ¼¨¥ë¡¼¥Á¥ó¤À¤±Áö¤é¤»¤Æ
ÇÔÀï¤ÎÊÛ¤ò½Ò¤Ù¤µ¤»¤Æ¤¤¤¿¤À¤­¤Þ¤¹¡Äorz






¤È¤¤¤¦¤ï¤±¤ÇSTM32¤Ë´·¤ìÀڤä¿»ä¤ÎÂΤˤÏÉéô¤¬¶¯¤¹¤®¤¿¤Î¤Ï¤ï¤«¤ê¤Þ¤·¤¿¤¬
ATTINY202¤Î(ROMÍÆÎ̤Î)¥¤¥Ã¥Ñ¥¤»ÈÍѤǤ­¤ÆÈó¾ï¤ËËþ­¤·¤Æ¤ª¤ê¤Þ¤¹¡Ä¡ª
º£²ó¤Îµ­»ö¤Ç¾Ò²ð¤·¤¿ºîÎã¤Î¥½¡¼¥¹¥³¡¼¥É¤Ï¤Þ¤À¸ø³«ÍѤËÀ°È÷Ãæ¤Ê¤Î¤Ç
¤â¤¦¤·¤Ð¤é¤¯¤ªÂÔ¤Á¤¤¤¿¤À¤±¤ì¤Ð¹¬¤¤¤Ç¤¹¡£

20231201ÄÉ:
ATTINY202¤Î̵Íý¤ä¤ê¤¹¤®¤ë¥×¥í¥¸¥§¥¯¥È¤ò¾å¤²¤Þ¤·¤¿¡£
¤Ä¤¤¤Æ¤³¤ì¤ë¿Í¤À¤±¤Ä¤¤¤Æ¤­¤Æ¤¯¤À¤µ¤¤¡Ä¡ª¡ª¡ª

20231201ÄÉ:




¤È¤³¤í¤Ç¤Í¤à¤¤¤µ¤óº£²ó¤ÏUPDI¥×¥í¥°¥é¥Þ»È¤Ã¤Æ¤Ê¤¯¤Æ¤Ê¤ó¤«USB¥·¥ê¥¢¥ë
ÊÑ´¹¤À¤±¤Ç³«È¯¤·¤Æ¤Ê¤¤¡©¤Ç¤¹¤Ã¤Æ¡ª¡©
¤½¤ì¤Î¾ÜºÙ¤Ï¼¡²ó°Ê¹ß¤Ç¤ß¤Ã¤Ã¤Ã¤Á¤ê¤È²òÀ⤵¤»¤Æ¤¤¤¿¤À¤­¤Þ¤¹¤è¤¥♥
ATTIY202Çä¤êÀڤ줷¤¿¤Î¤Ã¤Æ¤³¤ìÍí¤ß¤¬¸¶°ø¤À¤Ã¤¿¤«¤â¤ì¤Þ¤»¤ó¤¬¤³¤¦¤´´üÂÔ¡ª

AVR128DA¤È¤«DB¤ò¤â¤¦¤Á¤ç¤Ã¤È»È¤Ã¤Æ¤ß¤ë

¡üXMEGA¤Î¸å·Ñ¡ªµ¡Ç½ËþºÜ¤Ç¥¨¥é¥Ã¥¿¤âËþºÜ
ÉʼïŪ¤Ë¤ÏXMEGA¤Î¸å·Ñ¤È¤Ê¤ëAVR-Dx¥·¥ê¡¼¥º¡£¿ô¡¹¤Î¿·µ¡Ç½¤¬¤¢¤ê¤Þ¤¹¤¬
¤½¤ì¤ÏƱ»þ¤Ë¿ô¡¹¤Î¥¨¥é¥Ã¥¿¤ò»Å¹þ¤à¤³¤È¤È¤Ê¤ê¥¨¥é¥Ã¥¿¥·¡¼¥È¤È¥Á¥Ã¥×¥ê¥Ó¥¸¥ç¥ó¤Ë
Ãí°Õ¤·¤Æ¤ª¤«¤Ê¤¤¤È¥É¥Ï¥Þ¥ê¤·¤ÆÌܤβ¼¤Ë¥¯¥Þ¤Ä¤±¤Æ¥À¥Ö¥ë¥Ô¡¼¥¹¤·¤Æ
¤·¤Þ¤¤¤Þ¤¹¡£

¸½ºß¡¢AVR128DA¤ËÂåɽ¤µ¤ì¤ëAVR-DA¥·¥ê¡¼¥º¤ÈAVR-DB¥·¥ê¡¼¥º¤¬
ήÄ̤·¤Æ¤ª¤ê¤Þ¤¹¡£
DA¤ÈDB¤Î°ã¤¤¤Ï¥¢¥Ê¥í¥°Æþ½ÐÎϤ¬¤µ¤é¤Ë¶¯²½¤µ¤ì¤Æ¤¤¤ë¤Î¤È°Û¤Ê¤ëÅÅ°µ¤Î
I/O¤½¤·¤ÆDA¤Ë¸ºß¤·¤¿¥¨¥é¥Ã¥¿¤¬½¤Àµ¤µ¤ì¤Æ¤¤¤ë¤³¤È¤Ç¤¹¡£

¥Þ¥¤¥¯¥í¥Á¥Ã¥×¤Ï²áµî¤Î¥·¥ê¡¼¥º¤Ç½Ð¤¿¥¨¥é¥Ã¥¿¤Ï¿·¤·¤¤Åۤǽ¤Àµ¤¹¤ë¤è¤È¤¤¤¦
¥¹¥¿¥ó¥¹¤Ê¤Î¤Ç¤·¤ç¤¦¤«¡Ä???¤³¤ì¤«¤éÇ㤦¿Í¤ÏDB¥·¥ê¡¼¥º°Ê¹ß¤Ë¤·¤Æ¤ª¤±¤ÐÊѤÊ
ÃÏÍëƧ¤Þ¤º¤ËºÑ¤à¤È»×¤¤¤Þ¤¹¡£¤¿¤À¤·»ÈÍÑÁ°¤Ë¥¨¥é¥Ã¥¿¡¼¥·¡¼¥È¤Ïɬ¤ºÌܤò
Ä̤·¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£

20240229ÄÉ:
½©·î¤µ¤ó¤è¤êAVR128DB28¤¬ÈÎÇ䤵¤ì¤Þ¤·¤¿¡ª¡ª¡ª¡ª¡ª¡ª
20240229ÄÉ:



¡üÀ½Â¤³«»Ïľ¸å¤ÎAVR32DA¤Ë¸ºß¤·¤¿Ã×̿Ū¥¨¥é¥Ã¥¿
¤µ¤ÆAVR¤Ï¥¢¥È¥á¥ë»þÂ夫¤é¤Þ¤ºÂ礭¤á¤ÎÍÆÎ̤ΥÁ¥Ã¥×ºî¤Ã¤Æ¤½¤Î¤¢¤È¥·¥å¥ê¥ó¥¯
¤·¤Æ¤¤¤¯ÎÌ»ºÂÎÀ©¤Îή¤ì¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¤¬AVR128DA¤¬À¤¤Ë½Ð¤Æ¾¯¤··Ð¤Ã¤¿º¢¤Ë
À½Â¤¤µ¤ì¤¿AVR32DA¤È¤¤¤¦¥Á¥Ã¥×¤ËÃ×̿Ū¥¨¤Ê¥¨¥é¥Ã¥¿¤¬Â¸ºß¤·¤Æ¤¤¤Þ¤·¤¿¡ª¡ª¡ª

¥¨¥é¥Ã¥¿¤ÎÆâÍƤÏËÜÍè¤Ï4¥Ð¥¤¥ÈɬÍפʥꥻ¥Ã¥È¥Ù¥¯¥¿¤¬2¥Ð¥¤¥È¹ï¤ß¤Ë¤Ê¤Ã¤Æ¤¤¤ë
¤È¤¤¤¦¤â¤Î¤Ç¤¹¡£AVR32DA¤Î¥Õ¥é¥Ã¥·¥åÎΰ褹¤Ù¤Æ¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤¿¤á¤Ë¤Ï¥ê¥»¥Ã¥È
¥Ù¥¯¥¿¤Ç4¥Ð¥¤¥È¤ÎjmpÌ¿Îá¤ò»È¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡£¤¬¡¢¥Ï¡¼¥ÉŪ¤ËȯÀ¸¤¹¤ë³ä¤ê¹þ¤ß
Í×°ø¤Ï2¥Ð¥¤¥È¤º¤Ä¤ÇµÍ¤áµÍ¤á¤Ë¤Ê¤Ã¤Æ¤ë¤Î¤ÇjmpÌ¿Îá¤Ç¤Ï¤È¤ó¤ÀÀ褬¤á¤Á¤ã¤¯¤Á¤ã
¤Ë¤Ê¤Ã¤ÆrjmpÌ¿Îá¤ò»ÈÍѤ·¤Ê¤±¤ì¤Ð¤Ê¤é¤º¡¢8kBʬ¤·¤«¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¡£

¢­°Ê²¼AVR¤Î¥¸¥ã¥ó¥×Ì¿Îá¤Î»²¹Í»ñÎÁ

RJMP¤Ï16bit¥ª¥Ú¥³¡¼¥É¤Ê¤Î¤Ç2¥Ð¥¤¥È
(¥Õ¥é¥Ã¥·¥å8kB°Ê²¼¤Î¥Ç¥Ð¥¤¥¹¤Ï¤³¤Á¤é)


JMP¤Ï32bit¥ª¤Ú¥³¡¼¥É¤Ê¤Î¤Ç4¥Ð¥¤¥È
(¥Õ¥é¥Ã¥·¥å8kB°Ê¾å¤Î¤Ç¥Ç¥Ð¥¤¥¹¤Ï¤³¤Á¤é)

avr-gcc¤Ë´Ø¤·¤Æ¤Ï4¥Ð¥¤¥È¶èÀÚ¤ê¤Î³ä¤ê¹þ¤ß¥Ù¥¯¥¿¥¢¥É¥ì¥¹¤òÁ°Äó¤Ë
¥¹¥¿¡¼¥È¥¢¥Ã¥×¥³¡¼¥É¤¬¥Ó¥ë¥É¥¤¥ó¤µ¤ì¤Æ¤ª¤ê¤¦¤ó¤³¤Ä¤­¤ÎAVR32DA¤Ç¤Ï
¤É¤¦´èÄ¥¤Ã¤Æ¤â¤Þ¤È¤â¤Ë³ä¤ê¹þ¤ß¤¬»È¤¨¤Þ¤»¤ó¡ª


¢¬¥Ç¡¼¥¿¥·¡¼¥È¤è¤êAVR32DA¤Î³ä¤ê¹þ¤ß¥Ù¥¯¥¿¤Î²òÀâ¡£
¥¢¥É¥ì¥¹¤Ï2¥ï¡¼¥É(=4¥Ð¥¤¥È)¶èÀÚ¤ê¤Ê¤Î¤¬¤ï¤«¤ê¤Þ¤¹¡£

AVR¤Ã¤ÆºÇ½é¤Ë½Ð¤¿Åö½é¤Ï"¤¹¤Ã¤­¤ê16bit¥ª¥Ú¥³¡¼¥É"¤òÇä¤ê¤Ë¤·¤Æ¤ÆÅÁÅýŪ¤Ë
¥ï¡¼¥É(16bit)¤Ç¥×¥í¥°¥é¥à¥¢¥É¥ì¥¹¤òɽ¸½¤·¤Æ¤­¤¿¤«¤é¥·¥å¥ê¥ó¥¯À߷פ·¤¿¿Í¤¬
¥Ð¥¤¥È¥¢¥É¥ì¥¹¤È´Ö°ã¤Ã¤Á¤ã¤Ã¤¿¤ó¤¸¤ã¤Ê¤¤¤«¤Ê¡Ä

¤È¤¤¤¦¤ï¤±¤Ç¤³¤ÎÀ½Â¤½é´ü¤Ë½Ð¤Æ¤·¤Þ¤Ã¤¿AVR32DA¤Ï²ó¼ý¤µ¤ì¡¢¸½ºßήÄ̤·¤Æ¤¤¤ë
ʪ¤Ë¤Ä¤¤¤Æ¤ÏÀµ¤·¤¤³ä¤ê¹þ¤ß¥¢¥É¥ì¥¹´Ö³Ö¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤½¤¦¤Ç¤¹¡£¤ï¤¿¤·¤ÏÉݤ¯¤Æ
»È¤¦µ¤¤â¤Ê¤¤¤Ç¤¹¤±¤É¡ª

¤Á¤Ê¤ß¤ËÃ×̿Ū¤¹¤®¤ë¥¨¥é¥Ã¥¿¤æ¤¨¤Ë¥¨¥é¥Ã¥¿¡¼¥·¡¼¥È¤Ë¤Ïµ­ºÜ¤µ¤ì¤Æ¤ª¤é¤º¡¢
AvrFreaks¤Ç»ØŦ¤¬¤¢¤Ã¤Æ½é¤á¤Æ¹­¤¯ÃΤé¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¤½¤¦¤Ç¤¹¡£


¡üAVR128DA¤Ë¤â¤ä¤Ã¤Ñ¤ê¤¢¤«¤ó¥¨¥é¥Ã¥¿
¤½¤·¤Æ»ä¤¬»ý¤Ã¤Æ¤¤¤ëAVR128DA¤â¥Õ¥é¥·¥å¥á¥â¥ê¤¬¤é¤ß¤Î¥¨¥é¥Ã¥¿¤¬¤¢¤ê¤Þ¤¹¤¬¡¢
¤½¤ì¤Ï²¼µ­¤Î¾ò·ï¤¬¤¹¤Ù¤Æ½Å¤Ê¤Ã¤¿»þ¤Ëµ¯¤³¤ê¤Þ¤¹¡£

­¡¥Õ¥é¥Ã¥·¥åÎΰè¤ò¥Ç¡¼¥¿Îΰè¤Î0x8000¤«¤é32kBʬ¤ò¥Þ¥Ã¥Ô¥ó¥°¤·¤ÆÆɤ߽ñ¤­¤¹¤ë
­¢FUSEÎΰè¤ÎBOOTCODE¤Ë0°Ê³°¤Î¿ôÃͤ¬Æþ¤Ã¤Æ¤¤¤ë(=APPCODEÎΰè¤òÍ­¸ú¤Ë¤¹¤ë)
­£NVMCTRL.CTRLB¤ÎBOOTRP¤ò¤¿¤Æ¤Æ¥Ö¡¼¥ÈÎΰè¤Î¥×¥í¥Æ¥¯¥·¥ç¥ó¤ò¹Ô¤¦

¾åµ­¤¹¤Ù¤Æ¤¬½Å¤Ê¤ë¤È32kB¶èÀÚ¤ê¤Î¤É¤ÎÎΰè¤ò¥Þ¥Ã¥Ô¥ó¥°¤·¤Æ¤âºÇ½é¤ÎBOOTCODE¤Î
Îΰ褬Ƭ¤Î¤Û¤¦¤Ë¤«¤Ö¤µ¤Ã¤Æ¤­¤ä¤¬¤ê¤Þ¤¹¡ª¡ª


¢¬Ä¶¤ï¤«¤ê¤Å¤é¤¤¸ø¼°¤Î¥¨¥é¥Ã¥¿¥·¡¼¥È¤Î²òÀâDA!¡£


¥Ö¡¼¥ÈÎΰè¤òÀßÄꤷ¤Ê¤«¤Ã¤¿¤êLPM¤Ç¥Õ¥é¥Ã¥·¥åÎΰè¤Î¥Ç¡¼¥¿¤ÎÆɤ߼è¤ê¤¹¤ë¤Ê¤é
Á´¤¯µ¤¤Ë¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¤¬¤»¤Ã¤«¤¯¥Ç¡¼¥¿Îΰè¤Ë¥Õ¥é¥Ã¥·¥åÎΰè¤Î¥Ç¡¼¥¿¤ò
¥Þ¥Ã¥Ô¥ó¥°¤Ç¤­¤ë¤Î¤Ç¤¹¤«¤é¤»¤á¤Æ³èÍѤϤ·¤¿¤¤¤Ç¤¹¤è¤Í¡Ä¡ª


¡üAVR-Dx¤òµß¤¤¤¿¤¤
¤È¤¤¤¦¤ï¤±¤Ç¤»¤á¤Æ32kBʬ¤À¤±¤Ç¤âPROGMEM¤·¤Ê¤¤¤ÇSTM32¤È¤«¤ÈƱ¤¸¤è¤¦¤Ë
const¤ÊÃͤòÃÖ¤¤¤Æ¤ß¤¿¤«¤Ã¤¿¤Î¤Ç¾åµ­¥¨¥é¥Ã¥¿¤òƧ¤Þ¤Ê¤¤¤è¤¦¤ËÇÛθ¤·¤¿¤¦¤¨¤Ç
¥ê¥ó¥«¥¹¥¯¥ê¥×¥È¤ò¤¤¤¸¤ê¥Õ¥é¥Ã¥·¥åÎΰè¤Î¥Þ¥Ã¥Ô¥ó¥°µ¡Ç½¤òºÇÂç¸Â¤Ë³èÍѤ¹¤ë
ºîÀï¤ò¼è¤ê¤Þ¤·¤¿¡ª


£±¡¥Ä̾ïÈǤξì¹ç

¥Þ¥Ã¥Ô¥ó¥°¤ò»ÈÍѤ»¤ºÁÇľ¤ËPROGMEM¤·¤¿¾ì¹ç¤Î¥×¥é¥ó¤Ç¤¹¡£
128kByte¼«Í³¤Ë»È¤¨¤Þ¤¹¤¬64kB°Ê¾å¤ÎPROGMEM¤ÎÆɤ߽Ф·¤Ïfar¥Ý¥¤¥ó¥¿¤ò
»ÈÍѤ¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£


¤Ê¤ª¡¢»ä¤Ï»È¤ª¤¦¤È¤¹¤ëAVR¤Î¥Õ¥é¥Ã¥·¥åÍÆÎ̤ò¸«¤Æfar»È¤¦¤«»È¤ï¤Ê¤¤¤«¤ò»È¤¤Ê¬¤±
¤é¤ì¤ë¤è¤¦¤Ë¤·¤Æ¤Þ¤¹¡£¤·¤«¤·¤Ê¤ó¤Ç¤â¤«¤ó¤Ç¤âfar¤Ë¤¹¤ë¤È¤Ù¤é¤Ü¤¦¤Ë¥ê¥½¡¼¥¹¤ò
¿©¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¤Î¤ÇChaN»Õ¤ËÊ襤far¤Ï¤Ê¤ë¤Ù¤¯»ÈÍѤ·¤Ê¤¤Êý¤¬µÈ¤Ç¤¹¡£

£²¡¥¥Þ¥Ã¥Ô¥ó¥°¤¢¤ê&¥Õ¥é¥Ã¥·¥åÍÆÎÌ32kB¤Î¥Þ¥¤¥³¥ó¤È¤·¤Æ»È¤¦

ÂŶ¨°Æ¤½¤Î1¡£AVR128DA¤ò32kBʬ¤·¤«»È¤ï¤º»Ä¤ê96kB¤Ï¸«¤Ê¤«¤Ã¤¿¤³¤È¤Ë¤·¤¿¤é
32kByteÁ´°è¤ËPROGMEM¤·¤Ê¤¤¤Ç¤âconst¤À¤±¤Ç¥¢¥¯¥»¥¹¤Ç¤­¤ë¤ï♥ŽÔŽ¯ŽÀŽ°!
¤Ã¤Æ¤¢¤Û¤«¡ª


£³¡¥¥Þ¥Ã¥Ô¥ó¥°¤¢¤ê&rodata¤À¤±ºÇ½ª¥»¥¯¥¿¤Ë²¡¤·¹þ¤à¡£

ÂŶ¨°Æ¤½¤Î2.¥ê¥ó¥«¥¹¥¯¥ê¥×¥È¤ò¤¤¤¸¤¯¤êÅݤ·¤Ærodata¤À¤±96kB°Ê¹ß¤Ë²¡¤·¹þ¤ó¤Ç
¤³¤ÎÎΰè¤ò¥Þ¥Ã¥Ô¥ó¥°¤¹¤ë¡ª
¤³¤ì¤¬°ìÈÖÂŶ¨¤Ç¤­¤Æ̵Æñ¤Ç¤Ï¤Ê¤¤¤Ç¤·¤ç¤¦¤«¡©FONTX2¤ß¤¿¤¤¤ÊÇϼ¯¤Ç¤«¤¤
¥Õ¥¡¥¤¥ë¤ª¤«¤Ê¤¤¸Â¤ê¤Ï¥ê¡¼¥ÉÀìÍÑÎΰè32kB¤Ï½½Ê¬¤¹¤®¤ë¤È»×¤¤¤Þ¤¹¤è¤¥¡£




¥ê¥ó¥«¥¹¥¯¥ê¥×¥È¤Î¤¤¤¸¤ëºÝ¤Î¥ß¥½¤Ï__RODATA_PM_OFFSET__¤Ë¥Ç¡¼¥¿Îΰè¤Ø
¥Þ¥Ã¥Ô¥ó¥°¤µ¤ì¤¿¥¢¥É¥ì¥¹0x8000¤ò»ØÄꤹ¤ë¤³¤È¤Ètext¤Î¼¡¤Ërodata¤¬
Íè¤ë¤è¤¦¤Ë¤¹¤ë¤³¤È(½ÅÍ×)
½çÈְִ㤨¤¿¤é¥Ó¥ë¥É¤¬Ä̤é¤Ê¤¤¤Ç¤¹¡£


¤³¤ó¤Ê¤ï¤±¤ÇAVR¡ÝDx¥·¥ê¡¼¥º¤ÎÇä¤ê¤Î°ì¤Ä¤À¤Ã¤¿¥Õ¥é¥Ã¥·¥åÎΰè¤Î¥Ç¡¼¥¿Îΰè¤Ø¤Î
¥Þ¥Ã¥Ô¥ó¥°¤â°ì±þ»È¤¤¤â¤Î¤Ë¤Ê¤Ã¤Æ¤­¤Þ¤·¤¿¤Î¤Ç¾¯¤·¤Ïµß¤¤¤Ë¤Ê¤Ã¤¿¤«¤È»×¤¤¤Þ¤¹¡ª


º£²ó¤Î¥½¡¼¥¹¥³¡¼¥É¤Ï¢­¤Ë¤Ê¤ê¤Þ¤¹¡£²óÏ©¤ÏAVR128DA48-CuriosityNANO¤Ë½àµò¤·¤¿
¤Ä¤¯¤ê¤È¤Ê¤Ã¤Æ¤ª¤ê¤Þ¤¹¤¬ÀßÄê¤òÊѤ¨¤Æ¥Ó¥ë¥É¤·¤¿¤éDB¥·¥ê¡¼¥º¤Ç¤â»ÈÍѲÄǽ¤Ç¤¹¡£
AVR-DA¤È¤«DB¤È¤«Çã¤Ã¤¿¤Ï¤¤¤¤¤â¤Î¤Î»ý¤Æ;¤·¤Æ¤ëÊý¤Ï¤ª»î¤·¤¯¤À¤µ¤¤¡£

AVR128DA48 CuriosityNANO TestProgram.



¡üAVR-XMEGA¡¢¤ªÁ°¤Ïµß¤¨¤Ê¤¤

¾å¤Ç¤Á¤ç¤Ã¤È¿¨¤ì¤¿far»È¤¦»È¤ï¤Ê¤¤¤ÎȽÄê¤Ç¤¹¤¬XMEGA¤Ë¤â²£Å¸³«¤·¤Þ¤·¤¿¡£
ÂоݤÏChaN»á¤ÎAVRÈÇxprintf¤È»ä¤ÎavrÈÇfontx2¥É¥é¥¤¥Ð¤Ç¤¹¡£
FONTX2¥É¥é¥¤¥Ð¤È¤«¥µ¥¤¥º¤Ç¤«¤¤¤«¤é¤µ¤¤¤Ã¤·¤ç¤Ã¤«¤éfarɬ¿Ü¤Ç¤·¤ç
¤È¤ª»×¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¤¬ank¥³¡¼¥É¤À¤±¤Ê¤é10kbyte¤â¤Ê¤¤¤â¤Î¤¬
¤¢¤ë¤Î¤Ç¾¯¤·¤Ç¤â¥ê¥½¡¼¥¹¸º¤é¤¹¤¿¤á¤ËÄɲ䷤Ƥߤޤ·¤¿¡£

¤Ê¤ó¤È¤¤¤¦¤«4ǯ¤Ö¤ê¤Îxmega¤Î¹¹¿·¤ò¤·¤Þ¤·¤¿¤¬¤³¤³¤Þ¤Ç¥×¥í¥°¥é¥à¤Îµ¬ÌϤ¬
¤Ç¤«¤¯¤Ê¤ë¤È¤ä¤Ï¤êSTM32¤È¤«¤Î32bit¥Þ¥¤¥³¥ó¤Î¤Û¤¦¤¬»È¤¤¤ä¤¹¤¤¤Ê¤È´¶¤¸¤Þ¤¹¡£

°ìÊýAVR»È¤¦¤Ê¤é¥Õ¥é¥Ã¥·¥åÍÆÎÌ32kB°Ê²¼¤Î¤â¤Î¤ò»È¤Ã¤Æ¤¤¤¯¤Î¤¬Å¬ºàŬ½ê¤«¤Ê¤È
´¶¤¸¤Æ¤Þ¤¹¡£¿Ê²½¤ÎÂÞ¾®Ï©¤ËÆþ¤ê¤³¤ó¤ÀXMEGA¡£¤½¤³¤«¤éÀ¸¤Þ¤ì¤¿AVR-Dx¤Ï
¤É¤³¤Þ¤ÇÀµÅö¤Ê¿Ê²½¤ò³¤±¤é¤ì¤ë¤Î¤«¡©
¤³¤ì¤«¤é¤Î³èÌö¤ò¸«ÆϤ±¤¿¤¤¤È»×¤¤¤Þ¤¹¡ª




¤ª¤Þ¤±


Ķµ×¤·¤Ö¤ê¤ËXMEGA¿¨¤Ã¤¿¤«¤éA¤ÈAU¤Î°ã¤¤¤Ã¤Æ²¿¤À¤í¤¦¤ÈÄ´¤Ù¤¿¤éUSBµ¡Ç½ÄɲäÎ
¤Û¤«¤ËPORTL¤¬Â¸ºß¤·¤Ê¤¯¤ÆÉÔ²Äǽ¤À¤Ã¤¿4Port-EBI¤¬´°Á´¤Ë»ÈÍѤǤ­¤ë¤Î¤¬È½ÌÀ¡ª
º£¤µ¤éÃÙ¤¤¤ó¤ÀYO!

AVR128DA/DB¥·¥ê¡¼¥º¤È¤«ATMega4809¤È¤«»È¤Ã¤Æ¤ß¤ë

¡üÇã¤Ã¤¿¤Ï¤¤¤¤¤â¤Î¤ÎÈî¤ä¤·¤Ë¤Ê¤ê¤½¤¦¤Ê¤Î¤Ç¤ä¤ë¤Ê¤éº£¤·¤«¤Í¤§¡Ä

ºòǯËö¤ËÀµÅý¿Ê²½·Ï¤ÎAVR128DA¥·¥ê¡¼¥º¤òÆþ¼ê¤·¤Þ¤·¤¿¤¬¤è¤¦¤ä¤¯¤¤¤¸¤ë
µ¡²ñ¤¬½ÐÍ褿¤Î¤Ç¾Ò²ð¤·¤Þ¤¹¡£

AVR128DA48 Curiosity Nano¤È¤¤¤¦¥­¥Ã¥È¤Ç¹ØÆþ¤·¤Þ¤·¤¿¡£
ÃÍÃʤÏ2000±ß¤Á¤ç¤Ã¤È¤Ç¤¹¡£

AVR DA/DB¥Õ¥¡¥ß¥ê¡¼¤Ë°ÌÃÖÉÕ¤±¤é¤ì¤ë¤³¤ÎÉʼï¤Ï¤Ê¤ó¤ÈÆ°ºîÅÅ°µ1.8V~5.5V¤Î
ÈϰϤÇ24MHz¶îÆ°¤òÊݾڤ·¤Æ¤ª¤êUART¤È¤«¤âÂÔ˾¤Î¥Ü¡¼¥ì¡¼¥ÈÀ¸À®ÍÑʬ¿ô³ä¤ê»»´ï
¤Ê¤ó¤«¤âÁõÈ÷¤·¤Æ¤ª¤ê¤Ê¤Ë¤è¤ê²áµî¤ÎÉʼï¤ÈÈæ¤Ù¤Æ¤â¤Ï¤ë¤«¤Ë°Â²Á¤Ç¤¢¤ë¤È¤¤¤¦
Ķ¿Ê²½¤ò¿ë¤²¤Æ¤ª¤ê¤Þ¤¹¡£

¤¬¡¢¥Õ¥é¥Ã¥·¥å¥á¥â¥ê¥¢¥¯¥»¥¹(¸å½Ò¤·¤Þ¤¹)¤ÈI/O¤Î¥È¥ì¥é¥ó¥È¤Ï½¾Íè¤Î¤Þ¤Þ
¤Ê¤Î¤Ç¤â¤¦¤Á¤ç¤Ã¤È¤¬¤à¤Ð¤Ã¤Æ¤Û¤·¤¤¤Ç¤¹¤Í¡£


¤Ê¤ªº£²ó¤Î¥Ö¥í¥°µ­»öºîÀ®¤ËÅö¤¿¤ê²¼µ­Àèã¤Î¥µ¥¤¥È¤ò»²¹Í¤Ë¤µ¤»¤Æ¤¤¤¿¤À¤­¤Þ¤·¤¿¡£
¤ß¤Ê¤®ÍÍ
¤Ê¤ó¤Ç¤âÆȤê¸ÀÍÍ
KemushiComputerÍÍ



¡üºÇ½é¤ËΩ¤Á¤Ï¤À¤«¤ëUPDIÆṉ̃ÌäÂê
¤½¤·¤Æ¥Õ¥é¥Ã¥·¥å¤Î½ñ¤­¹þ¤ßÊý¼°¤ÏAVR-0/1·Ï¤ÈƱ¤¸¤¯UPDI¤È¤¤¤¦¥×¥í¥È¥³¥ë¤Ë
½¾¤Ã¤Æ½ñ¤­¹þ¤ß¤ò¹Ô¤¤¤Þ¤¹¡£¤³¤ì¼ÂÂÖ¤ÏȾÆó½Å¤ÎUART¤Ê¤Î¤Ç¤¹¤¬LUFA¤È¤«
´Êñ¤ËÂбþ¤¬¤Ç¤­¤ë¤ó¤¸¤ã¤Ê¤¤¤Î¤È»×¤Ã¤Æ¤¤¤¿¤Î¤Ç¤¹¤¬XMEGA¤ÎPDI¤È¤â¾¡¼ê¤¬
°ã¤¦¤é¤·¤¯¡¢½¾Íè¤Î¼«ºî·Ï¥é¥¤¥¿¤È¤ÏÁêÀ­¤¬°­¤¯¤Æ¼ÂÁõÎã¤Ï¤¢¤Þ¤ê¤Ê¤¯¤Æ
ÉáµÚ¤¬¿Ê¤Þ¤Ê¤¤¾õÂ֤ȤʤäƤ¤¤ë¤È´¶¤¸¤Æ¤ª¤ê¤Þ¤¹¡£

¤Ç¤½¤ÎÃæ¤Ç¤È¤ì¤ëÊýË¡¤ÏÂ礭¤¯Ê¬¤±¤Æ4¤Ä
­¡´ÑÇ°¤·¤ÆATMELICE/PICKIT¤òÇã¤Ã¤ÆMicrochip¤Î³«È¯´Ä¶­¤«¤éÆɤ߽ñ¤­¤¹¤ë
­¢°Â²Á¤Êɾ²Á¥Ü¡¼¥É(XPlained/Curiosity)¤Î¥Õ¥¡¡¼¥à¤ò½ñ¤­´¹¤¨¤ÆUPDIÀìÍѤˤ¹¤ë
­£jtag2updi¤ÇÀìÍѤÎavrdude¤Ç½ñ¤­¹þ¤à
­¤¼ÂÂÖ¤ÏȾÆó½ÅUART¤Ê¤Î¤Ç²¾ÁÛCOM¤Ç¤»¤³¤»¤³¼«ºî¤¹¤ë(pyUPDI¤È¤«¤â°ìÎã)


¤Í¤à¤¤¤µ¤ó¤ÏÃÍÃÊÂÐÈñÍѸú²Ì¤¬¹â¤¤¤È»×¤ï¤ì¤ë­¢¤ÎÊýË¡¤ò¤È¤ê¤Þ¤·¤¿¡£ATTINY202¤Î
»þ¤ËATTINY104Xplained¤òUPDI¥×¥í¥°¥é¥Þ²½¤·¤ÆAvrdude¤Ç½ñ¤­¹þ¤ó¤Ç¤¤¤Þ¤¹¡£
­¤¤Î²¾ÁÛCOM»È¤¦ÊýË¡¤Çavrdude¤¬Âбþ¤¹¤ë¤Î¤¬ºÇÎɤʤΤǤ¹¤¬
¡¡¼ó¤òŤ¯¤·¤ÆÂԤäƤޤ¹¡£
¤ß¤Ê¤®»á¤Î¥µ¥¤¥È¤Ç¤Ï¤½¤ì¤Ë¶á¤¤¤³¤È¤Ë¤Á¤ã¤ì¤ó¤Â¤µ¤ì¤Æ¤¤¤ë¤è¤¦¤Ç
¡¡¤¹¤´¤¯´üÂÔ¤·¤Æ¤Þ¤¹¡ù

¤¡¡¢¤Ê¤ó¤«¤¤¤Ä¤Î´Ö¤Ë¤«Çö¤¤ËÜƱ¿Í¤Î¥Í¥¿¤Ë¤·¤Þ¤¹¤Ã¤Æ½ñ¤­´¹¤ï¤Ã¤Æ¤ë¡¦¡¦¡¦¡¦

20230927ÄÉ:
avrdude¤¬serialUPDI¤ËÂбþ¤·¤Þ¤·¤¿¡ª¡ª


avrdude¤Ï¸½¾õ¤ÏAVR128DA/DB¤Ê¤É¤Î128kb¥Õ¥é¥Ã¥·¥å¤ò»ý¤ÄÉʼï¤ËÂбþ¤·¤Æ
¤ª¤é¤º¡¢¥Ñ¥Ã¥Á¤ò½¼¤Æ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤Á¤Ê¤ß¤ËCuriosityNano¤Ë¤â
Âбþ¤·¤Æ¤¯¤ì¤Æ¤¹¤´¤¯½õ¤«¤ê¤Þ¤¹♥

avrdude¤ò»È¤Ã¤Æ½ñ¤¤¤Æ¤ß¤¿¤È¤³¤í¤Ï¤³¤ó¤Ê´¶¤¸¤Ë¤Ê¤ê¤Þ¤¹

> "C:¥Devz¥Coreutils¥bin¥make.exe" program
C:/Devz/AVR/avrdude/avrdude -v -p avr128da48 -P usb -c pkobn_updi -U flash:w:main.hex

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:¥Devz¥AVR¥avrdude¥avrdude.conf"

Using Port : usb
Using Programmer : pkobn_updi
avrdude: Found CMSIS-DAP compliant device, using EDBG protocol
AVR Part : AVR128DA48
Chip Erase delay : 0 us
PAGEL : P00
BS2 : P00
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 0
StabDelay : 0
CmdexeDelay : 0
SyncLoops : 0
ByteDelay : 0
PollIndex : 0
PollValue : 0x00
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 125 125 0 0 0 0x00 0x00
fuses 0 0 0 0 no 9 16 0 0 0 0x00 0x00
fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse1 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse2 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse4 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse5 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse6 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse7 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse8 0 0 0 0 no 1 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 4 1 0 0 0 0x00 0x00
data 0 0 0 0 no 0 0 0 0 0 0x00 0x00
flash 0 0 0 0 no 131072 512 0 0 0 0x00 0x00
eeprom 0 0 0 0 no 512 1 0 0 0 0x00 0x00

Programmer Type : JTAGICE3_UPDI
Description : PKOB nano (nEDBG) in UPDI mode
ICE hardware version: 0
ICE firmware version: 1.17 (rel. 514)
Serial number : MCHP3280031800001375
Vtarget : 3.31 V
JTAG clock megaAVR/program: 0 kHz
JTAG clock megaAVR/debug: 0 kHz
JTAG clock Xmega: 0 kHz
PDI clock Xmega : 100 kHz

avrdude: Partial Family_ID returned: " "
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9708 (probably avr128da48)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (2462 bytes):

Writing | ################################################## | 100% 0.79s

avrdude: 2462 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex auto detected as Intel Hex
avrdude: input file main.hex contains 2462 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.44s

avrdude: verifying ...
avrdude: 2462 bytes of flash verified

avrdude done. Thank you.


> Process Exit Code: 0
> Time Taken: 00:02



CuriosityNano¤ËÅëºÜ¤µ¤ì¤Æ¤¤¤ënEDBG¤Ïpkobn_updi¤È»ØÄꤹ¤ë¤è¤¦¤Ç¤¹¤Í¡£
¤Þ¤¿¡¢Xplained¤Î»þ¤ß¤¿¤¤¤Ë̵Íý¤ä¤ê¥Õ¥¡¡¼¥à½ñ¤­´¹¤¨¤Ê¤¯¤Æ¤âupdi¤¬¤½¤Î¤Þ¤Þ
»ÈÍѲÄǽ¤Ê¤Î¤â¤¦¤ì¤·¤¤¤Ç¤¹¡£¤³¤ì¤Ç2000±ß¤Á¤ç¤Ã¤È¤Ê¤é¤è¤¤Ç㤤ʪ¤«¤â¡ª¡©


¡üº£ÅÙ¤ÏAVR128DB28¤À¡ª

¤µ¤Æº£Å٤ϥ­¥Ã¥È¾å¤Ç¤Ï¤Ê¤¯Ê̤ÎÉʼï¤Ë¤â½ñ¤±¤ë¤«³Î¤«¤á¤Æ¤ß¤Þ¤·¤¿¡£
AVR128DB28¤Ç¤¹¡ª¡ª¤³¤ì¤â¤«¤Ä¤Æ¤Îmega8·Ï¤Î¾å°Ì¸ß´¹¤È¤Ê¤Ã¤Æ¤¤¤¯¤Ç¤·¤ç¤¦¡£

¤È»×¤¤¤­¤ä¤Ï¤¸¤á¤ÏXplained¤«¤é²þ¤¤·¤¿updi¥×¥í¥°¥é¥Þ¤«¤é½ñ¤­¹þ¤ß¼ºÇÔ¤·¤Æ
¾Ç¤ê¤Þ¤·¤¿¡£¤É¤¦¤ä¤éCuriosityNano¤Î¥Õ¥¡¡¼¥à¤Ç¤Ï¤Ê¤¤¤ÈAVR128DA/DB
¥·¥ê¡¼¥º¤Î¥Õ¥é¥Ã¥·¥å½ñ¤­¹þ¤ß¤ËÂбþ¤·¤Æ¤¤¤Ê¤¤¤È¹Í¤¨¤é¤ì¤Þ¤¹¡£


CuriosityNano¤Ç½ñ¤¤¤¿¤È¤³¤í¤Ç¤¹¡£
> "C:¥Devz¥Coreutils¥bin¥make.exe" program
C:/Devz/AVR/avrdude/avrdude -v -p avr128db28 -P usb -c pkobn_updi -U flash:w:main.hex

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:¥Devz¥AVR¥avrdude¥avrdude.conf"

Using Port : usb
Using Programmer : pkobn_updi
avrdude: Found CMSIS-DAP compliant device, using EDBG protocol
AVR Part : AVR128DB28
Chip Erase delay : 0 us
PAGEL : P00
BS2 : P00
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 0
StabDelay : 0
CmdexeDelay : 0
SyncLoops : 0
ByteDelay : 0
PollIndex : 0
PollValue : 0x00
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 125 125 0 0 0 0x00 0x00
fuses 0 0 0 0 no 9 16 0 0 0 0x00 0x00
fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse1 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse2 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse4 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse5 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse6 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse7 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse8 0 0 0 0 no 1 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 4 1 0 0 0 0x00 0x00
data 0 0 0 0 no 0 0 0 0 0 0x00 0x00
flash 0 0 0 0 no 131072 512 0 0 0 0x00 0x00
eeprom 0 0 0 0 no 512 1 0 0 0 0x00 0x00

Programmer Type : JTAGICE3_UPDI
Description : PKOB nano (nEDBG) in UPDI mode
ICE hardware version: 0
ICE firmware version: 1.17 (rel. 514)
Serial number : MCHP3280031800001375
Vtarget : 3.31 V
JTAG clock megaAVR/program: 0 kHz
JTAG clock megaAVR/debug: 0 kHz
JTAG clock Xmega: 0 kHz
PDI clock Xmega : 100 kHz

avrdude: Partial Family_ID returned: "AVR "
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e970e (probably avr128db28)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (2398 bytes):

Writing | ################################################## | 100% 0.79s

avrdude: 2398 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex auto detected as Intel Hex
avrdude: input file main.hex contains 2398 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.43s

avrdude: verifying ...
avrdude: 2398 bytes of flash verified

avrdude done. Thank you.


> Process Exit Code: 0
> Time Taken: 00:02



¡üºÇ¸å¤ËATMega4809¤ò»î¤¹

¤³¤Á¤é¤Ï3·î¤¯¤é¤¤¤Ë½©·î¤µ¤ó¤«¤éÈÎÇ䤵¤ì¤À¤·¤¿megaAVR-0¥·¥ê¡¼¥º¤Î
Éʼï¤Ë¤Ê¤ê¤Þ¤¹¡£AVRDA/DB¤ÈÈæ¤Ù¤ë¤È1À¤ÂåÁ°¤ÎÉʼï¤Ë¤Ê¤ê¤Þ¤¹¡£
¤³¤Á¤é¤â¥Õ¥é¥Ã¥·¥å½ñ¤­¹þ¤ß¤ÏUPDI¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£


¤È¤ê¤¢¤¨¤ºCuriosityNano¤Ç½ñ¤¤¤Æ¤ß¤ë
> "C:¥Devz¥Coreutils¥bin¥make.exe" program
C:/Devz/AVR/avrdude/avrdude -v -p atmega4809 -P usb -c pkobn_updi -U flash:w:main.hex

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:¥Devz¥AVR¥avrdude¥avrdude.conf"

Using Port : usb
Using Programmer : pkobn_updi
avrdude: Found CMSIS-DAP compliant device, using EDBG protocol
AVR Part : ATmega4809
Chip Erase delay : 0 us
PAGEL : P00
BS2 : P00
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 0
StabDelay : 0
CmdexeDelay : 0
SyncLoops : 0
ByteDelay : 0
PollIndex : 0
PollValue : 0x00
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 61 61 0 0 0 0x00 0x00
fuses 0 0 0 0 no 9 10 0 0 0 0x00 0x00
fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse1 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse2 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse4 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse5 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse6 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse7 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse8 0 0 0 0 no 1 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 0 0 0x00 0x00
data 0 0 0 0 no 0 0 0 0 0 0x00 0x00
usersig 0 0 0 0 no 64 64 0 0 0 0x00 0x00
flash 0 0 0 0 no 49152 128 0 0 0 0x00 0x00
eeprom 0 0 0 0 no 256 64 0 0 0 0x00 0x00

Programmer Type : JTAGICE3_UPDI
Description : PKOB nano (nEDBG) in UPDI mode
ICE hardware version: 0
ICE firmware version: 1.17 (rel. 514)
Serial number : MCHP3280031800001375
Vtarget : 3.31 V
JTAG clock megaAVR/program: 0 kHz
JTAG clock megaAVR/debug: 0 kHz
JTAG clock Xmega: 0 kHz
PDI clock Xmega : 100 kHz

avrdude: Partial Family_ID returned: "mega"
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.07s

avrdude: Device signature = 0x1e9651 (probably m4809)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (5344 bytes):

Writing | ################################################## | 100% 2.07s

avrdude: 5344 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex auto detected as Intel Hex
avrdude: input file main.hex contains 5344 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.02s

avrdude: verifying ...
avrdude: 5344 bytes of flash verified

avrdude done. Thank you.


> Process Exit Code: 0
> Time Taken: 00:03



ºÇ¸å¤Ë¥Õ¥¡¡¼¥àÆþ¤ìÂؤ¨¤¿Xplained¤«¤é¡£¤¨¤é¤¤¤Ë¤®¤ä¤«¤Ë¤Ê¤ê¤Þ¤·¤¿¡£
ATmga4809¤ÏXplained¤Ç¤â½ñ¤±¤Þ¤¹¡£
> "C:¥Devz¥Coreutils¥bin¥make.exe" program
C:/Devz/AVR/avrdude/avrdude -v -p atmega4809 -P usb -c xplainedmini_updi -U flash:w:main.hex

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:¥Devz¥AVR¥avrdude¥avrdude.conf"

Using Port : usb
Using Programmer : xplainedmini_updi
avrdude: Found CMSIS-DAP compliant device, using EDBG protocol
AVR Part : ATmega4809
Chip Erase delay : 0 us
PAGEL : P00
BS2 : P00
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 0
StabDelay : 0
CmdexeDelay : 0
SyncLoops : 0
ByteDelay : 0
PollIndex : 0
PollValue : 0x00
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 61 61 0 0 0 0x00 0x00
fuses 0 0 0 0 no 9 10 0 0 0 0x00 0x00
fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse1 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse2 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse4 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse5 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse6 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse7 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse8 0 0 0 0 no 1 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 0 0 0x00 0x00
data 0 0 0 0 no 0 0 0 0 0 0x00 0x00
usersig 0 0 0 0 no 64 64 0 0 0 0x00 0x00
flash 0 0 0 0 no 49152 128 0 0 0 0x00 0x00
eeprom 0 0 0 0 no 256 64 0 0 0 0x00 0x00

Programmer Type : JTAGICE3_UPDI
Description : Atmel AVR XplainedMini in UPDI mode
ICE hardware version: 0
ICE firmware version: 1.13 (rel. 43)
Serial number : ATML2678020200007560
Vtarget : 5.00 V
JTAG clock megaAVR/program: 0 kHz
JTAG clock megaAVR/debug: 0 kHz
JTAG clock Xmega: 0 kHz
PDI clock Xmega : 0 kHz

avrdude: Partial Family_ID returned: "mega"
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.09s

avrdude: Device signature = 0x1e9651 (probably m4809)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (5344 bytes):

Writing | ################################################## | 100% 1.72s

avrdude: 5344 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex auto detected as Intel Hex
avrdude: input file main.hex contains 5344 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.38s

avrdude: verifying ...
avrdude: 5344 bytes of flash verified

avrdude done. Thank you.


> Process Exit Code: 0
> Time Taken: 00:04



¤³¤ó¤Ê´¶¤¸¤Ç»ÔÈΤΥ饤¥¿¤ò¤½¤Î¤Þ¤ÞήÍѤ⤷¤¯¤Ï¥Õ¥¡¡¼¥à¤À¤±Æþ¤ìÂؤ¨
¤È¤¤¤¦¥¢¥Þ¥Á¥å¥¢¥ê¥º¥à¤ËÈ¿¤¹¤ë¹Ô°Ù¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤·¤¿¤¬2000±ß
¤Á¤ç¤Ã¤È½Ð¤·¤ÆÅÅ°µÊÑ´¹µ¡Ç½ÉÕ¤­¤ÎUPDI¥×¥í¥°¥é¥ÞÇ㤨¤ë¤Î¤Ê¤é¤â¤¦¤³¤ì¤Ç
¤¤¤¤¤«¤Ê¤È»×¤¤¤Þ¤·¡¢¤¿¡ª



¡ü»Ä¤ëÌäÂê¡¢¥Õ¥é¥Ã¥·¥åÎΰè¤Î¥¢¥¯¥»¥¹¤Ï¤É¤¦¤Ê¤Ã¤¿¡©
¤½¤¦¤¤¤¨¤ÐMicrochipÂÎÀ©¤ÎtinyAVR¤«¤é¥Õ¥é¥Ã¥·¥åÎΰè¤Î¥¢¥É¥ì¥¹¤¬
¥Ç¡¼¥¿Îΰè¤Î¥¢¥É¥ì¥¹¤ËÊÑ´¹¤µ¤ì³ä¤ê¿¶¤é¤ì¡¢PROGMEM¤ò»È¤ï¤Ê¤¯¤Æ¤â
°ìÈÌŪ¤ÊC¸À¸ì¤Îconst¤Î¤è¤¦¤ËÄêµÁ¤·¤¿¤é¼«Æ°Åª¤Ë¥³¥ó¥Ñ¥¤¥é¤¬³ä¤êÅö¤Æ¤Æ
¤¯¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¯¤ì¤ë¤Ï¤º¤Ç¤¹¤¬¼ÂºÝ¤Ë¥¢¥»¥ó¥Ö¥ë¥ê¥¹¥È¤È¾È¤é¤·
¹ç¤ï¤»¤Æ¤ß¤Æ¤ß¤Þ¤·¤ç¤¦¡£


¤Þ¤ºATMega1284p
main.c¤Î¥°¥í¡¼¥Ð¥ë¤Ëconst char¤Îʸ»úÎó¥ê¥Æ¥é¥ë¤òPROGMEM¤È¤«»È¤ï¤º
ÄêµÁ¤·¤¿¾ì¹ç¡¢¥Õ¥é¥Ã¥·¥å¤Ç¤Ï¤Ê¤¯¥Ç¡¼¥¿Îΰè¤Î¥¢¥É¥ì¥¹(0x800000°Ê¹ß)
¤È¤·¤ÆÇÛÃÖ¤µ¤ì¤Þ¤¹¡£¤³¤Î¾õÂÖ¤À¤È¥³¥ó¥Ñ¥¤¥é¤¬main´Ø¿ô³«»ÏÁ°¤Ë
¥Õ¥é¥Ã¥·¥å¥á¥â¥ê¤«¤é¥Ç¡¼¥¿Îΰè¤ÎSRAM¤Î³ºÅö¥¢¥É¥ì¥¹¤ËÇÛÃÖ¤¹¤ë¥ë¡¼¥Á¥ó¤ò
¼Â¹Ô¤·SRAM¤òÂçÉý¤ËϲÈñ¤·¤Æ¤·¤Þ¤¤¤Þ¤¹¡£



³¤¤¤ÆATMega4809¤Î¾ì¹ç¤â¥Ç¡¼¥¿Îΰè¤Î¥¢¥É¥ì¥¹¤ËÇÛÃÖ¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¤¬¡¢
¤³¤Î¥¢¥É¥ì¥¹¤ÏLPM¤Ê¤É¤Î¥Õ¥é¥Ã¥·¥å¥¢¥É¥ì¥¹¥¢¥¯¥»¥¹ÍѤÎÌ¿Îá¤ÏɬÍפ¬¤Ê¤¯
ÉáÄ̤ÎSRAM¤Î¤è¤¦¤ËÆɤ߽Ф·¤¬¤Ç¤­¤ë¤¿¤á¡¢main´Ø¿ô³«»ÏÁ°¤Ë¥Õ¥é¥Ã¥·¥å¤«¤é
SRAM¤ËÆɤ߽Ф¹¤è¤¦¤Ê¥ë¡¼¥Á¥ó¤Ï¼Â¹Ô¤µ¤ì¤Þ¤»¤ó¡£


AVR128DA/DB¤Ï¸æÍ÷¤ÎÄ̤꽾Íè¤ÎAVR¤ÈƱ¤¸¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£¼Â¤Ï
ATmega4809¤È°ã¤Ã¤ÆÀ©Ì󤬤¢¤ê¡¢¥Ç¡¼¥¿Îΰè¤Ï64KB°ÊÆâ¤Î¥¢¥É¥ì¥¹¤·¤«
»²¾È¤Ç¤­¤Ê¤¤¤¿¤á¤µ¤é¤ËI/O¤Îʬ¤âº¹¤Ã°ú¤«¤ì¤Æ¼ÂºÝ¤Ë¤ÏºÇÂç4832kByteʬ¤·¤«
»²¾È¤Ç¤­¤Ê¤¤¤³¤È¤«¤é¤¯¤ë¤È¹Í¤¨¤é¤ì¤Þ¤¹¡£
¤Þ¤¡¤³¤ìAVR¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¡¼¤Î½ÉÌ¿¤Ê¤Î¤Ç»ÅÊý¤¬¤Ê¤¤¤Î¤Ç¤¹¤±¤É128kByteʬ
¥Õ¥ë¤Ë»²¾È¤»¤·¤á¤ë¤¿¤á¤Ë¤Ï10ǯÁ°¤Ë¤Í¤à¤¤¤µ¤ó¤¬¹Ô¤Ã¤¿¤á¤ó¤É¤¤¼êË¡¤ò¤â¤Ã¤Æ¤·¤Æ
¤ä¤é¤Ê¤¤¤È¤¤¤±¤Þ¤»¤ó¡ª
¡£
¢¨¤ß¤Ê¤®»á¤ÎÄ´ºº¤Ë¤è¤ë¤ÈAVR32DAxx¤È¤«32kByte¤ÎROMÍÆÎ̤ÎÉʼï¤Ç¤Ï
¡¡4809¤ÈƱ¤¸¤¯PROGMEM¤Î¹Íθ¤¬É¬Íפʤ¯¤Ê¤ë¤½¤¦¤Ç¤¹¡£
2023927ÄÉ:
AVR-Dx¥·¥ê¡¼¥º¤Ç¤¤¤í¤¤¤í»î¤·¤Æ¤ß¤Þ¤·¤¿¡ª¡ª



20240229ÄÉ:
½©·î¤µ¤ó¤è¤êAVR128DB28¤¬ÈÎÇ䤵¤ì¤Þ¤·¤¿¡ª¡ª¡ª¡ª¡ª¡ª

AVRºÆ¤Ó¤Ï¤Â¤á¤Þ¤·¤¿(ATTINY104¤ÈATTINY202¤ò»È¤Ã¤Æ¤ß¤ë)

¡üAVR¤ÏÀ¸¤­¤Æ¤¤¤¿¡ª
¤Í¤à¤¤¤µ¤ó¤¬Å쳤¼«Á³ÊâÆ»¤È¤«·§Ìî¸ÅÆ»¤È¤«¤ò¿Ê·³¤·¤Æ¤¤¤ë¤¦¤Á¤Ë»þÂå¤Ï
ÊѤï¤ê¡¢Æ±¤¸¤¯8bit¥Þ¥¤¥³¥ó¤ÎÀ¤³¦¤âÂ礭¤¯ÊѤï¤Ã¤Æ¤ª¤ê¤Þ¤·¤¿¡Ä

º£¤«¤é»°Ç¯Á°¡¢¤Í¤à¤¤¤µ¤ó¤ÏMicrochip¤ËµÛ¼ý¤µ¤ì¤¿ATMEL¤¬Íʤ·¤Æ¤¤¤¿
AVR¤ËÊ̤ì¤ò¹ð¤²¤Æ32bit¥Þ¥¤¥³¥ó¤ÎÀ¤³¦¤Ë¤É¤Ã¤×¤ê¤Ä¤«¤ê¤³¤ó¤À¤Ä¤â¤ê¤Ç¤·¤¿¤¬¡Ä
AVR¤ÏMicrochip¤ÎÈ߸¤ÇÌ¿Ì®¤òÊݤÁ¡¢¤µ¤é¤Ë¸½ÂåÉ÷¤Ë¥ê¥Ë¥å¡¼¥¢¥ë¤·¤Æ
Éü³è¤ò¤·¤Æ¤¤¤¿¡ª¡ª


½©·îÅŵ¤Ä̾¦¤µ¤ó¤ÇAVR-0À¤Âå¤ÎATTINY202¤¬È¯Ç䤵¤ì¤¿¤Î¤òµ¡¤Ë¤Í¤à¤¤¤µ¤ó¤â
¤«¤Ä¤ÆÇؤò¸þ¤±¤¿AVR¤ËºÆ¤Ó¸þ¤­¹ç¤¦¤³¤È¤Ë¤·¤Þ¤·¤¿¡Ä¡ª

¤½¤Î¤Þ¤¨¤Ë
¡ü¤Þ¤º¤ÏµìÀ¤Âå¤ÎATTINY104

ATMEL»þÂå¤ÎºÇ¸å¤ÎÃä»ÒATTINY10x¥·¥ê¡¼¥º¤â¤Ä¤¤¤Ç¤Ë¿¨¤Ã¤Æ¤ß¤ë¤³¤È¤Ë¤·¤Þ¤·¤¿¡£
Ʊ¤¸¤¯½©·î¤µ¤ó¤«¤éATTINY104ÈǤÎAtmelXplained¤Îºß¸Ë¤¬¤¢¤Ã¤¿¤Î¤Ç
ATTINY202¤òÇ㤦¤Ä¤¤¤Ç¤Ë¥²¥Ã¥Ä¤·¤Þ¤·¤¿¡£
Xplained·Ï¤Ï1000±ßÂæ¤Ç½ãÀµ¥Ç¥Ð¥Ã¥¬mEDBG¤¬¤Ä¤¤¤Æ¤¤¤ë¤Î¤Ç¤ªÆÀ¤Ç¤¹¡ù

ATTINY10x¥·¥ê¡¼¥º¤ÏµìÀ¤Âå¤ÎAVR¥·¥ê¡¼¥º¤Ç¤¢¤ê¡¢»ä¤¬²áµî»ÈÍѤ·¤Æ¤¤¤¿
XMEGA°ÊÁ°¤ÎAVR¥·¥ê¡¼¥º¤ÈƱÍͤΥ¢¡¼¥­¥Æ¥¯¥Á¥ã¡¼¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
L¥Á¥«ÄøÅ٤ʤé;͵¤Ç¤¹£î¡Ä

¤Ê¤ó¤ÈAVR-GCC¤¬ATTINY104¤ËÂбþ¤·¤Æ¤¤¤Ê¤«¤Ã¤¿¡ª¡ª¡ªorz
ATMEL STUDIO¤ß¤¿¤¤¤Ê½ÐÍè¹ç¤¤¤Î¥Ä¡¼¥ë»È¤¦¤Î¤Ê¤é¤ÐÁ´¤¯ÌäÂ꤬¤Ê¤¤¤Î¤Ç¤¹¤¬
¤Í¤à¤¤¤µ¤ó¤Ï¥³¥Þ¥ó¥É¥é¥¤¥ó¥Ó¥ë¥É¶µ¤Ê¤Î¤Ç¤³¤ì¤Ï¤­¤Ä¤¤¡£
·ë¶ÉŽÏŽ¶Ž°¤Î¿Í¤¬¤ä¤Ã¤¿¼ê½ç¤ò¤Ê¤¾¤Ã¤Æavr-gcc¤òATTINY10x¤ËÂбþ¤µ¤»¤Æ
¥Ó¥ë¥É¤·¤Þ¤·¤¿¡£

½ñ¤­¹þ¤ß¤ÏAVRDUDE¤ò»È¤Ã¤ÆXplained¤ËÆ⢤µ¤ì¤¿mEDBG(tpiÀܳ)·Ðͳ¤Ç
¤«¤­¤³¤ß¤ò¤ª¤³¤Ê¡Äi¡Ä

tpi¤Ç½ñ¤­¹þ¤á¤Í¤§¡ª¡ª¡ª¡ªorz

Xplained·Ï¤ÎATMELɾ²Á¥Ü¡¼¥ÉÆ⢤ÎmEDBG¤ÏAvrdude¤Ç¤Ïjtag3¤È¤¤¤¦
¥Ç¥Ð¥¤¥¹°·¤¤¤Ç·Ò¤®¤Ë¹Ô¤¯¤Î¤Ç¤¹¤¬¤Ê¤ó¤È¥½¡¼¥¹¥³¡¼¥É¥ì¥Ù¥ë¤Ç
jtag3¤Îtpi¥â¡¼¥É¤ËÂбþ¤·¤Æ¤Ê¤«¤Ã¤¿
orz¤â¤¦6ǯ°Ê¾å¤¿¤Ã¤Æ¤ë¤Î¤Ë¤Ê¤ó¤Ç¡Ä


ATMELSTUDIO¤«¤é¤Ê¤é¤Á¤ã¤ó¤ÈÆɤ߽ñ¤­¤Ç¤­¤ë¤ó¤Ç¤¹¤±¤É¤Í¡Ä
atmega1284p¤Ê¤Î¤Ïµ¤¤Ë¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£ÂçÀΤÎ1284p¤Î¥×¥í¥¸¥§¥¯¥È¤«¤é
žÍѤ·¤ÆATTINY104¤Î¥×¥í¥¸¥§¥¯¥È¤³¤·¤é¤¨¤¿¤â¤Î¤Ç¡Ä


¤µ¤Æ¡¢¤Í¤à¤¤¤µ¤ó¤ÏAvrdude¤Ç¤É¤¦¤·¤Æ¤â½ñ¤­¹þ¤ß¤·¤¿¤«¤Ã¤¿¡£
Avrdude¤Î¥½¡¼¥¹¥³¡¼¥ÉÄɤäƤ¯¤È¼ê»ý¤Á¤Î¥é¥¤¥¿¤Ç½ñ¤­¹þ¤ß¤¬¤Ç¤­¤½¤¦
¤À¤Ã¤¿¤Î¤ÏLUFA¤ÈFTDI·Ï¤Ç¤·¤¿¡£
¤Þ¤º¤ÏLUFA¤ÎAVRISPmk2²½¤·¤¿ATUSBKEY¤Çtpi½ñ¤­¹þ¤ßÀ®¸ù!!
(¢¬ºÇ½é¥ê¥»¥Ã¥È·Ò¤²¤Æ¤Ê¤¯¤Æ¾Ç¤Ã¤¿)


¤ª¼¡¤Ïftdi¡¢¤Í¤à¤¤¤µ¤ó¤ÏJTAGKey2¤òºî¤Ã¤Æ¤¤¤ë¤Î¤Ç¤½¤ì¤ò»ÈÍѤ·¤Þ¤·¤¿¡£
TPI¤Î·ëÀþ¤Ï¤³¤Á¤é¤ÎJTAGKey2¾Ò²ðµ­»ö¤Î¥ê¥ó¥¯Àè²óÏ©¿Þ¡¢
SWDÀܳ¤ÎÉôʬ¤ò»²¾È¤Î»ö¡£·ëÀþ¤Ï°Ê²¼¤ÎÄ̤êÆɤßÂؤ¨¤Æ¤¯¤À¤µ¤¤¡£
TPICLK = SWCLK
TPIDATA = SWDIO
RESET = TMS
¥ê¥»¥Ã¥È¤ÏRESET¤¸¤ã¤Ê¤¯¤ÆTMS¤Ê¤ó¤Ç¤¹¤è¤ÍAVR¤À¤È¡£


¤½¤·¤ÆJTAGKey2¤Ç¤â´í¤Ê¤²¤Ê¤¯½ñ¤­¹þ¤ßÀ®¸ù¡£
GUI¥Ä¡¼¥ë¤Ï¤³¤ì¤ò»È¤ï¤»¤Æ¤â¤é¤¤¤Þ¤·¤¿¡£

¤Ê¤ª¡¢Avrdude¤Ë¤â¥Ñ¥Ã¥ÁÅö¤Æ¤Ê¤¤¤ÈATTINY104¤ÇÆɤ߽ñ¤­¤Ç¤­¤Ê¤¤¤Î¤Ç¤´Ãí°Õ¤ò¡£
¤Í¤à¤¤¤µ¤ó¤Îavrdude¤Î¥Ð¥¤¥Ê¥ê¤Ï¤â¤Á¤í¤óÂбþºÑ¤Ç¤¹¡ù





¡ü¤ª¼¡¤ÏATTINY202¤À¡ª

ATTINY202¤ÏAVR-0¤È¸Æ¤Ð¤ì¤ë¿·¤·¤¤À¤Âå¤ÎAVR¥Þ¥¤¥³¥ó¤Ç¤¹¡£
AVR-0/1¥·¥ê¡¼¥º¤Ç¤Ï¥×¥í¥°¥é¥à¥á¥â¥ê¤Îµ¬ÌϤÏ8¥Ó¥Ã¥È¥Þ¥¤¥³¥ó¤ÎÎϤòºÇÂç¸Â¤Ë
°ú¤­½Ð¤»¤ë64KByte°Ê²¼¤Ë¼ý¤Þ¤êATXMEGA¤ÈƱ¤¸¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤È¤Ê¤ê¤Þ¤·¤¿¡£
¤½¤·¤ÆµìÀ¤ÂåAVR¤Î¼åÅÀ¤À¤Ã¤¿¥×¥í¥°¥é¥à¥á¥â¥ê¤Î¥¢¥¯¥»¥¹¤ÎÈÑ»¨¤µ¤Ï¥Ç¡¼¥¿Îΰè¤Î
¥¢¥É¥ì¥¹¤Ë³ä¤êÅö¤Æ¤ë¤³¤È¤Ë¤è¤Ã¤Æ´°Á´¤Ë¹îÉþ¤ò¤·¤Þ¤·¤¿¡ª¡ª¡ª¡ª¡ª
¾Ü¤·¤¤ÆâÍƤÏÀèã¤ÎÊý¡¹¤Î¥Ö¥í¥°µ­»ö¤Ë½¬¤¤¤Þ¤·¤¿¡£¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
¡¦¤Ê¤ó¤Ç¤âÆȤê¸ÀÍÍ
¡¦GHz2000ÍÍ


avr-gcc¤ÏATTINY202¤ËÅöÁ³Âбþ¤·¤Æ¤¤¤Þ¤¹¡£¤Ê¤¼¤«ATTINY104¤Ï¤Ö¤Ã¤Á
¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡ª¡ª¤½¤·¤ÆAVR-0¥·¥ê¡¼¥º¤ÏXMEGA¤ÈƱ¤¸´¶³Ð¤ÇÁȤá¤ë¤Î¤Ç
ATXMEGA128A1¤Î¥×¥í¥¸¥§¥¯¥È¤òžÍѤ·¤Æºî¤Ã¤Æ¤ß¤Þ¤·¤¿¡£
¤Þ¤¿¡¢ATMEL START¤Ê¤ëATMEL¤Î˺¤ì·Á¸«¤Î¤è¤¦¤Ê¥µ¥¤¥È¤Î¥Ä¡¼¥ë¤Ç
¼þÊդ䥯¥í¥Ã¥¯¤Î½é´ü²½¥³¡¼¥É¤òÀ¸À®¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

¥¯¥í¥Ã¥¯¤ò20MHz¤Ë¾å¤²¤ÆGPIO¤òOn/OFF¤Ë¤¹¤ë¥×¥í¥¸¥§¥¯¥È¤ò¥µ¥µ¤Ã¤Èºî¤Ã¤Æ
¤¤¤è¤¤¤è½ñ¤­¹þ¤ß¤ò¹Ô¤¤¤Þ¤¹¡£¿·À¤Âå¤ÎAVR¤ÏuPDI¤È¤¤¤¦XMEGA¤ÎPDI¤ò¿Ê²½
¤µ¤»¤¿1wire¤Î¥Ç¥Ð¥Ã¥°¡¦½ñ¤­¹þ¤ß¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç½ñ¤­¹þ¤ß¤ò¹Ô¤¦¤ï¤±¤Ç¤¹¤¬¡¢
º£²ó¤ÏºÇ½é¤Ë¾Ò²ð¤·¤¿ATTINY104Xplained¤ÎmEDBG¤ò»È¤¤¤Þ¤¹¡ù


Xplained¤Î´ðÈĤÎ΢¤ËATTINY202¤Ï¤Ã¤Ä¤±¤Æ¤ß¤Þ¤·¤¿¡£


Xplained¤ÎmEDBG(ATMEGA32U4)¤ÏPE6¤¬uPDI¤Î¿®¹æÀþ¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
¤³¤ÎPE6¤òATTINY202¤ÎRESET(uPDI)¤ËÀܳ¤·¤Þ¤¹¡£


Ê̤ÎAVR¤Ç¤â»È¤¨¤ë¤è¤¦¤ËXplained¤ÎNC¤ÎÉôʬ¤òuPDI¿®¹æ¤È¤·¤Þ¤¹¡£
¤½¤·¤Æ¡Ä
¡Ä


¤Þ¤¡°ì¶ÚÆì¤Ç¤¤¤¯¤ï¤±¤¬¤Ê¤¯¡¢¤Í¤à¤¤¤µ¤ó¤¬Çã¤Ã¤¿ATTINY104-Xplained¤ÏtpiÀìÍѤÎ
¥Õ¥¡¡¼¥à¤È¤Ê¤Ã¤Æ¤ª¤ê¡¢uPDI¤ò»È¤¦¤¿¤á¤Ë¤Ï¤¤¤Ã¤¿¤óATMEL STUDIO¤ò¥¤¥ó¥¹
¥È¡¼¥ë¤·¤Ætpi¤Î¥Õ¥¡¡¼¥à¤òuPDI¤Î¥Õ¥¡¡¼¥à¤ËÊѤ¨¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
¶ñÂÎŪ¤Ë¤Ïmedbgupdi.hex&bin¤òmedbgtpi.hex&bin¤Ë¥ê¥Í¡¼¥à¤·¾å½ñ¤­¤·¤Þ¤¹¡£
¤½¤Î¾õÂÖ¤Çatfw¤È¤¤¤¦¥Ä¡¼¥ë¤Ç¥¢¥Ã¥×¥Ç¡¼¥È¤·¤Þ¤¹¡£
atfw -a medbg_fw.zip -t medbg -s (¤³¤³¤ËXplained¤Î¥·¥ê¥¢¥ë¥Ê¥ó¥Ð¤òµ­½Ò¤¹¤ë)


ATMEL STUDIO¤«¤é¤Ï¸«¤¨¤¿¡ª¾¡¤Ã¤¿¡ª


¤½¤·¤ÆAvrdude¤Ç¤â¤Á¤ã¤ó¤È½ñ¡Ä
¡Ä½ñ¤±¤Í¤§¡ªorz¤Ê¤ó¤«Ìµ¸Â¥ë¡¼¥×¤·¤Æ¤ëorz


¤³¤ì¤âAvrdude¤Î¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¤Ç¥¨¥ó¥Ð¥°¤·¤Æ¤·¤Þ¤Ã¤¿¤é¤·¤¯¡¢Êѹ¹²Õ½ê¤ò¤â¤È¤Ë
Ìᤷ¤¿¤é½ñ¤­¹þ¤ß¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£¤á¤Ç¤¿¤·¤á¤Ç¤¿¤·♥

¤½¤ó¤Ê¤ï¤±¤Ç¤Þ¤À»ä¤¬¼ã¤¯¤Ô¤Á¤Ô¤Á¤À¤Ã¤¿º¢¡¢¤Ï¤Â¤á¤ÆAVR¤ò¿¨¤ì¤¿º¢¤ò»×¤¤
½Ð¤·¤Ê¤¬¤éAVR-0¥·¥ê¡¼¥º¤âÏ®¤Ã¤Æ¤¤¤³¤¦¤È»×¤¤¤Þ¤¹¡ª¤Þ¤À¤ï¤«¤¯¤Æ¤Ô¤Á¤Ô¤Á¤Ç¤¹¤¬¡£






¤¢¤¢ºÇ¸å¤Ë¤Ê¤ê¤Þ¤¹¤¬ÀëÅÁ¤Ç¤¹¤¬ATTINY104¤ÈXplained-updi¤Ë¤âÂбþ¤·¤¿
AVRDUDE¤Î¥Ð¥¤¥Ê¥ê¤Ï¤³¤Á¤é¤Ë¤Ê¤ê¤Þ¤¹¡ª¤É¤·¤É¤·»È¤Ã¤Æ¤¯¤À¤µ¤¤¡ù

XMEGA¤ò»È¤Ã¤Æ¤ß¤ë5 -FatFs¤ÎDMA²½-

AVR¥Þ¥¤¥³¥ó¤Î¿Ê²½·Á¤Ç¤¢¤ëXMEGA¡£¤Í¤à¤¤¤µ¤ó¤ÎÊи«¤Ç¤¹¤¬¤³¤ì¤ò¿¨¤Ã¤¿
¿Í¤¿¤Á¤ÎËؤɤ¬°Ê²¼¤Î±¿Ì¿¤òé¤Ã¤Æ¤ëµ¤¤¬¤·¤Ê¤¯¤â¤Ê¤¯¤â¤Ê¤¯¤â¤Ê¤¤¤Ç¤¹¡Ä¡£

1.XMEGA¤¬¼ê¤ËÆþ¤ê¤Þ¤·¤¿(^^)DMA¤äDAC¤¬»È¤¨¤ë¤Î¤Ç³Ú¤·¤ß¤Ç¤¹¡£
¢­
2.ChaN¤µ¤ó¤ÎFatFs¤¬Æ°¤­¤Þ¤·¤¿(>¢¦<)¼¡¤ÏDMA²½¤·¤Æ¤ß¤Þ¤¹(^^)
¢­
3.XMEGA¤Ç¤ÏSPI¤Ï¥¹¥ì¡¼¥Ö¤·¤«DMA¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤Ê¤¤¤ß¤¿¤¤¤Ç¤¹¤Í¡Á
¡¡UART¤ÎMSPI¥â¡¼¥É¤Ç¤·¤«¥Þ¥¹¥¿¤ÇDMA¤¬¤Ç¤­¤Ê¤¤¤è¤¦¤Ç¤¹(¡÷o¡÷)
¡¡¤¤¤ä¤Ï¤ä¥Ç¡¼¥¿¥·¡¼¥È¤Ï¤·¤Ã¤«¤ê¸«¤Ê¤¯¤Æ¤Ï(^^¡¨
¡¡(¢¬Î®¤·Æɤߤ·¤Ê¤¤¤Ç½é¤á¤«¤é¤Á¤ã¤ó¤È¸«¤í¡ª)
¢­
4.(XMEGA´ØÏ¢¤Î¹¹¿·¤¬ÅÓÀ䤨¡¢´Ø·¸¤Ê¤¤µ­»ö¤Ð¤Ã¤«¤ê¤Ë¤Ê¤ë)
¢­
5.(©¤·¤Æ¤Ê¤¤)
¢­
6.¤ª¤ä¡©¥¹¥é¥¤¥à¤¿¤Á¤¬½¸¤Þ¤Ã¤Æ¡Ä¡©
¢­
7.
¡¡
¡¡¢¬¤³¤Á¤é¤Î¥µ¥¤¥È¤Ç¤³¤Îʸ»ú¤òºî¤é¤»¤Æ¤¤¤¿¤À¤­¤Þ¤·¤¿¡ª


¡Ä¤Ê¤ó¤Ç¤Í¤à¤¤¤µ¤ó¤Î¤Û¤¦¤ò¸«¤ë¡ª¡©



¤È¤¤¤Ä¤â¤Îµº¸À¤Ï¤³¤ÎÊդˤ·¤Æ°ÊÁ°ºÃÀÞ¤·¤ÆÊü¤êÅꤲ¤Æ¤¤¤¿XMEGA¤Ë¤ª¤±¤ë
FatFs¤ÎDMA²½¡¢¤Í¤à¤¤¤µ¤ó¤â¤Ä¤¤¤ËÀ®¸ù¤·¤Þ¤·¤¿¤Î¤Ç¤´Êó¹ð¤·¤Þ¤¹¡£

ain»á¤ÎXMEGA¤ÎDMAžÁ÷¤Ë´Ø¤¹¤ëµ­»ö¤¬Â礭¤Ê¥Ò¥ó¥È¤Ë¤Ê¤Ã¤¿¤ï¤±¤Ç¤¹¤¬¡¢
SPI¤ÏÁ÷¿®¤È¼õ¿®¤¬ÂФˤʤäƤ¤¤ÆŽ¢(SPI¥Þ¥¹¥¿¤Ç)¥Ç¡¼¥¿¤òÆÀ¤¿¤±¤ì¤ÐÀ褺¤ÏÁ÷¿®¤»¤èŽ£
¤È¤¤¤¦¤Î¤¬Æ¬¤Ç¸Ç¤Þ¤Ã¤Æ¤·¤Þ¤Ã¤Æ¤¤¤Æ¤º¤Ã¤ÈTx¤«¤éDMA¤Î½éÃʤò¥­¥Ã¥¯¤·¤Æ¤¤¤Þ¤·¤¿¡£

¤Þ¤µ¤«Rx¤«¤é¥­¥Ã¥¯¤ò³«»Ï¤·¤Ê¤±¤ì¤ÐžÁ÷¤¬À®Î©¤·¤Ê¤¤¤Ê¤ó¤Æ»×¤¤¤â¤·¤Ê¤«¤Ã¤¿¤Î¤Ç
Ìܤ«¤é¤¦¤í¤³¤Ç¤·¤¿¡Ä¡£¥Û¥ó¥È¤Ë¤¢¤È¤Á¤ç¤Ã¤È¤Î¤È¤³¤í¤À¤Ã¤¿¤Î¤ËÅꤲ½Ð¤·¤Æ
¤·¤Þ¤Ã¤¿¤Î¤«»äorz
¡Ä¤È¸å¤«¤é¤¤¤¯¤é¤Ç¤â¤Ê¤ó¤È¤Ç¤â¸À¤¨¤ë¤Î¤Ç¤Þ¤¡Ìµ»öÆ°¤¤¤¿¤«¤éÎɤ·¤È¤·¤Þ¤·¤ç¤¦¡ª


¥Õ¥¡¥¤¥ë¤ÎÆɤ߽Ф·Â®ÅÙ¤ÎÈæ³Ó¤ò¹Ô¤Ã¤Æ¤ß¤Þ¤·¤¿¡£

¢¬DMA¤ò»ÈÍѤ·¤Ê¤¤¥Ù¥¿¤ÊžÁ÷¤Î»þ

¢¬DMAžÁ÷»þ
¼Â¸³¤Ë»ÈÍѤ·¤¿SD¥«¡¼¥É¤ÏSTM32¤Î»þ¤Ë»È¤Ã¤Æ¤¤¤ëʪ¤ÈƱ°ì¤Ç¤¹¡£

STM32F1¤ÇSPI¤Î¥¯¥í¥Ã¥¯¤¬18MHz»þ¤ÎDMAžÁ÷¤Ç¤Ï2100kByte/SecÄø½Ð¤Æ¤¤¤Þ¤·¤¿
¤¬¡¢XMEGA¤Ë¤ª¤¤¤ÆµöÍƤµ¤ì¤ëSPI¥¯¥í¥Ã¥¯¤Ï16MHz¤Þ¤Ç¤È¤Ê¤ê¤Þ¤¹¡£¤½¤³¤«¤éñ½ã¤Ë
µÕ»»¤¹¤ë¤È¡¢1800kByte/Sec¶á¤¯½Ð¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£DMAžÁ÷Á°¤ÎÁ°½èÍýÅù¤Ç¤Î
»þ´Ö¥í¥¹¤ò¹Íθ¤¹¤ì¤Ð1500kByte/Sec¤È¤¤¤¦ÃͤϤ¢¤ëǼÆÀ¤Ç¤­¤ë¤â¤Î¤À¤È»×¤¤¤Þ¤¹¡£

¤³¤ì°Ê¾åžÁ÷®ÅÙ¤ò¾å¤²¤è¤¦¤È»×¤Ã¤¿¤é¥ª¡¼¥Ð¡¼¥¯¥í¥Ã¥¯¤ò¤¹¤ë¤«¡¢¥À¥Ö¥ë¥Ð¥Ã¥Õ¥¡
¥ê¥ó¥°¤Ç¸úΨ²½¤ò¿Þ¤ëÅù¤¬É¬Íפˤʤë¤Ç¤·¤ç¤¦¡£Æ±»á¤Îµ­»ö¤Ë¤Ï¤½¤ì¤é¤Ë²Ã¤¨¤Æ
¥Ú¥ê¥Õ¥§¥é¥ë¤â¹ç¤ï¤»¤ÆDMA¤ÇÆ°¤«¤¹¤È¤­¤Î¹Í»¡¤â¤µ¤ì¤Æ¤ª¤êÈó¾ï¤Ë»²¹Í¤Ë¤Ê¤ê¤Þ¤¹¡£



¤È¤¤¤¦¤ï¤±¤Ç»ä¤Î¤ª¤­¤Ñ¤Ë¤¢¤ëXMEGA¤Î¥×¥í¥¸¥§¥¯¥È¤âº£²ó¤ÎDMAžÁ÷¤Î¥µ¥Ý¡¼¥È¤ò
²Ã¤¨¤Æ¹¹¿·¤·¤Æ¤ª¤­¤Þ¤·¤¿¡£¤Ê¤ó¤È¤¦¤«¤º¤Ã¤È»Ä¤Ã¤Æ¤¤¤¿¶»¤ÎÆͤ䫤«¤ê¤¬¼è¤ì¤¿¤è¤¦¤Ê
µ¤Ê¬¤Ç¤Û¤Ã¤È¤·¤Æ¤ª¤ê¤Þ¤¹♥

¤Þ¤¿¡¢¥È¥Ã¥×¤Ë¤â¤¿¤Ó¤¿¤Ó¹ðÃΤ·¤Æ¤¤¤Þ¤¹¤¬¡¢º£²ó¤Î¹¹¿·¤«¤é»ä¤¬»ÈÍѤµ¤»¤Æ¤â¤é¤Ã¤Æ
¤¤¤ë¾¤ÎÊý¤Î¥é¥¤¥Ö¥é¥ê¤ä¥½¥Õ¥È¤Î¥é¥¤¥»¥ó¥¹¤Îɽµ­¤Ë¤Ä¤¤¤Æ¡¢¥½¡¼¥¹¤¬Æþ¤Ã¤Æ¤¤¤ë
Zip¥Õ¥¡¥¤¥ë¤Ë³Æ¥³¥Ô¡¼¥é¥¤¥È¡¢¥é¥¤¥»¥ó¥¹¤òµ­¤·¤¿¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤òƱº­¤·ÌÀ³Î²½
¤·¤Æ¤¤¤¯¤è¤¦¤Ë¤·¤Þ¤·¤¿(¥Û¥ó¥Èº£¹¹¤Ç¤¹¤¬¡Ä)¡£

¤â¤Á¤í¤ó»ä¤ÎSTM32Åù¤Î¥×¥í¥¸¥§¥¯¥È¤âƱÍͤÎÀ°È÷¤ò¹­¤²¤Æ¤¤¤¯¤·¤Æ¤¤¤¯Êý¿Ë¤Ç¤¹¡£

XMEGA¤ò»È¤Ã¤Æ¤ß¤ë4


¤¿¤Ì

¤¿¤Ì

¤¿¤Ì¡ª
¤Í¤à¤¤¤µ¤ó¤â¤Ä¤¤¤Ë¤¿¤Ì¤¿¤Ì¤ÎOWNER¤Ë¤Ê¤ì¤¿¡Ä
Îɤ¤¤³¤È¤¢¤ë¤ÈÎɤ¤¤Ç¤¹¤Í¡Á♥Ë¡ÌÀ±¡¤Ç¸«¤¿¤È¤­°ÊÍè¹û¤ì¤³¤ß¤Þ¤·¤¿♥
¤Á¤Ê¤ß¤Ë¤³¤Î»Ò¡¢Á°²ó¤¿¤Ì¤­Â¼¹Ô¤Ã¤¿»þ¤Ë¥²¥Ã¥Ä¤·¤¿¤È¸À¤Ã¤Æ¤¤¤¿Êª¤Ç¤¹¡ª





¡Ä¤µ¤ÆËÜÂê¡¢Windows¾å¤ÇGCC¤Ë¤ÆAVR/XMEGA¤Î³«È¯¤¬¼ê·Ú¤Ë¤Ç¤­¤ë"WinAVR"¤Ï¡¢
20100110ÈǤdz«È¯¤Ï½ªÎ»¤·¤Æ¤ª¤ê¸½ºß¤ÏATMEL¸ø¼°¤«¤éÇÛÉÛ¤µ¤ì¤Æ¤¤¤ë
AVR ToolChain
¤Ø¤È¤Ò¤­¤Ä¤¬¤ì¤Æ¤¤¤Þ¤¹¡£
¤½¤·¤Æ°ÊÁ°¤«¤éÈó¸ø¼°¤Ç³¤³°¤Î·Ç¼¨ÈĤǽвó¤Ã¤Æ¤¤¤¿Í­ÍѤÊProgramMemory
¥¢¥¯¥»¥¹¤Î°Ù¤Î¥Þ¥¯¥í¤¬º£²ó¤«¤éÀµ¼°¤Ë¤È¤ê¤³¤Þ¤ì¤Æ¤¤¤¿¤ê¤¹¤ë¤Î¤Ç¤³¤³¤¤¤é¤Ç
¤Á¤ç¤Ã¤È¤Þ¤È¤á¤Æ¤ß¤¿¤¤¤È»×¤¤¤Þ¤¹¡£



¤½¤â¤½¤â¤Î¤Ï¤¸¤Þ¤ê¤ÏXMEGA¿¨¤ê½Ð¤·¤¿µîǯ¤Ë¤µ¤«¤Î¤Ü¤ê¤Þ¤¹¡£¤¤¤í¤¤¤í
ʸ¶ç¿â¤ì¤Ê¤¬¤éXMEGA¤òÆ°¤«¤·¤ÆÍ褿¤ï¤±¤Ç¤¹¤¬ARM¤Ç¤Ï¤ªÃã¤Î»Ò¤µ¤¤¤µ¤¤¤Ç
¤Ç¤­¤¿¤Ï¤º¤Î"FontX2¥Õ¥¡¥¤¥ë¤Î¤è¤¦¤ÊÂçÍÆÎ̤Υǡ¼¥¿¤òÇÛÎó¤È¤·¤ÆËä¤á¹þ¤à"
¤³¤È¤¬¤Ç¤­¤Ê¤¤¤È¤¤¤¦ÅÀ¤Çíµ¤¤¤¿¤³¤È¤«¤é¤Ç¤·¤¿¡£¤³¤ìAVR¤ÎÀ©Ìó¤È¤¤¤¦¤è¤ê
AVR-GCC¤ÎÀ©Ìó¤È¸À¤Ã¤¿Êý¤¬Àµ¤·¤¤¤Î¤Ç¤¹¤¬¡¢

£±¡¥°ú¿ô¤¬32767°Ê¾å¤ÎÇÛÎó¤ò³ÎÊݤ¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤
£²¡¡uint32_t¤ÎÇÛÎó¤È¤·¤Æ¥Ð¥¤¥È¿ô¤ò²Ô¤´¤¦¤È¤·¤Æ¤â¤½¤â¤½¤â¹ç·×32767¥Ð¥¤¥È
¡¡¡¡°Ê¾å¤Ë¤Ê¤ëÇÛÎó¤ò³ÎÊݤ¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤
£³¡¥64kb°Ê¾å¤Î¥á¥â¥êÎΰè¤Î¥¢¥É¥ì¥¹¤ËÄ̾ï¤Î¥Ý¥¤¥ó¥¿¤ò»È¤Ã¤ÆÍưפË
¡¡¡¡¥¢¥¯¥»¥¹¤¬¤Ç¤­¤Ê¤¤

¤Èʬ¤«¤ëÈϰϤǾ夲¤Þ¤·¤¿¤¬¡¢ÉáÄ̤ÏAVR»È¤¤¤Î¿Í¤Ï¥Õ¥é¥Ã¥·¥å¥á¥â¥êÍÆÎÌ64kb
°Ê²¼¤ÎAVR¤ò»È¤¤¥Õ¥©¥ó¥ÈÅù¤ÎÂçÍÆÎ̤Υǡ¼¥¿¤ÏSD¥«¡¼¥É¤ËÃÖ¤¤¤Æ¤½¤³¤«¤é
¥¢¥¯¥»¥¹¤¹¤ë¤È¤¤¤¦¼êÃʤ¬¾ïÅå¤È¤Ê¤Ã¤Æ¤¤¤Æº£²ó»ä¤Î¤è¤¦¤Ë²£Ã夷¤ÆC¤ÎÇÛÎó
¤È¤·¤ÆÂçÍÆÎ̤Υǡ¼¥¿¤ò¥Õ¥é¥Ã¥·¥å¤Ë¾Æ¤­¤³¤à¤è¤¦¤Ê¤³¤È¤ò°Â°×¤Ë¹Í¤¨¤ë¤È
¤³¤ÎÌäÂê¤Ë°ú¤Ã¤«¤«¤ë¤È¤¤¤¦¤ï¤±¤Ç¤¹¡£


¤³¤ì²¿¤È¤«¤Ê¤é¤Ê¤¤¤«¤È¤¤¤í¤¤¤í¸¡º÷¤·¤ÆÄ´¤Ù¤Æ¤¤¤ë¤È¿ôǯÁ°¤ËŽ¢£Ð£É£Ã¡¡
£Á£Ö£Ò¡¡¹©ºî¼¼Ž£¤Înekosan»á¤âƱ¤¸ÌäÂê¤Ë
Åö¤¿¤é¤ì¤Æ¤¤¤¿¤è¤¦¤Ç¤³¤ÎÀ©Ìó¤Ë¤Ä¤¤¤ÆÈó¾ï¤Ë¿¼¤¤¹Í»¡¤ò¤µ¤ì¤Æ¤¤¤Þ¤·¤¿¡£
nekosan»á¤ÏºÇ½ªÅª¤ËÀ©Ìó¤Ë°ú¤Ã¤«¤«¤é¤Ê¤¤¤è¤¦¤Ë¤¤¤¯¤Ä¤«Ê¬³ä¤·¤¿ÇÛÎó¤È¤·¤Æ
¥¢¥¯¥»¥¹¤¹¤ëÊý¼°¤Ë¤µ¤ì¤¿¤è¤¦¤Ç¤¹¡£¤Þ¤¿Æ±Æü¤Î¥³¥á¥ó¥ÈÍó¤Ë¤Ïnekosan»á¤È
Chuck»á¤Î¤ä¤ê¼è¤ê¤¬¤¢¤ê¡¢¤½¤ÎÃæ¤ÇÃæ¤ËGET_FAR_ADDRESS¤È¤¤¤¦Ã±¸ì¤¬
½Ð¤Æ¤­¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤Ï¸å½Ò¤·¤Þ¤¹¤¬"£³¡¥"¤ÎÀ©Ìó¤ò²ò¾Ã¤¹¤ë¤¿¤á¤ÎÈó¾ï¤Ë
½ÅÍפʥ­¡¼¥ï¡¼¥É¤È¤Ê¤ê¤Þ¤¹¡£


¤µ¤Æ¡¢À©Ìó¤Ï¤ï¤«¤Ã¤¿¤±¤É¼ÂºÝ¤É¤¦¤¹¤ê¤ã¤¤¤¤¤Î¤È¸À¤¦Ïäˤʤê¤Þ¤¹¤¬¡¢
»ä¤Ï¥Õ¥©¥ó¥È¥Õ¥¡¥¤¥ë¤òľÀÜ¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤·¤Æ¾Æ¤­¤³¤ó¤ÇC¤«¤é¤Ï
¥¤¥ó¥Ç¥Ã¥¯¥¹¤À¤±°ú¤ÃÄ¥¤Ã¤ÆÍ褿¤é¤¤¤¤¤ó¤¸¤ã¤Í¡©¤È¹Í¤¨¡¢¤µ¤é¤Ë¥°¥°¤Ã¤Æ¤ß¤ë¤È
avr-freaks¤Î¥Õ¥©¡¼¥é¥à¤Ëavr-objcopy¤Ç¹Ô¤¦ÊýË¡¤Î
µÄÏÀ¤¬¤¢¤ê¤Þ¤·¤¿¡Ä¤Ã¤Æ²¿Ç¯¤âÁ°¤À¤±¤É¤³¤ì¤¢¤Ã¤Á¤Ç¤ÏFAQ¥ì¥Ù¥ë¤Ê¤Î¤«¡Ä



ÃÖ¤­¾ì¤Ë¤¢¤ëxmega¤ÎFatFS+TFT-LCDɽ¼¨¤Î¥Ç¥â¤Ë¤Ïmake¥Õ¥¡¥¤¥ëÃæ¤Ë
¶ñÂÎŪ¤ËÈþºé¥Õ¥©¥ó¥È¤òAnk¤È´Á»ú¤È¤â¤Ë¥ª¥Ö¥¸¥§¥¯¥È²½¤·elf¤Ë¼è¤ê¹þ¤à¤¿¤á¤Î
µ­½Ò¤ò¤·¤Æ¤¢¤ê¤Þ¤¹¡£

¤ó¤Ç¤³¤ì¤òC¤«¤é¥¢¥¯¥»¥¹¤¹¤ë¤¿¤á¤Ë¤Ïavr-objcopy¤ÇÅǤ«¤ì¤¿¥é¥Ù¥ë¤ò
»²¾È¤¹¤ì¤Ð¤ª£ë¤Ç¤¹♥

¡Ä¤È¸À¤¤¤¿¤¤¡¡¤È¡¡¤³¡¡¤í¡¡¤À¡¡¤¬¡ª

64kByte°Ê¾å¥×¥í¥°¥é¥à¥á¥â¥ê¤ò»ý¤ÄAVR¤Ë¤ª¤¤¤Æ¡¢64kByte°Ê¾å¤ÎÎΰè¤Ë
¤¤¤Ä¤â¤ÎÄ´»Ò¤Ç¥¢¥¯¥»¥¹¤·¤è¤¦¤È¤¹¤ë¤È¤ª¼¡¤Ï"£³¡¥"¤ÎÀ©Ìó¤Ë¤¢¤¿¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
¤½¤â¤½¤âavr-gcc¤Ï¥¢¥É¥ì¥¹¤¬16bit¤È¤·¤Æ½èÍý¤µ¤ì¤Æ¤¤¤Æ¡¢64kb°Ê¾å¤Î
¥á¥â¥êÎΰè¤Ë¥¢¥¯¥»¥¹¤¹¤ë»þ¤ÏÈó¾ï¤ËÅԹ礬°­¤¤¤Ç¤¹(int·¿¤¬16bit¤Ê¤Î¤«¤é
¤ª»¡¤·¤Ç¤­¤ë¤È»×¤¤¤Þ¤¹)¡£¤¿¤È¤¨¤Ð¡Ä

prog_char inaisan[] = "daisuki!";

¤È¤¤¤¦¥×¥í¥°¥é¥à¥á¥â¥ê¾å¤Î¥Ç¡¼¥¿¤ò»²¾È¤¹¤ëºÝ¤Ë¤³¤Î¥Ç¡¼¥¿¤¬¥×¥í¥°¥é¥à
¥á¥â¥ê¾å¤Î64kByte°Ê¾å¤Î¥¢¥É¥ì¥¹¤ÎÎΰè¤Ë¤¢¤Ã¤¿¾ì¹ç¡¢

pgm_read_byte_far((uint_farptr_t)inaisan);

¤Ã¤Æ¤ä¤Ã¤Æ¤âÇÛÎóinaisan¤ÎƬ¤Î¥Ç¡¼¥¿'d'¤ÏÆɤ߽Ф»¤Þ¤»¤ó¡£ËÜÍè¤Î¥¢¥É¥ì¥¹
¤«¤é65535¤µ¤Ã¤Ô¤«¤ì¤¿¥¢¥É¥ì¥¹¤Ë¤¢¤ëÆÜÄÁ´Á¤Ê¥Ç¡¼¥¿¤¬Ê֤äƤ¯¤ë¤Ç¤·¤ç¤¦¡£
¤³¤ì¤ÏËÜÍè24bit¤¢¤ë¤Ï¤º¤ÎÇÛÎó¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤Î¥¢¥É¥ì¥¹¤òƬ8bitʬ¥«¥Ã¥È
¤·¤¿16bit¤ÇÅϤ·¤Æ¤·¤Þ¤¦¤«¤é¤Ç¤¹(¥Ý¥¤¥ó¥¿ÊÑ¿ô¤ò²ðºß¤µ¤»¤Æ¤â¥Ý¥¤¥ó¥¿¤Î
¥µ¥¤¥º¤â16bit¤Ç¡¢16bitʬ¤Î¥¢¥É¥ì¥¹¤·¤«É½¸½¤Ç¤­¤Ê¤¤¤«¤éƱ¤¸·ë²Ì)¡£
¤³¤ì¤ò²ò¾Ã¤¹¤ë¤Î¤¬GET_FAR_ADDRESS¤È¤¤¤¦¥Þ¥¯¥í¤Ç¡¢uint32_t·¿¤ÎÃͤòÊÖ¤·¤Þ¤¹¡£

¤³¤Î¥Þ¥¯¥í¤òÄ̤¹¤Èpgm_read_byte_farÅù¤ÎELPM¤ò»È¤¦´Ø¿ô¤Ø24bit¥¢¥É¥ì
¤È¤·¤ÆÀµ¾ï¤ËÃͤòÅϤ¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤Þ¤¿¡¢¤³¤Î¥Þ¥¯¥í¤ÏĹ¤é¤¯Èó¸ø¼°¤Ç¤·¤¿¤¬
¸½ºßATMEL¤«¤éÇÛÉÛ¤µ¤ì¤Æ¤¤¤ëAVR Toolchain¤Ç¤Ïpgm_get_far_address¤È
̾¤ò¤«¤¨¤Æ¸ø¼°¤Ë¤È¤ê¤³¤Þ¤ì¤ë¤³¤È¤È¤Ê¤ê¤Þ¤·¤¿¡£¤á¤Ç¤¿¤·¤á¤Ç¤¿¤·¡£
¡Ä»ä¤ÎÀâÌÀʬ¤«¤ê¤º¤é¤¤¤«¤é³Æ¼«pgmspace.h¸«¤¿Êý¤¬Áᤤ¤È»×¤¤¤Þ¤¹¡Ä¡£


¢¬¤ó¤Ç¡¢¸«¤¿Ìܤϵîǯ¤ÈÁ´¤¯ÊѤï¤ê±Ç¤¨¤·¤Þ¤»¤ó¤¬¾åµ­¤Î¤¹¤Ù¤Æ¤òÈ¿±Ç¤µ¤»¤Æ¡¢
¡¡AVR Toolchain¤Ç¥Ó¥ë¥É¤·¤ÆÆ°¤«¤·¤¿XMEGA¤Î¥Ç¥â¤µ¤ó¡£
¡¡¤ä¤Ã¤ÑARM¤ÎÊý¤¬ÁȤߤ䤹¤¤¤Ê¤¡¡Ä¤È»×¤¦¤³¤È¤Ò¤È¤·¤­¤ê




¤Ä¤é¤Ä¤é¤È¤Þ¤È¤Þ¤ê¤­¤ì¤Ê¤¤¤Þ¤È¤á¤ò½ñ¤¤¤Æ¤ß¤Þ¤·¤¿¤¬¡¢WinAVR¤«¤éAVR Toolchain¤Ë
ÊѤï¤Ã¤Æ¤«¤éµ¤¤Å¤¤¤¿¤³¤È¤ÎTips¤È¤«

¡üunix¥é¥¤¥¯¤Ê¥Ä¡¼¥ë·²
¡¡WinAVR¤Ë¤ÏARM¥Þ¥¤¥³¥ó¤Î¥Ó¥ë¥É¤Ë¤â½ÅÊõ¤·¤¿utils¥Õ¥©¥ë¥ÀÆâ¤Îmake¤ò´Þ¤à
unix¥é¥¤¥¯¤Ê¥Ä¡¼¥ë·²¤¬¤¢¤Ã¤¿¤Î¤Ç¤¹¤¬ATMEL¸ø¼°¤«¤éÇÛÉÛ¤µ¤ì¤¿AVR Toolchain
¤Ë¤Ï¸ºß¤·¤Þ¤»¤ó¡ªÂå¤ï¤ê¤Ëavr-gcc¤ÈƱ¤¸¥Õ¥©¥ë¥À¤ËƱÅù¤Îµ¡Ç½¤Î¤â¤Î¤¬°ìÀÚ
¹çºâ¤Ö¤Á¹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢»È¤¤¤ä¤¹¤µ¤ò¹Í¤¨¤ë¤ÈWinAVR¤Îutils¥Õ¥©¥ë¥À¤À¤±
Êݸ¤·¤È¤¤¤ÆµìÍè¤ÎWinAVR¤è¤í¤·¤¯¥Ó¥ë¥É»þ¤Ë¤Ï¤½¤³¤«¤émake¸Æ¤Ó½Ð¤»¤é¤ì¤ë¤è¤¦¤Ë
¤¹¤ì¤Ð¥â¥¢¥Ù¥¿¡¼¤À¤È»×¤¤¤Þ¤¹¡£
»ä¤ß¤¿¤¤¤Ê¥³¥Þ¥ó¥É¥é¥¤¥ó¥Ó¥ë¥ÉÌîϺ¸þ¤±¤Ç¤¹¤¬¡¼¡ª

20121130ÄÉ¡§
¡¡WinAVR¤Ï¤â¤Ï¤ä»þÂåÃÙ¤ì¤Ç¤¹¡£WinAVR¤Ë¤Ä¤¤¤Æ¤¤¤¿utils¤ÎÂåÍѤÏ
¡¡¤³¤Á¤é¤ò¤´Í÷¤¯¤À¤µ¤¤¡£

¡üEBI¤ÎSRAM¥â¡¼¥É
¡¡24¥Ó¥Ã¥È¥¢¥É¥ì¥¹¤Î¥¢¥¯¥»¥¹¤ÎÌäÂê¤Ï¥×¥í¥°¥é¥à¥á¥â¥ê¤Î»þ¤ÎÌäÂê¤À¤±¤Ç¤Ï¤Ê¤¯¡¢
¡¡¤â¤Á¤í¤óI/OÎΰè¤Ë¤âÇȵڤ·¤ä¤¬¤ê¤Þ¤¹¡£¸·Ì©¤Ë¸À¤¦¤ÈAVR Toolchain¤È¤Ï¤¢¤ó¤Þ¤·
¡¡´Ø·¸¤Ê¤¤¤Î¤Ç¤¹¤¬¡¢ATMELÇÛÉÛ¤ÎXMEGA¤ÎEBI¤ÎSRAM¥¢¥¯¥»¥¹¤Î¥Ç¥â¤¬ÃÏÌ£¤Ë
¡¡¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¤·¤Æ¤¤¤Æ¡¢pgm_get_far_address¤è¤í¤·¤¯24bit¥¢¥É¥ì¥¹ÍѤÎ
¡¡¥Þ¥¯¥í¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
¡¡
¡¡¤Í¤à¤¤¤µ¤óxmega»È¤Ã¤Æ¤³¤ì°Ê¾å¤ä¤ëµ¤¥Ê¥Ã¥·¥ó¥°¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤·¤¿¤«¤é
¡¡¤¢¤ó¤Þ¤·´Ø·¸¤Ê¤¤¤Ç¤¹¤¬¡Ä

¡üdelay.h
¡¡AVR Toolchain¤ËÊѤ¨¤¿¤émakefile¤ÇÀµ¤·¤¯¥¯¥í¥Ã¥¯¼þÇÈ¿ô¤òÀßÄꤷ¤Æ¥Ò¥å¡¼¥º¤â
¡¡´Ö°ã¤Ã¤Æ¤Ê¤¤¤Î¤Ë°ÊÁ°¤È°ã¤Ã¤Æ¤Á¤ã¤ó¤ÈÆ°¤«¤Í¤§¡ª1¡ª¤È¤ªÃ²¤­¤ÎÊý¡¢utils/delay.h¤ò
¡¡¤è¡Á¤¯¸«¤Æ¤¯¤À¤µ¤¤¡£
¡¡HAS_DELAY_CYCLES¤È¤¤¤¦define¤ò1¤«¤é0¤Ë¤¹¤ë¤È¹¬¤»¤Ë¤Ê¤ì¤ë¤«¤â¡Ä¡£
¡¡¼ã¤·¤¯¤Ï»ä¤ß¤¿¤¤makefileÃæ¤Çavr-gcc¤ËHAS_DELAY_CYCLES=0¤ÎÄêµÁ¤òÅϤ·¤Æ
¡¡¤ä¤ë¤È¤è¤¤¤Ç¤¹¡£

or

¡¡¤³¤ÎÌäÂê¡¢°Õ³°¤Èº¬¤Ï¿¼¤¤¤è¤¦¤Ç¤¹¤Í¡Ä

XMEGA¤ò»È¤Ã¤Æ¤ß¤ë3

Versaloon´ØÏ¢¤ÇÈô¤ó¤Ç¤­¤¿¿Í¤Ï¤³¤Á¤é¤Ø


ǯÅÙËö¤Ë¤Ê¤ë¤È²¿¤Ç¤«ÊµË»¤·¤¯¤Ê¤ê¤Þ¤¹¤Í¡Á¡Ä»ä¤Ï¤È¤¤¤¦¤È´ë¶È¸¦½¤¤ÇÍè¤Æ¤¤¤ëÃΤê
¹ç¤¤¤Î³ØÀ¸¤Î»Ò(µîǯ11·î²¼½Ü¤«¤éSTM32½é¤á¤Æ¤¢¤Ã¤È¤¤¤¦´Ö¤Ë¥Þ¥¤¥¯¥í¥Þ¥¦¥¹¤Þ¤Ç
À½ºî¤Ã¤Æ¤¿!!)¤Ë»ä¤Î¥Ö¥í¥°¤ÎÆâÍƤò¤·¤Æ¤Í¤à¤¤¤µ¤ó¤Æ¤¤¤É¤Ò¤¯¤¤¤ÈÇͤé¤ì¤¿¤ê¡¢
¤ªµÒ¤µ¤ó¤Î¸½¾ì¤ÇÀ¸ÃȤ«¤¤ÌܤǸ«¤Ä¤á¤é¤ì¤Ê¤¬¤é¥Ï¡¼¥Í¥¹ÂǤÁ¤«¤¨¤¿¤ê¡¢»ä¤è¤ê°ì²ó
¤êǯ²¼¤ÎÄ郎»ä¤è¤ê°ì²ó¤êǯ¾å¤ÎÈà½÷Ï¢¤ì¤Æ¤­¤¿¤ê¤¹¤ë¤Ê¤«¤Ç·ä¤ò¸«¤Æ¥Þ¥¤¥³¥ó¤Î
ÊÙ¶¯¤ò¤ä¤Ã¤Æ¤­¤Æ¤Þ¤¹¡Ä¡£


LPC2388¤äSTM32·Ï¤ÎMCU¤ÇÆ°¤«¤·¤Æ¤­¤¿Â礭¤á¤ÎTFT±Õ¾½¡¢EGO028Q02¤ä
YHY024006A¤òATXMEGA128A1¤Ë¤âƳÆþ¤¹¤Ù¤¯½àÈ÷¤ò¿Ê¤á¤Æ¤­¤Þ¤·¤¿¡£
Á°²ó¡¢¸½¹Ô¤ÎATXMEGA128A1¤Ë¤ÏPORTL¤¬Â¸ºß¤·¤Ê¤¤¤¿¤á4PORT-EBI¤¬¼Â¼Á¾å
»ÈÍÑÉÔ²Äǽ¤È½ñ¤­¤Þ¤·¤¿¤¬¡¢¥á¥â¥ê¥¢¥É¥ì¥¹¤ò2¤Ä(¥¢¥É¥ì¥¹Àþ¤Ï°ìËÜ)¤·¤«»ÈÍѤ·¤Ê¤¤
¾åµ­±Õ¾½¤¿¤Á¤ÏÏä¬Ê̤Ǥ¹¡£FPGA¥Ü¡¼¥É¤òÀܳ¤¹¤ëÁ°¤Î¸ª´·¤é¤·¤ËÀ褺4PORT-EBI
¤ÇTFT±Õ¾½¤òÀ©¸æ¤¹¤ë»î¤ß¤ò¹Ô¤¤¤Þ¤·¤¿¡£

ATxmega¤ÎEBI¤Ë¶¡µë¤µ¤ì¤ë¥¯¥í¥Ã¥¯¤Ï¥·¥¹¥Æ¥à¥¯¥í¥Ã¥¯¤Î2ÇܤʤΤǺǹâ64MHz¤Î
¥¯¥í¥Ã¥¯¥¹¥Ô¡¼¥É¤ÇÆ°ºî¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
¹â®¤ÎSRAM¤Ï²¸·Ã¤ò¼õ¤±¤é¤ì¤ë¤Ç¤·¤ç¤¦¤¬¡¢LCD¤«¤é¤·¤Æ¤ß¤ë¤ÈÁ᤹¤®¤Ç¤¹¡£
read»þ¤À¤±¥¦¥¨¥¤¥È¤ò0->4¤ËÍî¤È¤¹Åù¤ÎºÙ¹©¤ò¤·¤Æ¤¤¤Þ¤¹¡£
Ĺ¡¹¤È½ñ¤­¤Þ¤·¤¿¤¬4PORT-EBI¤Ï̵»öµ¡Ç½¤·¤Æ,YHY024006A¤Ë²èÁü¤ä¥Õ¥©¥ó¥È¤ò
ɽ¼¨¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤·¤¿¡£


¢¬¤Þ¤ÀFatFsÀѤó¤Ç¤Ê¤¤¤Î¤ÇÍÆÎ̤ÎÅÔ¹ç¾å¤³¤Î¥µ¥¤¥º¤Î²èÁü¤·¤«É½¼¨¤Ç¤­¤Ê¤¤¤Ç¤¹¡£
¡¡¥¡¥¡»ÄÇ°¤À¡¼(ËÀ

¤¢¤ÈATXEGA¤Ç»î¤·¤Æ¤ß¤¿¤¤µ¡Ç½¤ÏADC,RTC,»ö¾Ý¥·¥¹¥Æ¥à,FatFs(SPI¤òDMA¤Ë¤¹¤ë)
ÅëºÜ¡¢¤½¤ì¤Èº£²ó»î¤·¤¿EBI¤òº£ÅÙ¤Ï3PORT-EBI¥â¡¼¥É¤ÇÂçÍÆÎÌSRAM¤È¤¤¤¦¤«
¤½¤ì¤¬¾è¤Ã¤«¤Ã¤¿FPGA¥Ü¡¼¥É¤ÈÀܳ¤¹¤ë¡£¤½¤ó¤Ê´¶¤¸¤Ç¤·¤ç¤¦¤«
¤Þ¤¿¡¢¤¹£ú»á¤ä¤¤¤¨¤Ê¤¬»á¤â¸½ºß¿Ê¹Ô·Ï¤ÇXMEGA¤ò¿¨¤é¤ì¤Æ¤¤¤ë¤Î¤Ç¤ªÆóÊý¤Î
ºîÉʤδ°À®¤â¤¿¤Î¤·¤ß¤Ç¤¹¤Í¡£










¤È¡¢¤¤¤Ä¤â¤Ê¤é¤³¤³¤ÇÎÏ¿Ô¤­¤ÆÆüµ­¤¬½ª¤ï¤ë¤ï¤±¤Ç¤¹¤¬¡Ä¤Æ¤¤¤É¤¿¤«¤¤Æú΢¥á¥¤¥É¤ò
Ìܻؤ¹¤Í¤à¤¤¤µ¤ó¤â¤¦¤Á¤ç¤Ã¤È´èÄ¥¤Ã¤Æ¤ß¤Þ¤¹¡ª¡ª¼¡¤¤¤Ä¹¹¿·¤Ç¤­¤ë¤«Ê¬¤«¤é¤Ê¤¤¤·¡ª




»ä¤â¿ʬ¤Ë¤â¤ì¤ºSTM8S-Discovery¤È¤¤¤¦STM32¥Ü¡¼¥É¤ò¹ØÆþ¤·¤Þ¤·¤¿¤¬¡¢°ÊÁ°¤«¤é
Ìܤò¤Ä¤±¤Æ¤¤¤¿Versaloon¤È¤¤¤¦ÈÆÍÑJTAG¥é¥¤¥¿/¥Ç¥Ð¥Ã¥¬¤Ë²þ¤¤ò»î¤ß¤Þ¤·¤¿!!

¤³¤ÎVersaloon¤Ë»ÈÍѤµ¤ì¤Æ¤¤¤ë¥Þ¥¤¥³¥ó¤ÏSTM32¤Î48pin,ROM62kb,RAM20kB,
¥Ú¥ê¥Õ¥§¥é¥ë¤È¤·¤ÆUSB¤¬Â¸ºß¤¹¤ëʪ¤Î¤è¤¦¤Ç¤¹¤Í¡£¤½¤·¤ÆSTM8S-Discovery¤ËSTLink
¤È¤·¤Æ¾è¤Ã¤«¤Ã¤Æ¤ëSTM32F103C8T6¤ÏVersaloon¤Ë¤Ê¤ë¾ò·ï¤ò¤¹¤Ù¤ÆËþ¤¿¤·¤Þ¤¹¡£

¤ó¤Ç¤â¤Ã¤Æ¤ª¤¢¤Ä¤é¤¨¸þ¤­¤Ë½ñ¤­´¹¤¨ÍѤÎJTAG¤Îü»Ò¤â½Ð¤Æ¤¤¤ë¤Î¤Ç¤Þ¤º¤ÏUrJTAG¤Ç
ÍͻҤò¸«¤Æ¤ß¤Þ¤·¤¿¡£


¢¬¤È¤ê¤¢¤¨¤ºJTAGKey¤ò·Ò¤²¤ë¡Ä


¢¬¤Õ¤Ä¡¼¤ÎSTM32¤Ç¤¹¤Í¡Á¡Ä¤Á¤ã¤ó¤ÈJTAG¤Ç¸«¤¨¤Þ¤¹(ŽÆŽÔŽ¥Ž¥

¼¡¤ËOpenOCD¤«¤é¥Õ¥é¥Ã¥·¥å¤Î¥Ð¥Ã¥¯¥¢¥Ã¥×¤ò¼è¤í¤¦¤È¤·¤Þ¤·¤¿¤¬¡Ä


¢¬¤ä¤Ã¤Ñ¤·¥À¥á¤«¡Ä

¤È¤¤¤¦¤ï¤±¤Ç°ìÅÙSTM32¤Î¥Õ¥é¥Ã¥·¥å¤ò½ñ¤­´¹¤¨¤Æ¤·¤Þ¤¦¤È¤â¤¦2ÅÙ¤ÈSTM8S¤ò
Discover¤¹¤ë¤³¤È¤¬½ÐÍè¤Ê¤¯¤Ê¤Ã¤Æ¤·¤Þ¤¦¤ï¤±¤Ç¤¹¡£¤·¤«¤·¡ª¤Í¤à¤¤¤µ¤ó¤Ï
STM32¤Î¥Ü¡¼¥É¤ò¹ØÆþ¤·¤¿¤Ä¤â¤ê¤Ê¤Î¤ÇÍƼϤʤ¯¾Ã¤·¤Þ¤·¤¿ŽµŽ×Ž°¡ª¡ª


¼¡¤ËVersaloonÍѤβóÏ©(¸å½Ò¤ÎRelease1¤Î²óÏ©¹½À®)¤Ëºî¤êÂؤ¨¤Þ¤¹¡£É¬Íפʤâ¤Î¤Ï
12MHz¤Î¥¯¥ê¥¹¥¿¥ë¤Ç¤¹¡£STM8S¤Ë¤Ä¤Ê¤¬¤Ã¤Æ¤¤¤ëSWIM¤ò¹½À®¤·¤Æ¤¤¤ë°ìÉô¤Î¥Ô¥ó¤Ï
Versaloon¤ÈDFU¤ÎÆ°ºî¤òÁ˳²¤¹¤ë¤Î¤Çɬ¤ºÂ­¾å¤²¤·¤¿¤ê¥¸¥ã¥ó¥Ñ¥«¥Ã¥È¤·¤Æ¤¯¤À¤µ¤¤¡£
Ãí¡§´ðÈĤβþ¤¤Ïɬ¤º¾ðÊó¤Î1¼¡¥½¡¼¥¹¤ÇÄ󼨤µ¤ì¤Æ¤ë²óÏ©¤ò»²¾È¤·¤Æ¤´¼«Ê¬¤Ç
ȽÃǤò¹Ô¤Ã¤Æ¤¯¤À¤µ¤¤¡ª¡ª¼Â¸³¿§¤¬Èó¾ï¤Ë¶¯¤¤¤Î¤Ç¤³¤³¤Ç¤Ï¾Ü¤·¤¯½ñ¤­¤Þ¤»¤ó¡ª¡ª



¢¬¤Í¤à¤¤¤µ¤ó¤Ï²£Ãå¤Ê¤Î¤Ç´ðÈĤ«¤éSTM32¤ò³°¤µ¤º¤Ë̵Íý¤ä¤ê¾åµ­¤Î²þ¤¤ò¤·¤Þ¤·¤¿¤¬
¡¡¿¿»÷¤µ¤ì¤ë´ñÆäʿͤϴðÈĤ«¤é³°¤·¤ÆÊ̤ËÁȤó¤ÀÊý¤¬¤¤¤¤¤Ç¤¹¤è?
¡¡¤Á¤ç¤í¤Ã¤È½Ð¤Æ¤ëUEWÀþ¤ÏÍѤ¬ºÑ¤ó¤Ç³°¤·¤¿TDI¤ÈTDO¡£

¢¬»È¤ï¤Ê¤¯¤Ê¤Ã¤¿SWIM¤Î¥Ô¥ó¤ÏDFU¥â¡¼¥É¤ËÆþ¤ë¤¿¤á¤Î¥â¡¼¥É
¡¡ÀßÄê¥Ô¥ó¤ËºÆÍøÍѤ·¤Þ¤·¤¿¡£
¡¡ÃæÅÓȾü¤Ëµ¯Î©¤·¤Æ¤¤¤ë¥Á¥Ã¥×Äñ¹³¤¬¤ä¤Ã¤Ä¤±´¶Éº¤¦¡Ä

Versaloon¤ÏDFU¤Ë¤è¤ê¥»¥ë¥Õ¥¢¥Ã¥×¥Ç¡¼¥È½ÐÍè¤ë¹½À®¤ò¤È¤Ã¤Æ¤¤¤Þ¤¹¡£
¤½¤ì¤ËÊï¤Ã¤ÆºÇ½é¤ÏDFU¤ò½ñ¤­¹þ¤ß¤Þ¤¹¡Ä¡£
STM32F107·Ï¤Ë´·¤ì¤Æ¤·¤Þ¤Ã¤¿¿È¤Ç¤Ï¤È¤Æ¤â¤â¤É¤«¤·¤¤¤Ç¤¹¡£
JTAG¤Ç½ñ¤¯¤Ë±Û¤·¤¿¤³¤È¤Ê¤¤¤Ç¤¹¤¬¡¢»ý¤Ã¤Æ¤Ê¤¤¿Í¤ÏɬÍפʥԥó¤À¤±¥¸¥ã¥ó¥Ñ
°ú¤­½Ð¤·¤Æ¥·¥¹¥Æ¥à¥á¥â¥ê¤«¤é¥Ö¡¼¥È¤·¤Æ½ñ¤­¹þ¤à¤Ã¤ÆÊýË¡
¤â¤¢¤ê¤Þ¤¹¡Ä¡£


¢¬DFU¤¬Î©¤Á¾å¤¬¤êDFUDemonstrator¤¬Î©¤Á¤¢¤¬¤Ã¤¿¤È¤³¤í¡£
¡¡¤³¤³¤Þ¤ÇÍ褿¤é¾¡¤Á¤Ç¤¹¡ª

¸½ºß¡¢Versaloon¤Ï¤¤¤¯¤Ä¤«¼ïÎब¤¢¤ê¡¢À½ºî¼Ô¤ÎSimonquan»á¤Î¥Ú¡¼¥¸¤«¤é
¥½¡¼¥¹¡¢²óÏ©¿Þ¡¢¥Û¥¹¥È¦¥×¥í¥°¥é¥à¡¢OpenOCD¤Ø¤ÎÂбþÊýË¡¤Ê¤É¤Î¾ðÊó¤Ï
¤¹¤Ù¤ÆÄ󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£
º£²ó»ä¤ÏRelease1¤Î²óÏ©¤ò¹½À®¤·Release1ÍѤΥե¡¡¼¥à¤ò¥Ó¥ë¥É¡¢¤½¤·¤Æ
DFU·Ðͳ¤ÇVersaloonËÜÂΤò½ñ¤­¹þ¤ß¤·¤Þ¤·¤¿¡£



¢¬½ÐÍè¾å¤¬¤Ã¤¿Versaloon¤òÊ̤ÎSTM32¥Ü¡¼¥É¤ÈÀܳ¤·¤Æ¡¢vsprog¤Ë¤Æ
¡¡JTAG¥â¡¼¥É¤ÈSWD¥â¡¼¥É¤½¤ì¤¾¤ì¤ÎÊýË¡¤Çǧ¼±¤µ¤»¤¿¤È¤³¤í¡£


¢¬vsprog(gui)¤Ç½ñ¤­¹þ¤ß¤â¤Ç¤­¤Þ¤¹¡£STM32¤À¤±¤Ç¤Ï¤Ê¤¯
¡¡AVR/MSP430/PSOC/STM8S¤â½ñ¤­¹þ¤á¤ë¤è¤¦¤Ç¤¹¡£


¢¬SWD¤ËÂбþ¤¹¤ë¥Ñ¥Ã¥Á¤òÅö¤Æ¤¿OpenOCD¤ò»ÈÍѤ·¤ÆSWD¤Ç¥Ç¥Ð¥Ã¥°¡£

º£¤ÏÆ°ºî³Îǧ¤Î°Ù¤Î¤ä¤Ã¤±¤Ä¤Î²¾ÁȤǤ¹¤¬ÌÜŪ¤ÎSWD¤Ç»È¤¨¤½¤¦¤Ê¤Î¤¬¤ï¤«¤Ã¤¿¤Î¤Ç¡¢
STM32¤òÊ̤ÎÊÑ´¹´ðÈĤ˰ܤ·Âؤ¨¤ÆÈÆÍѤÎJTAG¥Ç¥Ð¥Ã¥¬/¥é¥¤¥¿¤Ë»Å¾å¤²¤ë¤Ä¤â¤ê¤Ç¤¹¡£

º£²ó¤Î¼Â¸³¤Ë»È¤Ã¤¿VersaloonÍѤÎDFU¤ÈVersaloonËÜÂÎ¤Î¥×¥í¥°¥é¥à¤ò¤³¤Á¤é¤Ë¡£Èó¾ï¤Ë
¼Â¸³¿§¤¬¶¯¤¤¤Î¤Ç´°Á´¼«¸ÊÀÕǤ¤Î¤´°Õ¸«ÌµÍѤȤµ¤»¤Æ¤â¤é¤¤¤Þ¤¹¡£

XMEGA¤ò»È¤Ã¤Æ¤ß¤ë2

NG¥ï¡¼¥ª¡§ARM¤½¤Î¾32¥Ó¥Ã¥È¥Þ¥¤¥³¥ó
¢¬¤Í¤à¤¤¤µ¤ó¤¬Í¾·×¤Ê»ö¤ò¸À¤ï¤Ê¤¤¤¿¤áÍÑ



¡Ä¤µ¤Æ¡¢XMEGA¤ò»È¤¨¤ë¤â¤Î¤Ë¤¹¤Ù¤¯¾¯¤·¤º¤Ä¥Õ¥ì¡¼¥à¥ï¡¼¥¯¤ò¸Ç¤á¤Æ¤­¤Þ¤·¤¿¤¬¡¢
º£¸½ºß¤Þ¤À¤Þ¤À¼êõ¤êÃʳ¬¤Ç¤¹¡£


¢¬Æͤùþ¤ß¤É¤³¤íËþºÜ¤Ê²èÁü

»ä¤ÎXMEGAÍѤγ«È¯´Ä¶­¤Ï¥³¥ó¥Ñ¥¤¥é¤¬WinAVR,¥é¥¤¥¿/¥Ç¥Ð¥Ã¥¬¤¬
JTAGICEmk2¤Ç¤¹¡£¼ç¿Í¤Î°äʪ¤«¤é¶¯Ã¥¤·¤¿¤«¤é¾ù¤ê¼õ¤±¤¿JTAGICEmk2¤Ï
¥Ï¡¼¥É¥¦¥¨¥¢¤Î¥ê¥Ó¥¸¥ç¥ó¤¬¸Å¤¯¡¢PDI¥â¡¼¥É¤¬»ÈÍѤǤ­¤Ê¤¤¤¿¤áJTAG¥â¡¼¥É
¤Ç¤·¤«¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó!!

¤ó¤Ç¤â¤Ã¤Æ²¿¤Ç¥é¥¤¥¿¤È½ñ¤­¹þ¤ß¥¢¥À¥×¥¿¤ò¤Ä¤Ê¤°¥±¡¼¥Ö¥ë¤¬FPC¤¸¤ã¤Ê¤¤¤«¤È¤¤¤¦¤È
FPC¥³¥Í¥¯¥¿¤¬Ž¶ŽÞŽÊŽÞŽ¶ŽÞŽÊŽÞ¤Ë¤Ê¤Ã¤Æ¤ÆÉáÄ̤ÎÅÅÀþ¤Ç̵Íý¤ä¤ê·Ò¤²¤Æ½¤Éü¤¹¤ë¤Þ¤Ç½ñ¤­¹þ¤ß
¤¹¤éËþ­¤Ë¤Ç¤­¤Ê¤«¤Ã¤¿¤«¤é¤Ç¤¹¤èŽ¸Ž¿Ž§!!
¡Ä¤Ï¤¡¤Ï¤¡¡Ä¤Þ¤¡¥³¥Þ¥ó¥É¥é¥¤¥ó¥Ä¡¼¥ë»È¤¨¤ë¤«¤é¤¢¤Þ¤êÉÔÊؤˤϴ¶¤¸¤Þ¤»¤ó¤¬¡Ä¡£


¤³¤Î´Ä¶­¤Ç¥Õ¥é¥Ã¥·¥å¥á¥â¥ê¤Ë¾Æ¤­¤³¤ó¤ÀFONTX2¥Õ¥¡¥¤¥ë¤äBMP¥Õ¥¡¥¤¥ë¤ò
ɽ¼¨¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ë¤Þ¤Ç½ÐÍè¤Þ¤·¤¿¡£AVR»È¤¤¤ÎÊý¤Ï¤´Â¸ÃΤ«¤È»×¤¤¤Þ¤¹¤¬
¥³¥ó¥Ñ¥¤¥é¤äAVR¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤½¤Î¤â¤Î¤Î¤¤¤í¤ó¤ÊÀ©Ìó¤Çɽ¼¨¤Ç¤­¤ë¤è¤¦¤Ë
¤Ê¤ë¤Þ¤ÇÆñµ·¤·¤Þ¤·¤¿¡£¤·¤«¤·°ìÅÙƽ±Û¤¨¤Æ°·¤¤Êý¤ï¤«¤ë¤È¤â¤¦¤¢¤È¤Ï³Ú¤Ç¤·¤¿¡Ä


¢¬BMP¥Õ¥¡¥¤¥ë¤òɽ¼¨¤·¤¿¾å¤ËFONTX2(Èþºé¥Õ¥©¥ó¥È)¤ÇÀÖʸ»úÆ©²áɽ¼¨¤·¤¿¤È¤³¤í¡£
¡¡°ìÉô¸í»ú¤¬¤¢¤Ã¤Æ¥¢¥ì¤ÊÉôʬ¤¬Éú¤»»ú¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤Æ¤Þ¤¹¤¬Ìµ³²¤Ç¤¹(ËÀ
¡¡¥Ð¥ì¥ó¥¿¥¤¥ó¤À¤Ã¤¿¤·¡ª


¡Ä¤µ¤Æ¡¢¤³¤Ã¤«¤éÀè¤É¤¦¤¹¤ë¤«¤ò¹Í¤¨¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¤Î¤Ç¤¹¤¬¡¢EBI¤ò»È¤Ã¤Æ
SRAM¤È¤«·Ò¤²¤ë¤³¤È¤â¹Í¤¨¤Þ¤·¤¿¡£XMEGA¤Ç»ÈÍѤǤ­¤ëEBI¤ÏALE̵¤·¤Ç¤âSRAM¤Ë
Àܳ¤Ç¤­¤ë¤Ï¤º¤Ç¤¹¤¬¸½¹Ô¤ÎXMEGA¤Î¥â¥Ç¥ë¤Ç¤ÏEBI¤ò¹½À®¤¹¤ë¤¿¤á¤ËɬÍפʤÎ
°ìÉô¤Î¥Ð¥¹(PORTL)¤¬ÊªÍýŪ¤Ë¸ºß¤»¤º¡¢¼Â¼Á¾åALE»È¤ï¤Ê¤¤¤ÈÂçÍÆÎ̤ÎSRAM¤ò
°·¤¦¤³¤È¤¬¤Ç¤­¤Þ¤»¤óŽ¸Ž¿Ž§¡ª
¡ÄŽµŽÎŽÎ»ä¤Ã¤¿¤é¡Ä¼ºÎé¡Ä
SDRAM¤Ï¤â¤Ã¤È¤Ò¤É¤¤¤³¤È¤Ë¤Ê¤Ã¤Æ¤ë¤é¤·¤¤¤Ç¤¹¤Í¡Ä¡£

¤Ç¤âLCD¤ò·Ò¤²¤ë¤¯¤é¤¤¤Ê¤éALE̵¤·¤Ç¤â½½Ê¬¤¹¤®¤ë¤¯¤é¤¤ÏŤ¨¤ë¤Î¤Ç¡¢Á°²ó¤Î
±Õ¾½¤òÀ褺EBI¤Ç·Ò¤²¤Æ¥¢¥¯¥»¥¹¤¹¤ë¤È¤³¤í¤«¤é¤Ï¤Â¤á¤Þ¤¹¡Ä¡£
¤½¤ì¤Èº£»×¤¤¤Ä¤­¤Þ¤·¤¿¤¬MAIÅŻҤµ¤ó¤è¤ê¹ØÆþ¤·¤¿¹â®SRAMÉÕ¤­FPGA¥Ü¡¼¥É¤ò
»à¢¤·¤Æ¤¤¤Þ¤¹¤Î¤Ç¤³¤ì¤òÍøÍѤ·¤Ê¤¤¼ê¤Ï̵¤¤¤Ç¤¹¤Í¡Ä¡ª
ÃúÅÙfenrir»á¤¬cblsrv¤òISE11.x¤Ç¤â»È¤¨¤ë¤è¤¦¤Ë¹¹¿·¤·¤Æ¤¯¤ì¤Þ¤·¤¿¤Î¤Ç¡Ä
¤Í¤à¤¤¤µ¤óº£ÅÙ¤³¤½Ëܵ¤¤À¤¹¡ª¡ª


¢¬¤ä¤ë¤ä¤ëº¾µ½

XMEGA¤ò»È¤Ã¤Æ¤ß¤ë

¥·¥ê¥¢¥ë¤ÎÆ°¤«¤·¤«¤¿¤ò¿ô¤«·î´Öʬ¤«¤é¤Ê¤«¤Ã¤¿¤Î¤òµ¤¤Ëɤळ¤È¤Ï¤Ê¤¤¡ª¡ª¤Í¤à¤¤¤µ¤ó
¤À¤Ã¤Æ¤¤¤Ê¤¤¤µ¤ó¤Î¥Ö¥é¤Î¥Û¥Ã¥¯¤ò³°¤¹¤³¤È¤¬¤Ç¤­¤ë¤Þ¤Ç¤Ë9¤«·î¤«¤«¤Ã¤¿¤Î¤À¤«¤é(Ž·ŽØŽ¯

¤È¤¤¤¤¤¿¤¤¤È¤³¤í¤Ç¤¹¤¬²¿¤«¤·¤é¤ÎÌäÂê¤Ë¤Ö¤Ä¤«¤Ã¤¿»þ¤Ë¥Í¥Ã¥È¤Ç¸¡º÷¤·¤Æ¤¹¤°¸«¤Ä¤«¤ë
¥ì¥Ù¥ë¤Î¾¿Í¤Î¥½¡¼¥¹¤Ë¤¢¤¿¤ëÊʤϻߤá¤Æ¥Ç¡¼¥¿¥·¡¼¥È¤È¥¨¥é¥Ã¥¿¥·¡¼¥ÈÅù¤Î´ðËÜŪ
¾ðÊó¤Ï»öÁ°¤Ë¤·¤Ã¤«¤êÆɤó¤ÇÇÄ°®¤·¤Æ¤ª¤­¤Þ¤·¤ç¤¦¤Í¡£¤¢¤ÈÂè»°¼Ô¤¬ºî¤Ã¤¿µ¡³£ËÝÌõ
¥Ð¥ê¥Ð¥ê¼êÈ´¤­¤ÎÆüËܸìÌõ¤Ê¤ó¤ÆÅö¤é¤º¤Ë¸¶Ê¸¤òÁǤÇÆɤá¤ë±ÑʸÆɲòÎÏÉÕ¤±¤Þ¤·¤ç¤¦¤è¡£
¤½¤¦¤¤¤¦»ØƳ¤Ð¤Ã¤«¤·¤Æ¤¿¤é°ìÈ̤ˤÏÀäÂйߤê¤Æ¤³¤Ê¤¤Ì¤ÃΤΥ¨¥é¥Ã¥¿¤¬¤¿¤¯¤µ¤óÀø¤à
renesas¤È¤«¤Î¥Þ¥¤¥Ê¡¼¤ÊÉʼï¤Î¥Þ¥¤¥³¥ó¤È¤«¤ò¼Â̳¤Ç°¸¤¬¤ï¤ì¤¿»þ¤Ë²¿¤âÂнè
¤Ç¤­¤Ê¤¯¤Ê¤Ã¤Á¤ã¤Ã¤ÆÅŻҹ©ºî´¶³Ð¤Ç¥Í¥Ã¥È¾å¤Î¥Õ¥©¡¼¥é¥à¤Çʹ¤¤¤Æ¾¿Í¤Ë¾Ð¤ï¤ì¤ë
»Ò¤òÀ¤¤Ë½Ð¤·¤Á¤ã¤¤¤Þ¤¹¤è¡ª(¥Ö¡¼¥á¥é¥ó¤ò¤«¤ï¤·¤Ä¤Ä)

ÅŻҹ©ºî¤Î"Í·¤ÓÊý"¤ò¶µ¤¨¤ë¤ó¤¸¤ã¤Ê¤¯¤ÆÅŻҲóÏ©À߷פ¹¤ëºÝ¤Î"¹Í¤¨Êý"¤ò»ØƳ¤·¤Þ¤·¤ç¤¦¡£



¤Ï¤¡¤Ï¤¡¡Ä¤Þ¤¡¤¤¤¤¤ä¤Í¤à¤¤¤µ¤ó¤Î³Ø½¬ÌÜŪ¤À¤·¡Ä
¤È¤Ï¸À¤¤¤Ä¤Ä¤â»ä¤¬¸ø³«¤·¤Æ¤ë¥×¥í¥°¥é¥à¤¬"¥³¥¢¥À¥ó¥×ÅǤ¤¤Æ¥Ó¥ë¥É»ß¤Þ¤Ã¤¿!"¤ê
"¥Ñ¥¹¤¬Ä̤äƤë¤Î¤Ë¥¨¥é¡¼¤Ë¤Ê¤Ã¤¿¤ê¤·¤Æ¥Ó¥ë¥É¤¬¤Ç¤­¤Ê¤¤¡ª"¤Æ¤¤¤¦¥³¥á¥ó¥È¤µ¤ì¤Æ
¤ë¤Î¤ò¾¤ÎÊý¤Îtwitter¤ä¥Ö¥í¥°Åù¤ÇÌܤÎÅö¤¿¤ê¤Ë¤¹¤ë¤È¤µ¤¹¤¬¤Ëµ¤¤¬Òë¤á¤Æ¤­(¤Æ¤â
»ä¼«¿ÈÂǤļ꤬¤Ê¤Ë¤â¤Ê¤«¤Ã)¤¿¤Î¤Ç¤¹¤¬¡¢¿ô¿¤Ë¸ºß¤¹¤ë¤¦¤Þ¤¯¤¤¤«¤Ê¤¤¸¶°ø¤Î¤¦¤Á¤Î
°ì¤Ä¤ò¤á¤Ã¤±¤Þ¤·¤¿¡£makefileÃæ¤Î¥ï¥¤¥ë¥É¥«¡¼¥É¤Î»ØÄ꤬¥Þ¥º¤«¤Ã¤¿¤è¤¦¤Ç¤¹¡Ä¡£

¤¤¤Þ¤Þ¤Ç¸ø³«¤·¤Æ¤­¤¿¤â¤Î¤Û¤Ü¤¹¤Ù¤Æ¤ËÇȵڤ·¤Æ¤¿¤Î¤Ç²¿¤È¤«»þ´Ö¸«¤Ä¤±¤Æ½¤Àµ¤·¤Æ
¤­¤Þ¤·¤¿¡Ä¡£Lattice¤ÎAVR¥³¥¢¤À¤±¤Ï¥Ä¡¼¥ë¤Î¥é¥¤¥»¥ó¥¹´ü¸ÂÀÚ¤ì¤ÇÆ°ºî³Îǧ¤¬½ÐÍè
¤Æ¤Þ¤»¤ó¤¬¤³¤Á¤é¤âÄÉ¡¹¤È¡ÄWinAVR¹¹¿·¤·¤Æ¤Ê¤«¤Ã¤¿¤éµ¤¤Å¤­¤â¤·¤Ê¤«¤Ã¤¿¤Î¤«»ä¡Ä



Ť¤Á°¿¶¤ê¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤·¤¿¤¬WinAVR¤ò20100110¤Ë¹¹¿·¤·¤¿¤Ä¤¤¤Ç¤Ëº£¤Þ¤Ç»à¢
¤·¤Æ¤¿XMEGA¤ò»È¤Ã¤Æ¤ß¤Þ¤·¤¿¡£¤Ê¤ó¤Èº£²ó¤¬¤Í¤à¤¤¤µ¤ó¤Î¤Ö¤í¤°½é¤ÎAVR¥«¥Æ¥´¥ê¡ª
»ÈÍѤˤ¢¤¿¤Ã¤Æ¤¹£ú»á¤ÈO-Famiry»á¡¢¤½¤·¤ÆSTM32¤ÎdfuºîÀ®¥×¥í¥°¥é¥à¤Ç¤ªÀ¤ÏäË
¤Ê¤Ã¤Æ¤¤¤ë¥·¥ÐË¿»á¤È¤Î»ÈÍѵ­¤ò»²¹Í¤Ë¤µ¤»¤Æ¤â¤é¤Ã¤Æ¤¤¤Þ¤¹¡£
ºÇ½é¤Ë¸À¤Ã¤Æ¤ª¤¯¤È¤¹¤Ç¤ËARM»È¤¤¤Ê¿Í¤ÏXMEGA»È¤¦°ÕÌ£¤Þ¤Ã¤¿¤¯Ìµ¤¤¤Î¤ÈAVR¤«¤é
¥¹¥Æ¥Ã¥×¥¢¥Ã¥×¤·¤Æµ¬ÌϤΤª¤Ã¤­¤¤¥Þ¥¤¥³¥ó»È¤¦¤³¤È¹Í¤¨¤Æ¤ë¿Í¤Ï¥×¥í¥°¥é¥à¤ÎÁȤߤä
¤¹¤µ¹Í¤¨¤ë¤È"¤ä¤Ã¤ÑARM¤Ã¤·¤ç"¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¤¬¤½¤ì¤Ïü¤ËÃÖ¤¤¤Æ¤ª¤­¤Þ¤¹¡ª

ÆüËܤÇÈæ³ÓŪÍưפ˼ê¤ËÆþ¤ë¤Î¤ÏATXMEGA128A1¤Ç¤¹¤Í¡¢º£²ó»ä¤â¤³¤ì¤ò»È¤¤¤Þ¤·¤¿¡£
¼è¤ê¹ç¤¨¤º¤¤¤Ä¤â¤ÎSPI¤ÎTFT±Õ¾½¤ÇMCU¤Î¾ðÊó¤òÆɤ߽Ф·É½¼¨¤µ¤»¤ë¤È¤³¤í¤Þ¤Ç¡Ä¡£

º£²ó¹ØÆþ¤·¤¿XMEGA¤Î¥Á¥Ã¥×¥ê¥Ó¥¸¥ç¥ó¤Ï"H"¤Ç¤·¤¿¡£¥ê¥Ó¥¸¥ç¥óH¤Ç¤â
errata¤¬¤Þ¤À¤ï¤ó¤µ¤«¤¢¤ê¤Þ¤¹¡£
¤³¤ÎXMEGA¤¬À¤Âå¸òÂ夹¤ë¤³¤í¤Ë¤Ï¤­¤Ã¤Èerrata¤â̵¤¯¤Ê¤ë¤Ç¤·¤ç¤¦(Ž¦Ž²

¥Û¥ó¥È¤Ï¤Ç¤«¤¤¥Õ¥é¥Ã¥·¥åÎΰè¤òÍê¤ê¤Ë³¨¤È¤«ÆüËܸì¥Õ¥©¥ó¥È¤È¤«¤â¥Õ¥é¥Ã¥·¥å¤Ë
¾Æ¤­¤³¤ó¤Çɽ¼¨¤·¤¿¤«¤Ã¤¿¤Î¤Ç¤¹¤¬¡¢¥Õ¥é¥Ã¥·¥åÎΰ褬RAM&I/O¶õ´Ö¤ÈʬΥ¤µ¤ì¤Æ
¤¤¤ë¤Î¤ÈWinAVR¸ÇÍ­¤ÎÇÛÎó³ÎÊݤλþ¤Î¥µ¥¤¥º¤ÎÀ©Ìó¤Î¤ª¤«¤²¤Ç¥È¥ê¥Ã¥­¡¼¤Ë¤¹¤ë
ɬÍפ¬¤¢¤ê¡¢¤¦¤Þ¤¯É½¼¨¤Ç¤­¤ë¤Þ¤Ç¤«¤Ê¤ê»þ´Ö¶ô¤ï¤ì¤½¤¦¤Ê¤Î¤Çº£²ó¤Ï¥Ñ¥¹¡£
¤»¤Ã¤«¤¯Çã¤Ã¤¿¤Î¤¬¤â¤Ã¤¿¤¤¤Ê¤¤¤Î¤Ç¤¹¤±¤É¾¤ÎÊý¤¬Í¥¤ì¤¿ºîÎã¤ò½Ð¤µ¤ì¤ë¤Þ¤Ç
ºÆ¤Ó±öÄҤˤ·¤Æ¤ª¤­¤Þ¤¹¡Ä¡£



¤¢¤È˺¤ì¤ë¤È¤³¤À¤Ã¤¿¤±¤É¡¢ËÁƬ¤Î¥Ó¥ë¥É¥¨¥é¡¼½¤Àµ¤Î"¤Ä¤¤¤Ç"¤ÇSTM32F107VCT6ÍÑ
±Õ¾½É½¼¨¥×¥í¥°¥é¥à
¤ËÁ°²ó»ÈÍѤ·¤¿2.4"¤È3.2"Íѥɥ饤¥Ð(16bit¥¢¥¯¥»¥¹)¤ò
Äɲ䷤Ƥ¤¤ë¤Î¤Ç¸½Êª¤ò½ê»ý¤·¤Æ¤¤¤Æ¶½Ì£¤¬¤¢¤ë¿Í¤Ï»î¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¤Í¡£

Go to top of page