728x90

출처

xcode 설치

bluesanta@Sunghoui-MacBookPro ~ % xcode-select --install

"sudo" 루트 권한 부여

bluesanta@Sunghoui-MacBookPro ~ % sudo vi /etc/sudoers

%admin          ALL = (ALL) ALL
bluesanta       ALL=(ALL) NOPASSWD: ALL

CodeTyphon 압축 해제

bluesanta@Sunghoui-MacBookPro ~ % cd Downloads/
bluesanta@Sunghoui-MacBookPro Downloads % unzip CodeTyphonIns.zip

7zip 설치

bluesanta@Sunghoui-MacBookPro ~ % brew install p7zip

필수 라이브러리 설치 (xterm, wget, gdb이 설치되어 있는지 먼저 확인 할것)

bluesanta@Sunghoui-MacBookPro ~ % brew install wget gdb
bluesanta@Sunghoui-MacBookPro ~ % ln -s /usr/local/Homebrew/Library/Homebrew/shims/mac/super/gmake /usr/local/bin/gmake
bluesanta@Sunghoui-MacBookPro ~ % ln -s /usr/share/terminfo/78/xterm /usr/local/bin/xterm
bluesanta@Sunghoui-MacBookPro ~ % ln -s /Library/Developer/CommandLineTools/usr/bin/make /usr/local/bin/make
bluesanta@Sunghoui-MacBookPro ~ % ln -s /usr/local/bin/gdb /usr/local/bin/ggdb

Qt 버전 확인

bluesanta@Sunghoui-MacBookPro ~ % /usr/local/Cellar/qt/5.15.2/bin/qmake --version
QMake version 3.1
Using Qt version 5.15.2 in /usr/local/Cellar/qt/5.15.2/lib

Qt5pas 라이브러리 설치 (Option : CodeTyphon 설치시 11) -- Platform (widget) Setup 에서 실행)

qt5-qmake 설치

bluesanta@Sunghoui-MacBookPro ~ % brew install qt5
 
 ... 생략 ...
 
qt is keg-only, which means it was not symlinked into /usr/local,
because Qt 5 has CMake issues when linked.
 
If you need to have qt first in your PATH run:
  echo 'export PATH="/usr/local/opt/qt/bin:$PATH"' >> ~/.zshrc
 
For compilers to find qt you may need to set:
  export LDFLAGS="-L/usr/local/opt/qt/lib"
  export CPPFLAGS="-I/usr/local/opt/qt/include"
 
==> Summary
🍺  /usr/local/Cellar/qt/5.15.2: 10,688 files, 367.9MB
bluesanta@Sunghoui-MacBookPro ~ % brew install Caskroom/cask/qt-creator
==> Installing Cask qt-creator
==> Moving App 'Qt Creator.app' to '/Applications/Qt Creator.app'.
🍺  qt-creator was successfully installed!

ln_Typhon1_QT5pas_Build.sh 수정

bluesanta@Sunghoui-MacBookPro ScriptsLin % vi ln_Typhon1_QT5pas_Build.sh

qmake 경로 수정

  Darwin)
       vQMake=/usr/local/Cellar/qt/5.15.2/bin/qmake

수동 컴파일 및 설치

bluesanta@Sunghoui-MacBookPro /opt % sudo mkdir -p /opt/local/libexec
bluesanta@Sunghoui-MacBookPro /opt % sudo ln -s /usr/local/Cellar/qt/5.15.2 /opt/
bluesanta@Sunghoui-MacBookPro ScriptsLin % chmod 755 *.sh
bluesanta@Sunghoui-MacBookPro ScriptsLin % ./ln_Typhon1_QT5pas_Build.sh
 
 ... 생략 ...
 
mv -f Qt5Pas Qt5Pas.framework/Versions/1/Qt5Pas
ln -s Versions/Current/Qt5Pas Qt5Pas.framework/Qt5Pas
rm -f -r /usr/local/Cellar/qt/5.15.2/lib/Qt5Pas.framework
/usr/local/Cellar/qt/5.15.2/bin/qmake -install qinstall Qt5Pas.framework /usr/local/Cellar/qt/5.15.2/lib/Qt5Pas.framework
strip -S -x /usr/local/Cellar/qt/5.15.2/lib/Qt5Pas.framework/Versions/1/Qt5Pas
/usr/local/codetyphon/qt5pas/x86_64-darwin
make install
   
   
---------------------------------------
[INFO]: Qt5Pas.framework Library finish Build OK for x86_64-darwin
   
   
---------------------------------------------------------
    Make qt5pas Libraries Links
