embeded/AVR (ATmega,ATtiny)2009. 4. 15. 00:17

avrdude를 막상 사용해보려니 막막해서.. 일단 이런녀석을 찾아 보게 되었다.
이거 말고도 존재하지만, 막상 실행하보니 윈도우용.. gnome용이나 Xwindow용으로 할 방법이 딱히 보이지 않아서
(게다가 g++도 설치가 되어 있지 않으니 ㄱ-) 포기를 할까 하다가 구글에서 조금 더 찾아 보니
gnome-avrdude라는 것을 발견하게 되었다.  아무튼 이녀석으로 나중에 AVR 읽어 보는 테스트를 해봐야겠다.

[발견 : korean.osstrans.net/software/gnome-avrdude.html]
[gnome-avrdude : http://sourceforge.net/projects/gnome-avrdude]

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

ubuntu에서 gnome-avrdude 사용하기  (0) 2009.05.27
STK-200 / STK-500 호환 AVR ISP  (2) 2009.04.20
linux에서 AVR 컴파일하기  (0) 2009.04.07
어셈블리 언어 ORG 명령  (4) 2009.03.19
AVR Studio / AVR-GCC 뜯어 보기  (0) 2008.11.18
Posted by 구차니
개소리 왈왈2009. 4. 14. 14:01
순위 유입경로
1 www.google.co.kr (3904)
2 search.daum.net (3853)
3 www.google.com (312)
4 kr.search.yahoo.com (175)
5 search.empas.com (143)
6 search.nate.com (141)
7 blog.naver.com (131)
8 www.soondesign.co.kr (112)
9 cafe.naver.com (93)
10 mr-ok.com (87)
11 image.search.daum.net (81)
12 offree.net (72)
13 images.google.co.kr (65)
14 blogsearch.google.co.. (60)
15 sa.search.daum.net (55)
16 www.choboweb.com (53)
17 bluenlive.net (51)
18 mycom.kr (45)
19 cdmanii.tistory.com (44)
20 search.cyworld.com (35)

의외인건 cyworld에서 치고 들어 온다는것(아마 nate 연동일려나..)
그리고 생각외로 이미지 검색으로 오는것도 많다는 점
게다가 네이버 검색보다는 내 블로그를 통해 타고 온 경우가 더 많다는 점 -ㅁ-!
하지만 드물게 다른 나라 구글 타고 온건 순위에 없다는 점 ㅠ.ㅠ

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

KT 애들 희한해~  (4) 2009.04.17
블로그 대문 사진을 바꿀까..  (2) 2009.04.16
일요일에 한 짓들  (8) 2009.04.13
내 블로그 방명록은 오스트레일리아다!  (4) 2009.04.11
젠장 바이러스!!  (4) 2009.04.10
Posted by 구차니
Linux2009. 4. 14. 11:56
int fd;
int rand_val;

fd = open("/dev/random", O_RDONLY);
read(fd,&rand_val,sizeof(int));
close(fd);

조인시에 의하면 조용한 시스템에서는 랜덤값이 안 바뀌는 문제가 있을 수도 있으니 주의하라고 하지만..
우리 시스템은 조용할리가 없기에 -ㅁ- random() 보다는 이녀석을 써볼까 생각중이다.

[링크 : http://www.joinc.co.kr/modules/moniwiki/wiki.php/article/random]


테스트 이후 : 커널에서 random device 사용이 설정이 안되어 있는지, read시에 무한루프 걸리는 듯 하다.
Posted by 구차니
embeded/80512009. 4. 14. 10:57
대용량의 데이터(예를들어 폰트데이터)를 저장하는데 있어 기본변수로 선언을 했더니 문제가 발생했다.
Memory Model은 기본 값인 Small model이었고, 이로 인해서 data형으로 선언이 된다.(위의 small model 참조)

그래서 Large model로 변경하니 xdata로 되었고, 이로 인해 64k까지 가능해져서 에러없이 돌아 갔지만,
다른 문제가 발생을 해서 오작동을 한것으로 생각이 된다.

아무튼 플래시는 넉넉하니, code라는 변수 타입을 선언하면 rom에 저장이 되고,
메모리에 저장이 되지 않으므로 별다른 문제 없이 프로그램이 실행된다.


Memory TypeDescription
code Program memory (64 KBytes); accessed by opcode MOVC @A+DPTR.
data Directly addressable internal data memory; fastest access to variables (128 bytes).
idata Indirectly addressable internal data memory; accessed across the full internal address space (256 bytes).
bdata Bit-addressable internal data memory; supports mixed bit and byte access (16 bytes).
xdata External data memory (64 KBytes); accessed by opcode MOVX @DPTR.
far Extended RAM and ROM memory spaces (up to 16MB); accessed by user defined routines or specific chip extensions (Philips 80C51MX, Dallas 390).
pdata Paged (256 bytes) external data memory; accessed by opcode MOVX @Rn.

If no memory type is specified for a variable, the compiler implicitly locates the variable in the default memory space determined by the memory model: SMALL, COMPACT, or LARGE. Function arguments and automatic variables that cannot be located in registers are also stored in the default memory area. Refer to Memory Models for more information.

[출처 : http://www.keil.com/support/man/docs/c51/c51_le_memtypes.htm]


xdata

The xdata memory type may be used to declare variables only. You may not declare xdata functions. This memory is indirectly accessed using 16-bit addresses and is the external data RAM of the 8051. The amount of xdata is limited in size (to 64K or less).

Variables declared xdata are located in the XDATA memory class.
Declare xdata variables as follows:
unsigned char xdata variable;
[출처 : http://www.keil.com/support/man/docs/c51/c51_le_xdata.htm]

code

The code memory type may be used for constants and functions. This memory is accessed using 16-bit addresses and may be on-chip or external.

    * For constants (ROM variables), code memory is limited to 64K.
      Objects are limited to 64K and may not cross a 64K boundary.
      Constant variables declared code are located in the CODE memory class.
    * For program code (functions), code memory is limited to 64K.
      Program functions are stored in the CODE memory class by default.
      The code memory type specifier is not required.

Declare code objects as follows:
unsigned char code code_constant;
unsigned int func (void)
{
    return (0);
}
[출처 : http://www.keil.com/support/man/docs/c51/c51_le_code.htm]

Small Model

In this model, all variables, by default, reside in the internal data memory of the 8051 system as if they were declared explicitly using the data memory type specifier.

In this memory model, variable access is very efficient. However, all objects (that are not explicitly located in another memory area) and the stack must fit into the internal RAM. Stack size is critical because the stack space used depends on the nesting depth of the various functions.

Typically, if the linker is configured to overlay variables in the internal data memory, the small memory model is the best model to use.

[출처 : http://www.keil.com/support/man/docs/c51/c51_le_modelsmall.htm]

Large Model

In the large model, all variables, by default, reside in external data memory (which may be up to 64K Bytes). This is the same as if they were explicitly declared using the xdata memory type specifier.

The data pointer (DPTR) is used to address external memory. It is important to note that memory access through the data pointer is inefficient and slow, especially on variables that are two or more bytes long. This type of data access mechanism generates more code than the small model or compact model.

[출처 : http://www.keil.com/support/man/docs/c51/c51_le_modellarge.htm]

Posted by 구차니
embeded/80512009. 4. 13. 22:53
Summary           *** Error C249
                              Segment : Segment too large

Description        The compiler detected a data segment that was too large.
                        The maximum size of a data segment depends on memory space.

[출처 : http://www.keil.com/support/man/docs/c51/c51_c249.htm]

Segment too large는 데이터 저장부분에서 용량을 초과 할때 발생하는 것으로 보인다.
Memory Model을 Small Model 에서 Large Model로 교체하면 컴파일은 되지만, 제대로 실행이되는지는 모르겠다.

해결내용은 아래의 링크로
2009/04/14 - [AVR / 8051] - keil compiler - memory type (code,xdata,idata)

Posted by 구차니
개소리 왈왈2009. 4. 13. 00:43
와우 만렙찍기
전장 돌아서 점수 쌓기
---- 요기까지 (젠장, 쌓이는 경험치 많큼 죄책감이 ㅠ.ㅠ)

그리고 Xwindow 구동 옵션 찾기(깔끔하게 실행!)
시리얼포트 pc 2대 연결하기(minicom / putty serial)

은근히 한게 없네 -ㅁ-



주중에 먹어 댄 양을 보니.. 다이어트는 원상복구 되었겠군 ㅠ.ㅠ


아무래도 묻지마 250W 파워이다보니, 전력이 부족해서 발열이 심하고, 그로인해 케이스 내부 온도가 올라가고
그러다 보니 CPU팬은 죽어라 돌고 그래서 어쩔수 없이 방열을 위해서 머리를 데굴데굴 굴리던중 약간의 만행을
저질렀다 -ㅁ-!

바람을 슝슝 뽑아 내기 위한 방향으로 하다 보니 참.. 아름답지 못하다 ㄱ-
그리고 키보드 / 마우스 없이 사용하는 본체이다 보니 은근히 케이블이 단순하다.
AVR용 패러럴 프로그래머, 시리얼 케이블, 랜 케이블 끝.

아무튼 덕분에 소음이 1/3이상 줄었는데.. 괜히 CPU 분해해서 써멀 콤파운드 발라야 하나 사야 하나 고민을 했는데
이렇게라도 해결이 되서 다행이다 싶다. 한동안 이걸로 버텨야 하는데 말이다 ㅋㅋ
Posted by 구차니
Putty를 사용한 SSH X11 Forwarding은 상당히 유용하지만,
Gnome이나 KDE 같은 윈도우 매니저를 한번에 끌어 올때에는 아름답지 못한 결과를 보여준다.

기본 실행옵션인 -multiwindow로 gnome-session을 실행한 결과

Xming이나 cygwin/X의 경우 기본 실행 옵션이 -multiwindow로 실행되기 때문에
위와 같이 각 윈도우 별로 MS windows(TM)의 윈도우창이 붙게 된다. 그런 이유로 상단의 흰 줄은
Gnome Panel이 떠야 함에도 불구하고 제대로 뜨지 못하는 문제를 보여준다.
그리고 작업표시줄에도 윈도우 별로 별도의 창들이 떠있음을 볼 수 있다.

이를 해결 하기 위해서는
Xwindow 구동 방식옵션을 바꾸어 주어야 하는데,
옵션을 살펴보면 아래와 같이 -multiwindow 외에 -fullscreen 이라는 녀석이 존재한다.

XWin.exe
[-help]
[-clipboard [-nounicodeclipboard] ]
[-clipupdates clip_updates_above_n ]
[-emulate3buttons timeout_in_milliseconds ]
[-engine engine_number ]
[-fullscreen [-depth depth_in_bits_per_pixel ] [-refresh refresh_rate_in_herz ] ]
[-ignoreinput]
[-lesspointer]
[-multiwindow]
[-multimonitors]
[-nodecoration]
[-rootless]
[-screen screen_number width height ...]
[-scrollbars]
[-[no]trayicon]
[-[no]unixkill]
[-[no]winkill]
[-[no]keyhook]
[-swcursor]
[-xkbrules XKBRules ]
[-xkbmodel XKBModel ]
[-xkblayout XKBLayout ]
[-xkbvariant XKBVariant ]
[-xkboptions XKBOptions ]
[-logfile path_to_logfile ]
[-logverbose verbosity_level ]


[-fullscreen [-depth depth_in_bits_per_pixel ] [-refresh refresh_rate_in_herz ] ]
● The -fullscreen parameter tells Cygwin/X to open a given screen in fullscreen mode.
● The -depth parameter can only be used with -fullscreen and a DirectDraw based engine to specify the display depth that should be used for the fullscreen Cygwin/X screen.
● The -refresh parameter can only be used with -fullscreen and a DirectDraw based engine to specify the refresh rate that should be used for the fullscreen Cygwin/X screen.

[-multiwindow]
● Start the integrated Windows-based window manager, which launches each top-level X window in its own Windows window. Not to be used together with -rootless nor -fullscreen.

[링크 : http://x.cygwin.com/docs/ug/configure-cygwin-x-options.html]

아무튼 multiwindow에서 fullscreen으로 옵션을 바꾸어서 실행하면 아래와 같이 나오게 된다.


아쉽게도, 한번에 창을 잡을수가 없어 윈도우 작업표시줄은 윈도우에서, Gnome 화면은 리눅스에서 잡았다.
아무튼 작업표시줄에 나타난 프로그램도 Xming 하나로 하나의 윈도우를 그대로 끌어 오게 되고,
Xwindow 화면 역시 깔끔하게 위의 Gnome-Panel도 제대로 나오게 된다. (참 쉽죠~?)

참고사항 : 이렇게 구동한 윈도우매니저는 shutdown 시에 gnome-session만 종료를 한다.
               다르게 말하자면, 윈도우만 종료되지 컴퓨터 자체가 종료되진 않는다.
Posted by 구차니
Linux2009. 4. 12. 19:03

< startx and .xinitrc >

If you use the startx command for starting up the X Window System, you'll need to edit a file called .xinitrc that is located in your home directory. If the file already is there, just open it with your favorite text editor. If you don't have such a file in your home directory, create a new file with that name. Note the dot in the file name - it shows you that the file is a hidden file and doesn't show when you do a normal directory listing.

If you already have a .xinitrc file in your home directory, it may be a huge scary-looking text file with a lot of text that makes just as much sense as a file produced with a random number generator and encrypted after writing. If you want to make a backup of this file, rename it to something like .xinitrc.backup or whatever you wish:
mv .xinitrc .xinitrc.backup

Now you can use your text editor for creating a new, blank .xinitrc file. Although the file may be a complicated multi-line geeky script, it can be very simple, too. In its simplest it just contains a single line with the name of your new window manager. So, add a line like this to your file:
exec windowmanager
where windowmanager is the command that starts the window manager you want to be your default. For example, to make Window Maker your default window manager, you'd have a line like this:
exec wmaker

The commands for starting some popular window managers and desktop environments are:

  • KDE = startkde
  • Gnome = gnome-session
  • Blackbox = blackbox
  • FVWM = fvwm (or, for FVWM2 it's fvwm2, surprise)
  • Window Maker = wmaker
  • IceWM = icewm

After editing the .xinitrc file, save your changes. The next time you do a startx, the new window manager will be your default.


[출처 : http://www.tuxfiles.org/linuxhelp/changeman.html]


startx 라고 하면 리눅스에서 Xwindow가 구동이 되는데
어떠한 원리로 KDE나 Gnome 혹은 그 외의 윈도우 매니저가 선택이 되는지 궁금해서 찾아보게 되었지만
실제로 얻어낸 정보는 KDE 실행 파일이름(혹은 스크립트) Gnome 실행 파일이름 뿐이다..

]$ startx
xauth:  creating new authority file /home/morpheuz/.serverauth.3128

X.Org X Server 1.4.99.901 (1.5.0 RC 1)
Release Date: 5 September 2007
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.18-53.1.14.el5xen i686
Current Operating System: Linux localhost.localdomain 2.6.25-14.fc9.i686 #1 SMP Thu May 1 06:28:41 EDT 2008 i686
Build Date: 06 May 2008  03:35:07PM
Build ID: xorg-x11-server 1.4.99.901-29.20080415.fc9
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Apr 13 00:10:44 2009
(==) Using config file: "/etc/X11/xorg.conf"

(EE) Failed to initialize GLX extension (NVIDIA X driver not found)
expected keysym, got XF86Info: line 914 of inet
expected keysym, got XF86Info: line 914 of inet
Started none
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/3316,unix/unix:/tmp/.ICE-unix/3316
** Message: another SSH agent is running at: /tmp/ssh-cwskYs3316/agent.3316
Window manager warning: Failed to read saved session file /home/morpheuz/.metacity/sessions/default1.ms: Failed to open file '/home/morpheuz/.metacity/sessions/default1.ms': No such file or directory
Failure: Module initalization failed

** (nm-applet:3382): WARNING **: <WARN>  applet_dbus_manager_start_service(): Could not acquire the NetworkManagerUserSettings service.
  Message: 'Connection ":1.102" is not allowed to own the service "org.freedesktop.NetworkManagerUserSettings" due to security policies in the configuration file'


(nm-applet:3382): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
system-config-printer-applet: failed to start NewPrinterNotification service

** (nautilus:3343): WARNING **: Unable to add monitor: Not supported


도대체.. 어떤 파일이나 어떠한 환경변수를 사용하여 그것을 설정하는지 알 수가 없다.
Posted by 구차니
개소리 왈왈2009. 4. 11. 14:36





아니 그렇다구요 -ㅁ-
사족 : 아.. 대학숙제 블로그 OTL

[사진 출처 : http://www.planetware.com/picture/central-australia-ayers-rock-aus-ausw542.htm]

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

구글신님께서 다음을 추월!  (4) 2009.04.14
일요일에 한 짓들  (8) 2009.04.13
젠장 바이러스!!  (4) 2009.04.10
Cumulus for TiStory 설치!  (0) 2009.04.10
RFonlie으로 돌아오라고?  (0) 2009.04.09
Posted by 구차니
개소리 왈왈2009. 4. 10. 21:43
지금 검색해보니 동일인지는 모르겠지만 두 녀석이 있었다.

Win32/Taterf.worm.99840 - 2009년 4월 7일 발견
FLNM.CMDCloaked Malware - 2009년 3월 28일 발견

신형 웜이고, 증상은
각 드라이브에 내 컴퓨터 - c: 드라이브 이런걸 접근하려고 하면
알수 없는 파일이라고 나오면서 사용할 프로그램을 고르라고 나온다.

그리고 간혹 마우스가 끊어지며,
'키보드 값을 가로채서 전송' 한다고 한다. 젠장 ㄱ-

두녀석 모두 윈도우를 잘 괴롭히는 듯 하고,
dos에서 dir/ah 명령으로 보면

c:\에
autorun.inf
flnm.cmd
파일이 발견된다.

attrib로 보면
SHR c:\autorun.inf
SHR c:\flnm.cmd 로 각종속성으로 보호된 녀석이다.

윈도우에서 시스템 파일 자동 숨김으로 강제 설정하고, 변경해도 바로 숨김으로 설정해서
절대 파일을 볼 수 없게 만드는 치밀한 녀석이다.

그리고 레지스트리에
autorun.inf 파일 내용에 있는
pmut.bat로 검색하면 여러곳에서 검출이 되는데, 생각보다 잡기가 어려울 듯 보인다.




[링크 : http://kr.ahnlab.com/info/smart2u/virus_detail_27134.html]
[링크 : http://www.prevx.com/filenames/247913486337776168-X1/FLNM.CMD.html]


결론 : 포맷해야 하나 ㄱ-

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

일요일에 한 짓들  (8) 2009.04.13
내 블로그 방명록은 오스트레일리아다!  (4) 2009.04.11
Cumulus for TiStory 설치!  (0) 2009.04.10
RFonlie으로 돌아오라고?  (0) 2009.04.09
알텍랜싱 120i 두개 사용기  (4) 2009.04.09
Posted by 구차니