Ardupilot source code ported to Freescale I.MX6Q hardware platform


Author:Xiao Qi (Amovlab Co. Ltd.)

Currently, the official Pixhawk series controllers use STM32 controllers. It is also well known that STM32 series of microcotrollers are mostly used in the consumer electronics field, and are popular around the world due to their low cost and rich data.

However, it is also widely believed that reliability in software and hardware is a major requirement in the field of aerospace and industrial control where hardware selection is a meticulous process. With the rapid development of Pixhawk open source flight control, more and more companies at home and abroad are using this open source flight controller to develop their own unmanned systems. Thus the software and hardware control system originally meant for the aircraft model level are also now being applied to the industrial control and aerospace fields.

Although the unmanned system is currently at the initial stages with the upstream and downstream industry chains not well defined, it is still believed that this is not a healthy trend. This is because the demand for unmanned systems has sharply increased against an inadequate human resource for this and related industries, and while the scale of the industry continues to grow, it is still far from being as perfect as the automobile industry.

Based on the above mentioned observations, we completely ported the Ardupilot system to the Freescale IMX6 chip platform, and directly upgraded the hardware level of the Ardupilot system to the industrial level. This has greatly improved the stability of the core processor, and provided a maximum degree of guarantee for the subsequent software extension.

Ensuring the stability of the entire system at the hardware and software levels is the objective of our concerted efforts. In another article, we will also discuss in detail the current problems in the field of unmanned systems, especially drones.

1.The system features at a glance :

Product parameters

1-Basic parameters

CPU: NXP quad core i.MX6Q

Architecture: Cortex-A9

Main frequency: 1GHz

Memory: 1GB DDR3 / 2GB DDR3

ROM: 8GB eMMC

Operating System: Linux4.1.15-realtime

2.Interface

I2C: 1 way

USB HOST: 1 way USB HOST 2.0

USB OTG: 1 way USB OTG 2.0

UART/IrDA: 3 channels (including a debug serial port)

Pwm: 12 way

S.bus: 1 way

Adc: 2 way

Power supply interface: 1 way (gh1.25-6pin, 5V, 3A)

3. Available resources on the board

RGBLED: 1

Barometer: 1

Accelerometer: 2

Gyro: 2

Compass: 2

Programmable IOMCU: 1

Boot switch: 1

Software resources

1.Driver

Serial port driver:provided by linux

I2c driver: provided by linux

Adc driver: offer

Usb driver:provided by linux

Pwm driver: available

bus driver:provided by ardupilot

Gpio driver:provided by linux

Each sensor driver: provided by ardupilot

2. Application

Control program: ardupilot----open source

Communication protocol: mavlink-linux----open source

Tool chain

Linux programming: arm-linux-gnueabihf-gcc (version 5.4 or higher)

Windows programming: vs2017 (the Linux cross-compilation environment needs to be selected in the installation package)

Connect PC

Serial terminal: use usb-ttl1.8v to connect the board debug serial port and the super terminal was used to login

Usb terminal: use usb data cable to connect the board usb-otg interface, use super terminal ssh to login

Connecting to the ground station: use the usb data cable to connect the board usb-otg interface, use the ground station connection

File transfer: use usb data cable to connect the board usb-otg interface, use the super terminal sftp for file transfer

Vs online compile and debug: use usb data cable to connect the board usb-otg interface, use vs2017 to connect the board, compile single step debugging

Vs online additional debugging: use usb data cable to connect the board usb-otg interface, use vs2017 to connect the board for additional debugging.

We believe that this development platform has a number of advantages:

  1. The hardware processing performance has greatly improved compared with the classic official flight control, 50% to 80% of the CPU usage. The processor we transplanted has a CPU usage of about 3%, and the code has a lot of room for possible extension.

The core board of i.MX6Q quad-core processor is based on NXP (formerly Freescale) Cortex-A9 architecture

  1. The sensor driver under Linux, USB driver, and various supported peripherals are very resourceful, and can be easily extended to the development of advanced applications such as vision.![|32x32](file:///C:\Users\PANDAD~1\AppData\Local\Temp\ksohtml\wps46D1.tmp.png)

3 A single-step debugging development environment has been integrated making it capable of supporting single-step debugging under VS2017. The code flow of the controller is clear and is convenient for code tracking and testing.

4 The temperature adaptability, anti-complex environmental electromagnetic interference ability of the NXP industrial grade processor is stronger. Compared with the consumer processor of STM32 series MCU, the hardware advantage is self-evident.

We believe that in terms of convenience, VS2017’s integrated development environment is more friendly than that of Ubuntu and can conduct single-step debugging with much more improved efficiency. This is in line with the original objective of our company (Amovlab) which is making development more efficient. The hardware’s performance has also been greatly improved. In the future, whether it is the design of the filter, the complex controller or the image, they can all effectively meet the required specifications. This autopilot hardware system has very good prospects.

We still plan to keep up with supporting the random version of the official source code as it is the same as the Ardupilot source code. The user only needs to do secondary development on the official source code to support the random version of the official code. In this case there is no need to worry about Linux system level scheduling. However as in ordinary flight control development, you can care about algorithms and logic levels.

The following is a test description and a demonstration of a four-rotor aircraft operation:

1, development and debugging demonstration

2, takeoff / landing / hover test

  1. Stability of violent stroke test in self-stabilized mode (large maneuver)
4 Likes

Hello,

Thanks for your post, but it seems that some part are missing ! Could you update it, and show us the port in action ?

Nice! Do you have a video you can share? It would be great to see a demonstration.
Also: PLEASE MAKE A PULL REQUEST for the port, and if possible make a few sample boards available for the dev team so we can add to testing.
Great work - it’s always exciting to see new implementations!
@dk7xe.g you and Iain might be interested in this.

Thanx for the hint! @james_pattison

Any chance you have a picture or video? blogs look better when we have a picture or video at the top.


3 Likes


We are currently uploading the video

2 Likes

Welcome to ArduPilot AmovLab :slight_smile:

Really interesting new FC, lots of processing power and it is nice to have a new member to the Linux group.

@rmackay9 check their video on indoor flight using Rplidar with ROS - Cartographer (and a reduced data stream filter node on Nvidia ) , that is good stuff !!

3 Likes

This is really great. Having a really high powered flight controller is quite exciting. Just like you’ve done, having cartographer running right on the same CPU is fantastic. It opens up a lot of possibilities for more tightly integrating object avoidance and other features with the flight control. Really great stuff!

2 Likes

Really Nice project!
What is that frame you are using?

We will PULL REQUEST within one month

2 Likes

Nice work. Where do you buy this board?

Hi! We are interested in your board. Please contact me info@uscrobots.com
Sincerely,
Bazyl Zholymbet

Hi we will get back to you on the board issue. Lets keep in touch thanks

As mentioned above, please send a PR once you think it is ready. Nice to see one more Linux board being added.

1 Like

I am sold. I need one :slight_smile:

Now, how can I help making this a FC ? I mean, with all the bells and whistles a modern FC sports. Dampened IMU. Isolated baro. Well thought-out connectivity. Compact. Easy to mount.

Oh, and what happened to the MIPI connectivity it sports ?

thanks rmckay9 for your encouragement. we’ll keep trying our best and keep you all updated

thanks ppoirier:pray: