Pixhawk 6X / 5X / 6C support by Simulink
Show older comments
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
Benjamin Kelm
on 26 Oct 2022
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!
Rasmus
on 7 Nov 2022
Did you manage to solve the issue?
Arun Mathamkode
on 23 Feb 2023
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.
Benjamin Kelm
on 23 Feb 2023
@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.
종원 이
on 29 May 2023
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!
Ankur Bose
on 7 Jul 2023
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.
Accepted Answer
More Answers (3)
Arun Mathamkode
on 23 Feb 2023
Edited: Arun Mathamkode
on 28 Feb 2023
2 votes
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
on 23 Sep 2022
Edited: Arun Mathamkode
on 23 Sep 2022
0 votes
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.
Ankur Bose
on 7 Jul 2023
0 votes
Pixhawk 6x is now a supported targe in R2023a version of MATLAB in the latest release of UAV Toolbox support ackage for PX4 Autopilots
Categories
Find more on Guidance, Navigation, and Control in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!