본문 바로가기
  • 경제적 자유를 얻는 그날까지
엔지니어링/드론

[PX4 개발자] Ubuntu 18.04에서 PX4 Firmware 컴파일

by 베니스상인 2020. 11. 25.

 

우분투에서 PX4 Firm웨어를 컴파일하기 위해서는 먼저 ROS, catkin_tools등 필요한 개발환경이 구축되어야 한다. PX4 개발 환경을 구축하는 방법은 아래 포스팅을 확인하기 바란다.

 

swiftcam.tistory.com/267

 

[PX4 개발자] Ubuntu 18.04에 ROS(Melodic)/Gazebo 설치하기

The supported/tested Linux OS versions for PX4 development are Ubuntu Linux LTS (opens new window) 18.04 (Bionic Beaver) and 20.04 (Focal Fossa). These allow you to build for the most PX4 targets (N..

swiftcam.tistory.com

 

 

 

 

github 사이트에서 PX4 펌웨어를 다운로드한다.

$ git clone https://github.com/PX4/PX4-Autopilot.git --recursive

 

PX4에 컴파일에 필요한 추가적인 툴체인들을 bash로 다운로드 및 설치한다.

$  cd PX4-Autopilot
$ bash ./Tools/setup/ubuntu.sh

 

설치가 완료되면 재부팅한다.

 

다시  로그인한 후 NuttX가 잘 설치되어 있는지 아래와 같이 컴파일러를 실행한다.

$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 9-2020-q2-update) 9.3.1 20200408 (release)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

PX4 펌웨어를 컴파일한다.

$  cd PX4-Autopilot
$ make px4_fmu-v4_default

 

컴파일 결과 아래와 같이 elf 파일이 정상적으로 만들어진다.

 

 

728x90

댓글