AVR upload executable file in Atmel studio 7

Adding programmer

Atmel-ICE, AVRISP mkII ๋“ฑ์€ ์ž๋™์œผ๋กœ ์žกํž™๋‹ˆ๋‹ค.

STK500

View -> Available Atmel tools

Available tools ์ฐฝ ์•ˆ์ชฝ์—์„œ ์˜ค๋ฅธ์ชฝ ํด๋ฆญ ํ›„ Add Target์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

๋˜๋Š” Tools -> Add Target์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

STK500์„ ์„ ํƒํ•œ ํ›„, ์žฅ์น˜ ๊ด€๋ฆฌ์ž์—์„œ ํฌํŠธ๋ฅผ ํ™•์ธํ•˜์—ฌ STK500์— ๋งž๋Š” ํฌํŠธ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

caution

STK500 ํ•˜๋“œ์›จ์–ด ๋ฒ„์ „์ด ๋‚ฎ์€ ๊ฒฝ์šฐ(STK500v1) ์ธ์‹๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์ œ๊ฑฐํ•  ๋•Œ, Available tools ์ฐฝ์—์„œ ํ•ด๋‹น ํ”„๋กœ๊ทธ๋ž˜๋จธ๋ฅผ ์˜ค๋ฅธ์ชฝ ํด๋ฆญํ•œ๋’ค removeํ•˜๋ฉด ์ œ๊ฑฐ๋ฉ๋‹ˆ๋‹ค.

avrdude

Atmel studio 7์—์„œ ์ง€์›ํ•˜์ง€ ์•Š๋Š” ์žฅ์น˜์˜ ๊ฒฝ์šฐ avrdude๋ฅผ ์‚ฌ์šฉํ•ด์•ผํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด ์•„๋‘์ด๋…ธ ๋ณด๋“œ์— ์ฝ”๋“œ๋ฅผ ์—…๋กœ๋“œํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ Tools -> External Tools๋ฅผ ์ถ”๊ฐ€ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.

  • title: arduino_nano
  • command : <path>\avrdude.exe
  • Arguments : -patmega328p -carduino -PCOM7 -b115200 -v -Uflash:w:$(TargetPath):e
  • Initial directory :
  • โœ” Use Output window

command ๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ avrdude.exe๋ฅผ ์„ค์น˜ํ•œ ๊ฒฝ๋กœ๋ฅผ ์„ ํƒํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ ์•„๋‘์ด๋…ธ IDE๋ฅผ ์„ค์น˜ํ•˜์‹œ๋ฉด ์„ค์น˜ ๊ฒฝ๋กœ์— ์žˆ์Šต๋‹ˆ๋‹ค.

Arguments๋Š” ์ƒํ™ฉ์— ๋”ฐ๋ผ ์„ ํƒํ•ด์ค˜์•ผ ํ•ฉ๋‹ˆ๋‹ค. AVR upload executable file in Terminal #Upload๋ฅผ ์ฐธ๊ณ ํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.

info

Arguments ์˜ค๋ฅธ์ชฝ์— ํ™”์‚ดํ‘œ๋ฅผ ํด๋ฆญํ•˜๋ฉด ์ƒํ™ฉ์— ๋”ฐ๋ผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ณ€์ˆ˜๋“ค์ด ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ณ€์ˆ˜๊ฐ€ ์–ด๋–ค ๊ฒƒ์„ ์˜๋ฏธํ•˜๋Š”์ง€ ํ™•์ธํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด โœ” Prompt for arguments๋ฅผ ์„ ํƒํ•˜๊ณ  ์—…๋กœ๋“œ๋ฅผ ์‹œ๋„ํ•ด๋ณด๋ฉด ๋ณ€์ˆ˜๊ฐ€ ์–ด๋–ป๊ฒŒ ๋ฐ”๋€Œ์–ด์žˆ๋Š”์ง€ ๋ณด์—ฌ์ฃผ๋Š” ์ฐฝ์ด ์—…๋กœ๋“œ ์ „์— ๋œน๋‹ˆ๋‹ค.

์ˆ˜๋™ ์—…๋กœ๋“œ

Available tools ์ฐฝ์—์„œ ์›ํ•˜๋Š” ํ”„๋กœ๊ทธ๋ž˜๋จธ๋ฅผ ์˜ค๋ฅธ์ชฝ ํด๋ฆญํ•œ ํ›„, Device Programming์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

๋˜๋Š” Tools -> Device Programming์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

Tool์— ์›ํ•˜๋Š” ํ”„๋กœ๊ทธ๋ž˜๋จธ๋ฅผ ์„ ํƒํ•˜๊ณ  Apply๋ฅผ ๋ˆ„๋ฆ…๋‹ˆ๋‹ค.

Memories์—์„œ flash, eeprom ์—…๋กœ๋“œ๋ฅผ ํ•˜๊ฑฐ๋‚˜ ๋‹ค์šด๋กœ๋“œ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ ์™ธ Fuses, Lock bits ๋“ฑ์„ ์ œ์–ดํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

External tools๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ Tools -> <External tools title>์„ ์„ ํƒํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

๋นŒ๋“œ + ์ž๋™ ์—…๋กœ๋“œ

Project -> <ํ”„๋กœ์ ํŠธ๋ช…> Properties๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

Tool์„ ์„ ํƒํ•˜๋ฉด ํ”„๋กœ๊ทธ๋ž˜๋จธ๋ฅผ ์„ ํƒํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

AVR 8bit์˜ ๊ฒฝ์šฐ ๋””๋ฒ„๊น…๊ธฐ๋Šฅ์ด ์—†๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์Šต๋‹ˆ๋‹ค. ๋•Œ๋ฌธ์— Start Without Debugging(Ctrl + Alt + F5)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋””๋ฒ„๊น… ์—†์ด ๋นŒ๋“œ + ์—…๋กœ๋“œ๋ฅผ ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

External tools ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ์—๋Š” Custom Programming Tool์„ ์„ ํƒํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

caution

avrdude๊ฐ€ ํ™˜๊ฒฝ ๋ณ€์ˆ˜ Path์— ๋“ฑ๋ก๋˜์–ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

External tools๋ฅผ ๋“ฑ๋กํ•  ๋•Œ, Prompt for arguments๋ฅผ ์„ ํƒํ•œ ํ›„, ์ˆ˜๋™ ์—…๋กœ๋“œ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ์ฐฝ์ด ๋œน๋‹ˆ๋‹ค.

Command Line ๋‚ด์šฉ์„ ๋ณต์‚ฌํ•˜์—ฌ Custom programming tool์˜ Command์— ๋ถ™์—ฌ๋„ฃ์Šต๋‹ˆ๋‹ค.

๊ทธ๋ฆฌ๊ณ  <path>/avrdude.exe ๋ถ€๋ถ„์„ avrdude๋กœ ๋ฐ”๊พธ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

Last updated on