우분투에서 PX4 Firm웨어를 컴파일하기 위해서는 먼저 ROS, catkin_tools등 필요한 개발환경이 구축되어야 한다. PX4 개발 환경을 구축하는 방법은 아래 포스팅을 확인하기 바란다.
[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
'엔지니어링 > 드론' 카테고리의 다른 글
소형정찰용 드론 구매목록 (0) | 2020.11.26 |
---|---|
[PX4 개발자] Ubuntu 18.04에서 SITL 수행 (6) | 2020.11.25 |
Betaflight Revolt 의 SerialRX 연결 (0) | 2020.04.25 |
GPS 프로토콜 (0) | 2020.04.04 |
[STM32 자작드론] 자이로 센서 인터페이스 (6) | 2019.10.13 |
댓글