embeded/FPGA - ALTERA2017. 12. 5. 14:50

요즘 막 지름신이 와서

구경하다 중고로운 평화나라에서 DE0-Nano가 있어서 보는데

막 검색을 해보니 흐음... 내가 원하는건 DE0-Nano-SoC 인 듯..

순수 FPGA 공부도 좋긴한데 고민이 되네..

(그래도 조금은 지름신님 물리쳐진듯? ㅋㅋ)


DE0-Nano-SoC Kit/Atlas-SoC Kit 99$/90$

FPGA Device

Altera Cyclone® V SE 5CSEMA4U23C6N device

HPS (Hard Processor System)

925MHz Dual-core ARM Cortex-A9 processor

1GB DDR3 SDRAM (32-bit data bus)

[링크 : https://www.terasic.com.tw/...&CategoryNo=167&No=941&PartNo=2]


DE0-Nano Development and Education Board 79$/71$

Cyclone® IV EP4CE22F17C6N FPGA

22,320 Logic elements (LEs)

32MB SDRAM

2Kb I2C EEPROM 

G-Sensor ADI ADXL345, 3-axis accelerometer with high resolution (13-bit) 

A/D Converter NS ADC128S022, 8-Channel, 12-bit A/D Converter 50 ksps to 200 ksps 

[링크 : http://www.terasic.com.tw/...&CategoryNo=165&No=593&PartNo=2]


[링크 : https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/hb/cyclone-v/cv_51001.pdf]

[링크 : https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/hb/cyclone-v/cv_51002.pdf]


HPS 라고 해서.. ARM 코어 탑재.

이녀석이 Zynq 대응 버전이라고 보면 될려나?


[링크 : https://www.altera.com/products/fpga/features/cyv-soc-hps.html]


Cyclone 4는 ARM 코어 없다.

[링크 : https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/hb/cyclone-iv/cyiv-51001.pdf]



+

2017.12.10

음 Cyclone 4에 온칩 메모리?

[링크 : ftp://ftp.altera.com/up/pub/Altera_Material/13.1/Tutorials/DE0-Nano/Using_DE0-Nano_Flash.pdf]


최대 6.4Mb =약 800KB 인데 GX 모델로 가야지 그렇고

Cyclone IV Device Family 

Features The Cyclone IV device family offers the following features: 

■ Low-cost, low-power FPGA fabric: 

■ 6K to 150K logic elements 

■ Up to 6.3 Mb of embedded memory 

■ Up to 360 18 × 18 multipliers for DSP processing intensive applications 

■ Protocol bridging applications for under 1.5 W total power 


모델에 따라서 낮은건 270Kbit 이니까 34KB 부터 시작한다.

[링크 : https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/hb/cyclone-iv/cyiv-51001.pdf]


SRAM 이지 Flash는 아니었네..

Memory Modes Cyclone IV devices M9K memory blocks allow you to implement fully-synchronous SRAM memory in multiple modes of operation. Cyclone IV devices M9K memory blocks do not support asynchronous (unregistered) memory inputs.  

[링크 : https://www.altera.com/.../cyclone-iv/cyclone4-handbook.pdf]

'embeded > FPGA - ALTERA' 카테고리의 다른 글

de0-nano / nios2  (0) 2017.12.06
microblaze (xilinx) Nios II (altera)  (0) 2017.12.05
xilinx USB cable 드럽게 비싸네  (0) 2017.12.05
EPCS, EPCQ  (0) 2017.12.03
RTL - Register-transfer level  (0) 2017.11.09
Posted by 구차니
embeded/FPGA - ALTERA2017. 12. 5. 14:28

하나 사서 가지고 놀아볼까 하는데 가격이 미친듯..

[링크 : https://www.eleparts.co.kr/EPXG4TT7] USB Cable 2 40만... 딴데는 한 20하는거 같던데..

[링크 : https://www.xilinx.com/products/boards-and-kits/hw-usb-ii-g.html] 공식 225$

[링크 : https://www.eleparts.co.kr/EPX349J6] 패러럴 2.3만..


그래서 싼게 보이길래 찾아봤는데.. 아놔...

The Parallel Cable IV will not be supported in the Vivado tools. However, ChipScope analyzer supports this cable.

[링크 : https://www.xilinx.com/support/answers/54136.html]


아무튼. ISE까지는 어떻게 Parallel cable 4라고 해서 지원을 했는데

vivado 부터는 아예 legacy 장비라서 없애 버린듯..


product obsolete의 압박... -_-

Xilinx Parallel Cable IV

DS097 (v3.0) January 21, 2016

[링크 : https://www.xilinx.com/support/documentation/data_sheets/ds097.pdf



ChipScope analyzer는 장치가 아니라 툴이네..

근데 얘도.. ISE 포함된 애인가?

[링크 : https://www.xilinx.com/itp/xilinx10/isehelp/ise_c_process_analyze_design_using_chipscope.htm]


'embeded > FPGA - ALTERA' 카테고리의 다른 글

de0-nano / nios2  (0) 2017.12.06
microblaze (xilinx) Nios II (altera)  (0) 2017.12.05
Cyclone IV,V (terasic de0-nano)  (0) 2017.12.05
EPCS, EPCQ  (0) 2017.12.03
RTL - Register-transfer level  (0) 2017.11.09
Posted by 구차니
embeded/FPGA - ALTERA2017. 12. 3. 23:49

altera 라고 무조건 CPLD에 직접 퓨징하는게 아니라..

SRAM을 지원하는 제품이 altera에도 있다라고 알고 있던 지식을 정정해야 할 듯..

예전에 한백전자 셋트에서 cyclone 4 였던거 같은데

얘도 SRAM 기반으로 자일링스 처럼 SPI 플래시가 달린 녀석인가 보네..


[링크 : https://cms3.koreatech.ac.kr/sites/yjjang/down/dsys08/M04_fpga.pdf]

[링크 : http://blog.daum.net/trts1004/12109265]

[링크 : https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/hb/cfg/cyc_c51014.pdf]


EPCS - EPC Single

EPCQ - EPC Quad

EPC - Enhanced Programmable Configuration


EPCS - Erasable Programmable Configurable Serial

Source: page1-1 of Nios II Flash Programmer User Guide.

[링크 : https://www.alteraforum.com/forum/showthread.php?t=38512]



+

DE0-Nano를 살까 고심중


+

학교 실습에서 쓰던건 다른 녀석인데(HBE-EMPOS 2 였던걸로.. PXA255)

아무튼 CIS 카메라 쓴다고 FPGA에서 cyclone2에 quartous 였나? 이걸로 구웠는데..

비슷한 구조인가 모르겠다..

[링크 : http://www.hanback.co.kr/board/download_file.php?ASN=26_1447944412&BDN=BD1142&IDX=6]


예전 자료 뒤져서 찾아보니.. Configuration Device라고 있는걸 봐서는..

Altera 이녀석도 xiliinx 처럼 외부 SPI EEPROM을 달고 거기다가 프로그램 써서 작동 시키는 듯?


'embeded > FPGA - ALTERA' 카테고리의 다른 글

de0-nano / nios2  (0) 2017.12.06
microblaze (xilinx) Nios II (altera)  (0) 2017.12.05
Cyclone IV,V (terasic de0-nano)  (0) 2017.12.05
xilinx USB cable 드럽게 비싸네  (0) 2017.12.05
RTL - Register-transfer level  (0) 2017.11.09
Posted by 구차니
embeded/Cortex-M3 Ti2017. 11. 21. 17:46

아.. 부트 시리얼이라고 따로 있었구나..

이녀석 프로젝트 분석해서 봐야 할 듯..


C:\StellarisWare\boards\ek-lm3s1968\boot_serial

C:\StellarisWare\tools\sflash



[링크 : https://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/t/237494]

'embeded > Cortex-M3 Ti' 카테고리의 다른 글

cortex-m3 keil 부트로더  (0) 2017.12.21
keil sct - 링커 스크립트  (0) 2017.12.11
JTAG / SWD 핀 연결방법 조사..  (0) 2017.04.04
어? 의외로 RX busy는 없네?  (0) 2017.03.27
lm3s1607 uart pull up 문제  (0) 2017.03.24
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 11. 21. 16:36

AVRISP mk2 atmel 정품

AVRISP mk2 clone(stm32 사용) 두개 꽂으니 처음보는 창이 뜨는데

어느게 atmel 정품인지 구분할 방법이 없네?


STK500은 1.845MHz가 한계...

(us-technology.co.kr 에서 구매한건데 사이트 사라짐 ㅠㅠ)


AVRISP mk2 ATMEL 정품. 8.0MHz 까지 지원한다.

(근데 16MHz 만 달아서 오버시키는 셈인데 8.0MHz를 어떻게 쓰지 ?)


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

ATMEL AT32UC3A 시리즈  (0) 2023.07.04
AVR V-USB (USB HID)  (0) 2021.06.28
avr unlock 관련  (0) 2017.11.21
avrdude + usbasp 테스트  (0) 2017.11.21
avrdude 실행 안됨  (0) 2017.11.18
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 11. 21. 14:58

secureAVR 이라는 걸 찾아보라는데 링크가 깨졌고

비슷한 걸로 이런건 보인다.

근데.. CryptoAuthentication은 AES 보안된 EEPROM 일뿐이네..

[링크 : http://www.atmel.com/products/security-ics/default.aspx]

    [링크 : http://www.atmel.com/Images/Atmel-8914-CryptoAuth-ATAES132A-Datasheet.pdf]

    [링크 : http://www.atmel.com/Images/Atmel-8895S-CryptoAuth-ATECC108A-Datasheet-Summary.pdf]

    [링크 : http://www.atmel.com/images/Atmel-8885-CryptoAuth-ATSHA204A-Datasheet.pdf]


TPM이라고 Trusted Platform Module이 AVR RISC 를 채택한 프로세서네..

알고리즘 타입에.. RSA / SHA-1 / SHA-2

[링크 : http://www.atmel.com/Images/Atmel-5295S-TPM-AT97SC3204-LPC-Interface-Datasheet-Summary.pdf]


아무튼.. 아래는 2000년 연구 자료고

2010년 즈음에 조사해도 여전히 뚫린다.. 라는 결론?

[링크 : http://www.cl.cam.ac.uk/~sps32/mcu_lock.html]

    [링크 : http://www.avrfreaks.net/forum/atmega-can-be-unlocked?page=all]


unlock하는 소스와 제품.. ㄷㄷㄷ

[링크 : http://martin-stej.wz.cz/index.php?page_id=avr_unlocker&lang=en]



+

다르게 보면.. 보안칩을 별도로 쓰거나

프로그램 자체를 암호화 하고 그걸 칩에서 복호화 해서 쓰는 걸로

lock bit 등의 효용 자체가 없음이 증명(?)된 걸려나?

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

AVR V-USB (USB HID)  (0) 2021.06.28
avrisp mk2 / avrisp mk2 clone / stk500 clone  (0) 2017.11.21
avrdude + usbasp 테스트  (0) 2017.11.21
avrdude 실행 안됨  (0) 2017.11.18
keil bootloader example - avr/atmel  (0) 2017.11.17
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 11. 21. 13:37

커맨드 최종버전...

퓨즈 비트를 먼저 셋팅하고 리부팅 하고 나서, 플래시에 데이터를 쓴다~ 라는 설정 (들어있는 비트는 기본값 임)

일단 내가 가진 usbasp는 -B 옵션으로 SCK 변경이 안되서 좀 더 실험을 해봐야 함...

D:\avrdude>avrdude -v -cusbasp -pm64 -Ulfuse:w:0xC1:m -Uhfuse:w:0x99:m -Uefuse:w:0xFF:m -Ulock:w:0x3F:m -E reset && avrdude -v -cusbasp -pm64 -Uflash:w:atmega64.hex:i 



avrdude는 프로그램 종료시 기본으로 reset을 건다는데..

-E exitspec[,…]

By default, AVRDUDE leaves the parallel port in the same state at exit as it has been found at startup. This option modifies the state of the ‘/RESET’ and ‘Vcc’ lines the parallel port is left at, according to the exitspec arguments provided, as follows:


reset

The ‘/RESET’ signal will be left activated at program exit, that is it will be held low, in order to keep the MCU in reset state afterwards. Note in particular that the programming algorithm for the AT90S1200 device mandates that the ‘/RESET’ signal is active before powering up the MCU, so in case an external power supply is used for this MCU type, a previous invocation of AVRDUDE with this option specified is one of the possible ways to guarantee this condition.


noreset

The ‘/RESET’ line will be deactivated at program exit, thus allowing the MCU target program to run while the programming hardware remains connected.


vcc

This option will leave those parallel port pins active (i. e. high) that can be used to supply ‘Vcc’ power to the MCU.


novcc

This option will pull the ‘Vcc’ pins of the parallel port down at program exit.


d_high

This option will leave the 8 data pins on the parallel port active (i. e. high).


d_low

This option will leave the 8 data pins on the parallel port inactive (i. e. low).


Multiple exitspec arguments can be separated with commas. 

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

[링크 : http://www.avrfreaks.net/forum/avrdude-reset-command[]



atmega64에서 avrdude로 테스트

-p에서 칩을 정해주지 않으면 실행이 되지 않는다.

D:\avrdude>avrdude -patmega64 -cusbasp


avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: error: program enable: target doesn't answer. 1

avrdude: initialization failed, rc=-1

         Double check connections and try again, or use -F to override

         this check.



avrdude done.  Thank you.

D:\avrdude>avrdude -patmega64 -cusbasp


avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.02s


avrdude: Device signature = 0x1e9602 (probably m64)


avrdude: safemode: Fuses OK (E:FF, H:C9, L:FF)


avrdude done.  Thank you.



D:\avrdude>avrdude -patmega64 -v -cusbasp


avrdude: Version 6.3, compiled on Feb 17 2016 at 09:25:53

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2014 Joerg Wunsch


         System wide configuration file is "D:\avrdude\avrdude.conf"


         Using Port                    : usb

         Using Programmer              : usbasp

         AVR Part                      : ATmega64

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PA0

         RESET disposition             : dedicated

         RETRY pulse                   : SCK

         serial program mode           : yes

         parallel program mode         : yes

         Timeout                       : 200

         StabDelay                     : 100

         CmdexeDelay                   : 25

         SyncLoops                     : 32

         ByteDelay                     : 0

         PollIndex                     : 3

         PollValue                     : 0x53

         Memory Detail                 :


                                  Block Poll               Page                       Polled

           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack

           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

           eeprom         4    20    64    0 no       2048    8      0  9000  9000 0xff 0xff

           flash         33     6   128    0 yes     65536  256    256  4500  4500 0xff 0xff

           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00

           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00


         Programmer Type : usbasp

         Description     : USBasp, http://www.fischl.de/usbasp/


avrdude: auto set sck period (because given equals null)

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: error: program enable: target doesn't answer. 1

avrdude: initialization failed, rc=-1

         Double check connections and try again, or use -F to override

         this check.



avrdude done.  Thank you.

D:\avrdude>avrdude -patmega64 -v -cusbasp


avrdude: Version 6.3, compiled on Feb 17 2016 at 09:25:53

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2014 Joerg Wunsch


         System wide configuration file is "D:\avrdude\avrdude.conf"


         Using Port                    : usb

         Using Programmer              : usbasp

         AVR Part                      : ATmega64

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PA0

         RESET disposition             : dedicated

         RETRY pulse                   : SCK

         serial program mode           : yes

         parallel program mode         : yes

         Timeout                       : 200

         StabDelay                     : 100

         CmdexeDelay                   : 25

         SyncLoops                     : 32

         ByteDelay                     : 0

         PollIndex                     : 3

         PollValue                     : 0x53

         Memory Detail                 :


                                  Block Poll               Page                       Polled

           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack

           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

           eeprom         4    20    64    0 no       2048    8      0  9000  9000 0xff 0xff

           flash         33     6   128    0 yes     65536  256    256  4500  4500 0xff 0xff

           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00

           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00


         Programmer Type : usbasp

         Description     : USBasp, http://www.fischl.de/usbasp/


avrdude: auto set sck period (because given equals null)

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.03s


avrdude: Device signature = 0x1e9602 (probably m64)

avrdude: safemode: hfuse reads as C9

avrdude: safemode: efuse reads as FF


avrdude: safemode: hfuse reads as C9

avrdude: safemode: efuse reads as FF

avrdude: safemode: Fuses OK (E:FF, H:C9, L:FF)


avrdude done.  Thank you.


-Ulock:r:-:i 로 lock 비트나 fuse 비트를 읽어서 콘솔로 출력가능 함

D:\avrdude>avrdude -patmega64 -cusbasp -Ulock:r:-:i


avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.03s


avrdude: Device signature = 0x1e9602 (probably m64)

avrdude: reading lock memory:


Reading | ################################################## | 100% 0.02s


avrdude: writing output file "<stdout>"

:010000003FC0

:00000001FF


avrdude: safemode: Fuses OK (E:FF, H:C9, L:FF)


avrdude done.  Thank you. 

[링크 : http://shawnhymel.com/622/quick-tip-reading-fuse-bits-in-an-arduino/]


일단.. -p 옵션의 칩이 다르면 중단한다.(avr studio랑 같네..)

D:\avrdude>avrdude -patmega128 -cusbasp -Ulock:r:-:i


avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions


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


avrdude: Device signature = 0x1e9602 (probably m64)

avrdude: Expected signature for ATmega128 is 1E 97 02

         Double check chip, or use -F to override this check.


avrdude done.  Thank you. 


다 읽는데 35초 정도? 늦게 걸리길래 속도 업해보려고 하니 지원을 하지 않는다고 한다. ㅠㅠ

D:\avrdude>avrdude -patmega64 -cusbasp -Uflash:r:dump.hex:i -B 0.6


avrdude: set SCK frequency to 1500000 Hz

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.03s


avrdude: Device signature = 0x1e9602 (probably m64)

avrdude: reading flash memory:


Reading | ################################################## | 100% 35.25s


avrdude: writing output file "dump.hex"


avrdude: safemode: Fuses OK (E:FF, H:C9, L:FF)


avrdude done.  Thank you. 

D:\avrdude>avrdude -patmega64 -cusbasp -Uflash:r:dump.hex:i -B 2


avrdude: set SCK frequency to 375000 Hz

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.05s


avrdude: Device signature = 0x1e9602 (probably m64)

avrdude: reading flash memory:


Reading | ################################################## | 100% 35.25s


avrdude: writing output file "dump.hex"


avrdude: safemode: Fuses OK (E:FF, H:C9, L:FF)


avrdude done.  Thank you.


일단 펌웨어 업데이트 시도는 해봐야 할 듯...

[링크 : http://tmlgt.blog.me/220332919733]

[링크 : http://blog.lincomatic.com/?p=1480]



+

초기값 셋팅이 atmega4에서 아래와 같이 나오는데

맞는진 확인해 봐야겠지만.. intel HEX 포맷을 기반으로 읽으려니 빡쳐서 hexa로 출력!

avrdude: safemode: Fuses OK (E:FD, H:99, L:E1

D:\avrdude>avrdude -patmega64 -cusbasp  -v -Ulock:r:-:i

avrdude: writing output file "<stdout>"

:010000003FC0

:00000001FF

D:\avrdude>avrdude -patmega64 -cusbasp  -v -Ulock:r:-:h

avrdude: writing output file "<stdout>"

0x3f


그걸 계산기에 때려 넣으니 아래와 같이 나온다.

internal RC 1MHz 이고 Lockbit는 0xFF인데

bit 7/6이 사용 불가인지 0x3F가 실질적인 기본 값인 것으로 보인다.


[링크 : http://eleccelerator.com/fusecalc/fusecalc.php?chip=atmega64]

[링크 : ]http://eleccelerator.com/...?chip=atmega64&LOW=E1&HIGH=99&EXTENDED=FD&LOCKBIT=3F]

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

avrisp mk2 / avrisp mk2 clone / stk500 clone  (0) 2017.11.21
avr unlock 관련  (0) 2017.11.21
avrdude 실행 안됨  (0) 2017.11.18
keil bootloader example - avr/atmel  (0) 2017.11.17
avrdude -U 옵션  (0) 2017.11.13
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 11. 18. 13:19

저 에러 자체가 win64/win32 호환 문제라는데

64bit 깔린데서 하나는 실행되고 하나는 안되는건

도대체 머가 문제인 거야?



+

2017.11.20


(x64와 x86 연결 문제를 야기하는)xinput.dll이 문제거나, 권한 문제거나

[링크 : http://freewisdoms.com/how-to-fix-0xc000007b-application-error/]

    [링크 : https://www.youtube.com/watch?v=lIvPZjzAi_w]

    [링크 : https://www.youtube.com/watch?v=ZO_Tyjjf8BI]

[링크 : https://stackoverflow.com/questions/10492037/the-application-was-unable-to-start-correctly-0xc000007b]

[링크 : https://forums.sketchup.com/t/windows-7-0xc000007b-error-on-startup/12323/7]

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

avr unlock 관련  (0) 2017.11.21
avrdude + usbasp 테스트  (0) 2017.11.21
keil bootloader example - avr/atmel  (0) 2017.11.17
avrdude -U 옵션  (0) 2017.11.13
USBasp 설치  (0) 2017.11.13
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2017. 11. 17. 16:03

어느거 기준인진 좀 코드를 분석해 봐야 할 듯?


프로젝트 파일 뜯어 보니

 Device (AT89C51ID2)

 Vendor (Atmel)

크앙... AT89C51 8051계열용이네.. ㅠㅠ


[링크 : http://www.keil.com/download/docs/52.asp]

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

avrdude + usbasp 테스트  (0) 2017.11.21
avrdude 실행 안됨  (0) 2017.11.18
avrdude -U 옵션  (0) 2017.11.13
USBasp 설치  (0) 2017.11.13
avr 저전압 감지  (0) 2017.08.11
Posted by 구차니
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 모드로 해당 값을 쓰도록 한다 정도?

-Ulock:w:0x3F:m

-Uefuse:w:0x05:m

-Uhfuse:w:0xDA:m

-Ulfuse:w:0xFF:m



-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:


calibration

One or more bytes of RC oscillator calibration data.


eeprom

The EEPROM of the device.


efuse

The extended fuse byte.


flash

The flash ROM of the device.


fuse

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


hfuse

The high fuse byte.


lfuse

The low fuse byte.


lock

The lock byte.


signature

The three device signature bytes (device ID).


fuseN

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


application

The application flash area of ATxmega devices.


apptable

The application table flash area of ATxmega devices.


boot

The boot flash area of ATxmega devices.


prodsig

The production signature (calibration) area of ATxmega devices.


usersig

The user signature area of ATxmega devices.


The op field specifies what operation to perform:


r

read the specified device memory and write to the specified file


w

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


v

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:


i

Intel Hex


s

Motorola S-record


r

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


e

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


m

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.


a

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


d

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.


h

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


o

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


b

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 구차니