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

Comments

Post a Comment








Go to top of page