Pixhawk 6X / 5X / 6C support by Simulink

Quick question about support for newer Pixhawk hardware:
The documentation states that support is available up to Pixhawk 4. Does this mean that newer hardware (e.g. Pixhawk 6X) is not supported? Or is this just an issue of whether the hardware has been tested? According to the documentation (https://de.mathworks.com/help/supportpkg/px4/ug/supported-flight-controllers.html) there is at least the possibility to use unlisted hardware. Has anyone made any experience here?
Thank you very much for a short feedback.

6 Comments

I can confirm that the PX4 Matlab Support Package generally works with the Pixhawk 6X hardware board.
However, when trying out simple test scripts (like the Getting Started uORB example), we run into a flash overflow error when trying to flash:
Memory region Used Size Region Size %age Used
itcm: 0 GB 64 KB 0.00%
flash: 1973557 B 1920 KB 100.38%
dtcm1: 0 GB 64 KB 0.00%
dtcm2: 0 GB 64 KB 0.00%
sram: 78436 B 512 KB 14.96%
...
sram4: 2 KB 64 KB 3.13%
bbram: 0 GB 4 KB 0.00c:/px4_cygwin/toolchain/gcc-arm/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: px4_fmu-v6x_default.elf section `.text' will not fit in region `flash'
c:/px4_cygwin/toolchain/gcc-arm/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region `flash' overflowed by 7477 bytes
collect2.exe: error: ld returned 1 exit status
%
PX4 Cygwin returned an error of 1
"
We have tried to edit the CMakefile (to exclude certain sensors etc.) like detailed here, yet ran into problems, because of dependencies in the code.
I would greatly appreaciate any help!
Did you manage to solve the issue?
Fash overflow issues are seen with Pixhawk 6x while deployment, to resolve this you can consider manually removing unused modules from the cmake file. For example, if you are working with a multi-copter, you can consider removing fixed-wing controllers and related modules and vice-versa.
@Rasmus Yes, we managed to compile a firmware which is just using 92% or so of the flash memory, allowing for sufficient memory for custom applications. Just as @Arun Mathamkode stated, try to deactivate certain modules in the cmake.
Hello, I have same error, but I cannot figure out in which file I should edit.
Can you tell me exactly which cmake file I have to revise?
I am using cube orange, so I navigate below path
Firmware/build/cubepilot_cubeorange_default
But Cannot figure out which cmake file exactly I should fix.
Thank you for reply in advance!
It seems like you are using Cube Orange. If you are using R2023a version of MATLAB, we have support for Cube Orange and you dont need to do any workaround like above.

Sign in to comment.

 Accepted Answer

Pixhawk 6x can be used with AV Toolbox Support Package for PX4 Autopilots in R2022b and R2023a. Follow the steps mentioned here.

5 Comments

I have bought pixhawk 6C. what change should i make to connect it to the simulink?
As of now there is no option for 6C in px4 board dropdown menu.
And there is no default.cmake for fmu-v6c in the PX4 folder on my windows 10.
How can i connect my Pixhawk 6C to simulink?
Pixhawk 6C is not supported with px4 v1.12.3. So as of now you may not be able to use it with Simulink.
Any idea, when it would be available officiallly? is it already under development?
We are working on Pixhawk 6c support and we would let you know when that is available
Hi, any update on Pixhwak 6C support?

Sign in to comment.

More Answers (3)

Arun Mathamkode
Arun Mathamkode on 23 Feb 2023
Edited: Arun Mathamkode on 28 Feb 2023
Flash overflow issues are seen with Pixhawk 6x during deployment, to resolve this you can consider manually removing unused modules from the cmake file. For example, if you are working with a multi-copter, you can consider removing fixed-wing controllers and related modules and vice-versa.
Arun Mathamkode
Arun Mathamkode on 23 Sep 2022
Edited: Arun Mathamkode on 23 Sep 2022
Even though some of the Pixhawk standard boards are not among the officially supported boards from PX4 support package, There are options provided to use those boards with PX4Support package. To use these boards, select "My board is not listed here" in hardware setup screen (instead of selecting one of the supported boards) and use the Target Hardware as PX4 Pixhawk Series in Simulink. Note that, the complete functionality is not tested with any boards which are not listed, but mostly it should work. Highly recommend using R2022b when you are using these option. For example, refer this documentation on how to use Cube orange board with PX4 Support package.
Pixhawk 6x is now a supported targe in R2023a version of MATLAB in the latest release of UAV Toolbox support ackage for PX4 Autopilots

Products

Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!