---------------------------------------------------------
   
[INFO] Make Qt5Pas.framework links to /Library/Frameworks/Qt5Pas.framework for x86_64-darwin finish OK

fpc.cnf 수정

bluesanta@Sunghoui-MacBookPro ScriptsLin % vi /usr/local/codetyphon/fpc/fpc64/bin/x86_64-darwin/fpc.cnf

# -------------
# Linking
# -------------
-Ff/Library/Frameworks

CodeTyphon 설치 스크립트 실행

bluesanta@Sunghoui-MacBookPro Downloads % cd CodeTyphonIns/
bluesanta@Sunghoui-MacBookPro CodeTyphonIns % export FPCOPT=-Ff/Library/Frameworks
bluesanta@Sunghoui-MacBookPro CodeTyphonIns % ./install.sh

0번 선택

====================================================
             CodeTyphon Studio 
            Version 7.30 (GEN 7)
  Installation for Linux-Solaris-Openindiana-MacOS
          FreeBSD-NetBSD-OpenBSD-DragonFly
====================================================
 
   0) Install CodeTyphon Studio
 
   9) Exit
 
>>> Select an action (press 0..9 key): 0

11번 선택

====================================================
  CodeTyphon Studio 7.30 Setup for Darwin64
   Settings: Platform=cocoa  Multiarch Mode=0
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 11

5번 QT5 선택

====================================================
    CodeTyphon Studio MacOS Platform (widget) Setup 
        Current Platform: cocoa
====================================================
   
Warning: Install System Libraries after every Platform change
   
   1) Cocoa         (Default)
   2) Carbon
   3) GTK2
   4) QT4
   5) QT5
   6) GTK3           (Experimental)
   7) FpGUI          (Experimental)
   8) CustomDrawn    (Experimental)
   
   9) Back to Main Setup
   
>>> Select a platform (press 0..9 key): 5

12번 선택

====================================================
  CodeTyphon Studio 7.30 Setup for Darwin64
   Settings: Platform=qt5  Multiarch Mode=0
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 12

1번 선택

====================================================
    CodeTyphon Studio Multi-Architecture Setup
      Current Multiarch Mode: 0
====================================================
   
   0) NO  Multi-Architecture Mode (Multiarch=0)
   
   1) Use Multi-Architecture Mode (Multiarch=1)
   
   
   9) Back to Main Setup
   
>>> Select Mode (press 0..9 key): 1

0번 선택 ( 0) Install System Libraries )

====================================================
  CodeTyphon Studio 7.30 Setup for Darwin64
   Settings: Platform=qt5  Multiarch Mode=0
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 0

8번 선택 ( 8) Remove and Build ALL )

====================================================
  CodeTyphon Studio 7.30 Setup for Darwin64
   Settings: Platform=qt5  Multiarch Mode=1
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 8

9번 선택 ( 9) EXIT )

====================================================
  CodeTyphon Studio 7.30 Setup for Darwin64
   Settings: Platform=qt5  Multiarch Mode=0
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 9

/opt/local/libexec/qt5

bluesanta@Sunghoui-MacBookPro libexec % sudo ln -s /opt/local/libexec/qt5-mac/ /opt/local/libexec/qt5

실행

728x90
728x90

출처 : 델마당 - 라즈베리 파이(Raspberry Pi) 보드 크로스 컴파일 환경 구축 성공(Win7 => 라즈베리)
Cross-Build for RasberryPi
TOPIC: How to build app for Raspberry Pi from Windows 7
Setup Cross Compile For ARM

Lazarus

Lazarus라는 RAD툴 입니다.
아직 설치 방법은 작성중이고, 우선 개발된 소스와 실행 파일을 올립니다.
기본언어는 Pascal 이고, 상용툴로 Delphi와 비슷합니다.
Raspberry PI용 화면개발을 하실 일이 있다면 편하게 작성하실수 있습니다.

설치방법과 GPIO관련 내용은 따로 작성해서 올리겠습니다.

GPIO 컴포넌트

rpi-hal 링크

CodeTyphon 다운로드

Cross-Build for RasberryPi 다운로드

설치

CodeTyphonIns\install.bat 관리자로 실행

Lazarus 실행

화면디자인

소스코드 Unit1.pas project1.zip

unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    procedure Button1Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
begin
  //
  Edit1.Text := 'Hello Raspberry !!!';
end;

end.

Windows에서 실행

 

Raspberry PI 용 컴파일 옵션 설정

Raspberry PI에서 실행

 

728x90

+ Recent posts