Programming/C Win32 MFC2017. 11. 24. 16:51

COMMAND는 클릭시 발생하고

프로토타입은 아무런 인자를 받지 않는다.

void CtestDlg::On___()

{

// TODO: 여기에 명령 업데이트 UI 처리기 코드를 추가합니다.

}


UPDATE_COMMAND_UI는 체크박스 등에 대한 처리라고 하는데

프로토타입은 CCmdUI를 받는다.

void CtestDlg::OnUpdate___(CCmdUI *pCmdUI)

{

// TODO: 여기에 명령 업데이트 UI 처리기 코드를 추가합니다.



[링크 : http://kjhworld.tistory.com/entry/메뉴-항목의-활성화비활성화]

[링크 : http://blog.naver.com/hji0223/220663170726]

Posted by 구차니

이번 행태가 의도가 좋고, 결과도 나쁘지 않게 될 사안중 하나지만



다르게 보면, 소통을 위해 뚫어 놓은 통로를 대의명분을 세워 악용하는게 아닐까 라는 생각이 들게 된다.


외상센터 있으면 당연히 좋은데.. 

한정된 자원(국고)으로 고려해봤을때 지원 우선순위가 떨어질수도 있으나

이번 언론에서 때려대면서 정의감이 불타 그러한 국가적 우선순위를 고려하지 않은채

이걸 먼저 해야 한다, 이게 중요하다 라고 한다면

역설적으로 더 중요하고 더 많은 사람들에게 이익이 갈 것들에 대해서 피해가 가게 될 우려도 있지 않을까?



아무튼 내 생각은

어떠한 옳고 좋은게 있더라도, 더 중요한게 있을 수 있고

한순간의 정의감 보다는 장기적인 관점이나 국가적인 관점에서의 더 나은 방안을 모색하고

우선순위를 따져봐야 하지 않을까?

(그 우선순위에 적폐청산 및 법률 제정 및 정비등을 모두 포함한다면 언론에서 반짝 떠들게 되는

이런 돈안되는 의료에 대한 지원도 나아질거라고 보인다)



이국종, 열악한 외상센터 호소하자.. 하루 7만명 청와대 홈피 몰려

[링크 : http://v.media.daum.net/v/20171124030556547]


[링크 : https://ko.wikipedia.org/wiki/포퓰리즘]

Posted by 구차니

아내님 왈



조금 약하긴 한데 안아프진 않네


급 시무룩...





+

4주 7만원

2주 4만 + 연장 이런개념이고

소모품으로 2.5만에 택배비는 무료

반납시 택배비는 대여자가 부담 인데


2주는 기본이라 써야하고

2주 후에 반납하면 7-4=3만원 환불해준다고 하네 ㅠㅠ

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

아두이노를 이용한 자동 바운서  (0) 2018.01.08
스펙트라 젖병소독기 사용리뷰  (2) 2018.01.07
젖꼭지 호환  (0) 2017.11.20
유축기 대여 관련  (0) 2017.11.20
완전 방전..  (0) 2017.11.16
Posted by 구차니
개소리 왈왈/독서2017. 11. 22. 18:40

어떻게 보면 리뷰가 정확한게

인기없을 책이고, 재미가 없다.

[링크 : http://blog.aladin.co.kr/haesung/9031567]


하지만 이런 학술에 가까운 내용이 더 나와주었으면 바램이 드는건

양쪽 다 까기 인형도 필요하고

우리나라 뿐만 아니라 국제적인 여러가지 담론들을 소개하며

여러가지 시선들에 대한 정보를 주어주기 때문이다.


재미없다고는 했지만 솔찍히

3, 4장을 제외하면(어쩌면 내가 이해를 하지 못하는 내용들이라) 나머지 내용들은 꽤나 흥미가 있었다.

1장 들어가며: 지식과 윤리 문제 

2장 대학 강의실에서의 페미니즘 

3장 경합하는 페미니즘‘들’ 

4장 사회 분석의 범주, 젠더 

5장 또 다른 가부장적 시선: 한국 페미니즘은 서구 중심적인가 

6장 공감, 정체성, 그리고 탈동일시(Disidentification)  




[링크 : https://www.kyobobook.co.kr/product/detailViewKor.laf?barcode=9788965641889]



+

2017.12.04


개인적으로 가장 기억에 남았던 챕터 3장 경합하는 페미니즘들

"백인 여성주의의 특징을 특권, 인간 존재의 상호의존성 부정, 개인주의, 마술이라는 네 특징으로 설명했다"


럼이 제시하는 사례를 통해 짐작해보면 마술은 사건의 깊은 상황과 맥락을 고려하지 않고 언어 표현 자체에만 집착하는 것을 뜻한다.




'개소리 왈왈 > 독서' 카테고리의 다른 글

책 - 에센셜 WPF  (2) 2017.12.03
공감지수 테스트.. (뜬금포 독서 예고?)  (0) 2017.11.30
책 - 졸혼시대  (0) 2017.11.15
책 - 남자들은 자꾸 나를 가르치려 든다  (0) 2017.11.13
읽기 예고...?  (0) 2017.11.10
Posted by 구차니

TextFX에서 줄별로 번호를 삽입후

내림차순 정렬 혹은 오름차순 정렬하고

삽입된 번호 삭제.. 라는 간단한 방법...



[링크 : https://superuser.com/questions/331098/flip-or-reverse-line-order-in-notepad]

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 구차니
Microsoft/Windows2017. 11. 21. 16:08

리눅스에서는 clear;ls;clear 식으로 하면되는데

MS 에서는 &로 하면되고

&&는 앞이 정상종료면 뒤를 수행하는 식이군


Using multiple commands and conditional processing symbols

You can run multiple commands from a single command line or script using conditional processing symbols. When you run multiple commands with conditional processing symbols, the commands to the right of the conditional processing symbol act based upon the results of the command to the left of the conditional processing symbol. For example, you might want to run a command only if the previous command fails. Or, you might want to run a command only if the previous command is successful.

You can use the special characters listed in the following table to pass multiple commands.

CharacterSyntaxDefinition

& [...]

command1 & command2

Use to separate multiple commands on one command line. Cmd.exe runs the first command, and then the second command.

&& [...]

command1 && command2

Use to run the command following && only if the command preceding the symbol is successful. Cmd.exe runs the first command, and then runs the second command only if the first command completed successfully.

|| [...]

command1 || command2

Use to run the command following || only if the command preceding || fails. Cmd.exe runs the first command, and then runs the second command only if the first command did not complete successfully (receives an error code greater than zero).

( ) [...]

(command1 & command2) 

Use to group or nest multiple commands.

; or ,

command1 parameter1;parameter2

Use to separate command parameters.


[링크 : https://www.microsoft.com/.../ntcmds_shelloverview.mspx?mfr=true]

    [링크 : https://stackoverflow.com/.../how-do-i-run-two-commands-in-one-line-in-windows-cmd]

[링크 : https://social.technet.microsoft.com/.../864c262b-13b9-4771-94ca-76e63866d59a/]

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