출처
- Compiling the Latest Lazarus/Free Pascal for Raspberry Pi | Big Dan the Blogging Man
- Lazarus IDE on ARM Ubuntu (Raspberry Pi, Ubuntu Touch, etc)
- Tinker Board Forum - GPIO mmap vs. sysfs, picberry, OneWire DS18B20 and other fairytales
OS 업그레이드
기존 전치된 lazarus 삭제
Swap 파일 크기 늘리기
여유 공간 확인
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 8.3G 5.5G 61% /
devtmpfs 943M 0 943M 0% /dev
tmpfs 1007M 0 1007M 0% /dev/shm
tmpfs 1007M 8.9M 998M 1% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1007M 0 1007M 0% /sys/fs/cgroup
/dev/mmcblk1p1 63M 7.5M 56M 12% /boot
tmpfs 202M 8.0K 202M 1% /run/user/1000
Swap 설정 파일 수정
Swap 사이즈 설정
CONF_SWAPSIZE=1000
Swap 설정 파일을 저장하고 스와핑을 다시 시작
Stopping dphys-swapfile (via systemctl): dphys-swapfile.service.
Starting dphys-swapfile (via systemctl): dphys-swapfile.service.
total 1001M
drwxr-xr-x 2 root root 4.0K Sep 16 01:22 backups
drwxr-xr-x 11 root root 4.0K Jul 21 10:44 cache
drwxr-xr-x 49 root root 4.0K Jul 21 20:09 lib
drwxrwsr-x 2 root staff 4.0K Nov 19 2017 local
lrwxrwxrwx 1 root root 9 Jan 10 2018 lock -> /run/lock
drwxr-xr-x 7 root root 4.0K Sep 16 03:29 log
drwxrwsr-x 2 root mail 4.0K Jan 10 2018 mail
drwxr-xr-x 2 root root 4.0K Jan 10 2018 opt
lrwxrwxrwx 1 root root 4 Jan 10 2018 run -> /run
drwxr-xr-x 7 root root 4.0K Jul 21 10:43 spool
-rw------- 1 root root 1000M Sep 16 03:43 swap
drwxrwxrwt 6 root root 4.0K Sep 16 03:30 tmp
Seed/Bootstrap Pascal Compiler 설치
fpc-3.0.4.arm-linux/
fpc-3.0.4.arm-linux/doc-pdf.tar.gz
fpc-3.0.4.arm-linux/binary.arm-linux.tar
fpc-3.0.4.arm-linux/install.sh
fpc-3.0.4.arm-linux/demo.tar.gz
설치과정
linaro@tinkerboard:/usr/local/fpc/fpc-3.0.4.arm-linux$ sudo ./install.sh This shell script will attempt to install the Free Pascal Compiler version 3.0.4 with the items you select Install prefix (/usr or /usr/local) [/usr] : Installing compiler and RTL for arm-linux... Install Textmode IDE (Y/n) ? Done. Install documentation (Y/n) ? Installing documentation in /usr/share/doc/fpc-3.0.4 ... Done. Install demos (Y/n) ? Install demos in [/usr/share/doc/fpc-3.0.4/examples] : Installing demos in /usr/share/doc/fpc-3.0.4/examples ... Done. Running on linux Write permission in /etc. Writing sample configuration file to /etc/fpc.cfg Writing sample configuration file to /usr/lib/fpc/3.0.4/ide/text/fp.cfg Writing sample configuration file to /usr/lib/fpc/3.0.4/ide/text/fp.ini Writing sample configuration file to /etc/fppkg.cfg Writing sample configuration file to /etc/fppkg/default End of installation. Refer to the documentation for more information.
svn 클라이언트 설치
관련 라이브러리 설치
Free Pascal 설치
설치된 pascal 버전 확인
3.0.4 lexyacc
fpc 최신 버전으로 심볼릭 링크 걸기
lrwxrwxrwx 1 root root 25 Sep 16 11:23 /usr/bin/ppcarm -> /usr/lib/fpc/3.0.4/ppcarm
fpc 컴파일러 버전 확인
3.0.4
Lazarus 설치
관련 라이브러리 설치
Lazarus 다운로드 및 컴파일
gcc 라이브러리 경로 설정
컴파일하면 crtbegin.o 및 crtend.o를 찾을 수 없다는 경고가 출력됩니다. 경고가 표지 되지 않도록 설정
crtbegin.o 찾기
/usr/lib/gcc/arm-linux-gnueabihf/6/crtbegin.o
fpc 환경 파일 (fpc.cfg) 수정
내용 추가
# path to the gcclib -Fl/usr/lib/gcc/arm-linux-gnueabihf/6
gdb 설치
Lazarus 실행
fpc 경로 오류
fpc 경로 찾기
fpc 경로 설정
Lazarus 실행화면