기본 콘텐츠로 건너뛰기

GDB Debugging Tool for Embedded Linux

Compile GDB for ARM Target
Preinstallation : ARM-LINUX-GCC
1. Compile for GDB
#tar xvf gdb-6.8.tar.tar
#cd gdb-6.8
#./configure -target=arm-linux
: Target 을 Embedded Linux for ARM 으로 설정한다.
: --prefix=/usr/local/bin 또는 GDB 가 설치될 Directory 를 명시한다. (Option)
#make
#make install
여기까지 정상적으로 진행된 경우, /usr/local/bin/ 에서 arm-linux-run, arm-linux-gdb, arm-linux-gdbtui 이렇게 3개의 실행파일이 생성된 것을 확인할 수 있다.
file 명령으로 arm-linux-gdb 를 확인하면 "ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), for GN/Linux 2.4.1, not stripped" 로 표시되는 것을 확인할 수 있다.
2. Compile for GDBServer
#cd gdb-6.8/gdb/gdbserver
#./configure -target=arm-linux --host=arm-linux
Target 이 Embedded Linux for ARM 이므로 Target 에 복사될 gdbserver 는 host 를 arm-linux 로 설정하여 다시 configure 를 실행하는 것이다.
#make CC=arm-linux-gcc
여기까지 정상적으로 진행된 경우, gdb608/gdb/gdbserver 에 gdbreplay, gdbserver 이렇게 2개의 실행파일이 생성된 것을 확인할 수 있다.
file 명령으로 gdbserver 를 확인하면 "ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped"로 표시되는 것을 확인할 수 있다.

댓글

이 블로그의 인기 게시물

Ubuntu (Kubuntu) 에 desktop 파일 만들기

Package 관리자등을 통해 직접 Repository 에 있는 Application 을 설치하는 경우에는 필요한 경로와 파일, Category 로 분류된 Icon 등록 등이 자동적으로 이루어지나 firefox, eclipse 등 새로운 버전을 새로 설치할 경우, 다음과 같은 절차를 통해 시작메뉴에 등록시킬 수 있다. 다음은 eclipse-SDK-3.6-linuxx-gtk.tar.gz 을 받아 설치 등록하는 것을 예로 든다. 1. 다운받은 파일을 /usr/lib에 압축해제한다. (물론, super user 계정으로 실행해야 한다.) 2. 보통의 경우, /usr/bin Directory 는 PATH 에 물려 있으므로 다음과 같은 실행 파일을 만들어 놓는다. # cd /usr/lib # chmod +x eclipse # cd /usr/bin # sudo nano eclipse eclipse 파일에는 아래의 내용을 입력하여 넣는다. export ECLIPSE_HOME="/usr/lib/eclipse" $ECLIPSE_HOME/eclipse $ * # sudo chmod 755 eclipse 3. Desktop Menu 에 추가하려면 # cd /usr/share/applications # sudo nano eclipse.desktop [Desktop Entry] Encoding=UTF-8 Name=Eclipse Comment=Eclipse IDE Exec=eclipse Icon=/usr/lib/eclipse/icon.xpm Terminal=false Type=Application Categories=GNOME;Application;Development' StartupNotify=true 이렇게 입력한 파일을 저장하면, 시작메뉴 > 개발 > Eclipse 아이콘이 생성되어 메뉴에서 직접 실행할 수 있게된다.

STM32CubeIDE 한글 주석 깨짐 문제 해결

STM32CubeIDE 는 JAVA로 프로그램된 eClipse CDT 프레임워크 기반으로 제작된 소프트웨어 이다. 아래의 내용은 STM32CubeIDE 개발 환경에서,  시스템 환경을 변경하기 위해  Pinout 등을 수정하여  Device Configuration Tool Code Generation (IOC File) 을 수행하면 수정된 코드가 자동 생성된다. 이 때, 소스 상의 한글 주석이 깨지는 문제점을 해결하는 방법이다. JAVA의 File Encoding 문제이며, 나는 소스파일을 UTF-8로 encoding 하도록 수정하였다. 다음의 순서로 진행한다. 1. 메뉴 Window > Preferences > Workspace - 하단의 Text file encoding을 Other 리스트 중에서 UTF-8을 선택한다. - Apply and Close 한다. 2. 탐색기 > 내 PC > 마우스 우측 클릭 > 팝업 메뉴에서 "속성" > 고급 시스템 설정 - 시스템 속성 창이 뜨면 "고급" 탭 하단의 "환경 변수" 클릭 - 사용자 변수에 "새로 만들기" 버튼을 눌러 변수 이름 : JAVA_TOOL_OPTIONS 변수 값 : -Dfile.encoding=UTF-8

ubuntu 또는 kubuntu 에서 Sun Java JDK 1.6 설치

1. 인터넷 브라우저를 열어, SDN Home 의 Download Center 에서 Download Java SE Development Kit 6u21 for Linux, Multi-language 를 실행한다. 2. jdk-6u21-linux-i586.bin 이 저장되면, 3. 터미널 창을 열어 다음을 실행한다. 4. 압축파일이 저장된 Directory 로 이동한다. snjee@snjee-kubuntu:~$ cd setupapps snjee@snjee-kubuntu:~$ sudo mv jdk-6u21-linux-i586.bin /usr/local/ snjee@snjee-kubuntu:~$ sudo chmod a+x /usr/local/jdk-6u21-linux-i586.bin snjee@snjee-kubuntu:~$ sudo ./jdk-6u21-linux-i586.bin [아래는 압축이 풀리고 마지막에 표시되는 Comment 부분이다.] Product Registration is FREE and includes many benefits: * Notification of new versions, patches, and updates * Special offers on Sun products, services and training * Access to early releases and documentation Product and system data will be collected. If your configuration supports a browser, the Sun Product Registration form for the JDK will be presented. If you do not register, none of this information will be saved. You may also register your JDK later by opening the register.html file (l...