embeded/AVR (ATmega,ATtiny)2017. 11. 13. 16:06

-U 옵션이 무지 복잡해 보이는데

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500 -PCOM6 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m

2016/04/06 - [embeded/arduino(genuino)] - 아두이노 부트로더 굽기?

아래 내용으로 해석을 해보면..

lock / fuse bit(extended/high/low) 를 Write 하고 immediate 모드로 해당 값을 쓰도록 한다 정도?





-U memtype:op:filename[:format]

Perform a memory operation. Multiple ‘-U’ options can be specified in order to operate on multiple memories on the same command-line invocation. The memtype field specifies the memory type to operate on. Use the ‘-v’ option on the command line or the part command from terminal mode to display all the memory types supported by a particular device. Typically, a device’s memory configuration at least contains the memory types flash and eeprom. All memory types currently known are:


One or more bytes of RC oscillator calibration data.


The EEPROM of the device.


The extended fuse byte.


The flash ROM of the device.


The fuse byte in devices that have only a single fuse byte.


The high fuse byte.


The low fuse byte.


The lock byte.


The three device signature bytes (device ID).


The fuse bytes of ATxmega devices, N is an integer number for each fuse supported by the device.


The application flash area of ATxmega devices.


The application table flash area of ATxmega devices.


The boot flash area of ATxmega devices.


The production signature (calibration) area of ATxmega devices.


The user signature area of ATxmega devices.

The op field specifies what operation to perform:


read the specified device memory and write to the specified file


read the specified file and write it to the specified device memory


read the specified device memory and the specified file and perform a verify operation

The filename field indicates the name of the file to read or write. The format field is optional and contains the format of the file to read or write. Possible values are:


Intel Hex


Motorola S-record


raw binary; little-endian byte order, in the case of the flash ROM data


ELF (Executable and Linkable Format), the final output file from the linker; currently only accepted as an input file


immediate mode; actual byte values specified on the command line, separated by commas or spaces in place of the filename field of the ‘-U’ option. This is useful for programming fuse bytes without having to create a single-byte file or enter terminal mode. If the number specified begins with 0x, it is treated as a hex value. If the number otherwise begins with a leading zero (0) it is treated as octal. Otherwise, the value is treated as decimal.


auto detect; valid for input only, and only if the input is not provided at stdin.


decimal; this and the following formats are only valid on output. They generate one line of output for the respective memory section, forming a comma-separated list of the values. This can be particularly useful for subsequent processing, like for fuse bit settings.


hexadecimal; each value will get the string 0x prepended.


octal; each value will get a 0 prepended unless it is less than 8 in which case it gets no prefix.


binary; each value will get the string 0b prepended.

The default is to use auto detection for input files, and raw binary format for output files.

Note that if filename contains a colon, the format field is no longer optional since the filename part following the colon would otherwise be misinterpreted as format.

As an abbreviation, the form -U filename is equivalent to specifying -U flash:w:filename:a. This will only work if filename does not have a colon in it. 

[링크 : http://www.nongnu.org/avrdude/user-manual/avrdude_4.html]

[링크 : http://www.ladyada.net/learn/avr/avrdude.html]

생각해보니.. 양산용으로 avrdude를 이용해서

초기에 fuse bit 설정 -> 리부팅 -> 빠른 속도로 굽기 이런식으로 

해두고 옵션파일을 ini에 저장하도록 해서 fuse bit나 mcu 종류별로 관리하도록 하면

편할 거 같은데 avrdude용 gui front end 한번 작성해볼까..

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

avrdude 실행 안됨  (0) 2017.11.18
keil bootloader example - avr/atmel  (0) 2017.11.17
USBasp 설치  (0) 2017.11.13
avr 저전압 감지  (0) 2017.08.11
avr bod(Brown out Detect)  (0) 2017.08.11
Posted by 구차니